in csharp/AdapterTest/PayloadHelperTest.cs [359:402]
internal static object ReadTypedObject(Stream s, char type)
{
switch (type)
{
case 'n':
return null;
case 'i':
return SerDe.ReadInt(s);
case 'g':
return SerDe.ReadLong(s);
case 'd':
return SerDe.ReadDouble(s);
case 'b':
return ReadBoolean(s);
case 'c':
return SerDe.ReadString(s);
case 'e':
return ReadDictionary(s);
case 'r':
return SerDe.ReadBytes(s);
case 'l':
return ReadArray(s);
case 'D':
return ReadDate(s);
case 't':
return ReadTime(s);
case 'j':
return new JvmObjectReference(SerDe.ReadString(s));
default:
throw new ArgumentException("Invalid type " + type);
}
}