public T[] ReadArray <T>() { var length = ReadInt32(); var res = new T[length]; var baseType = typeof(T); for (var i = 0; i < length; i++) { res[i] = (T)XdrConverter.Deserialize(this, baseType); } return(res); }
public List <T> ReadList <T>() { var length = ReadInt32(); var res = new List <T>(length); var baseType = typeof(T); for (var i = 0; i < length; i++) { res[i] = (T)XdrConverter.Deserialize(this, baseType); } return(res); }
public object ReadObject(Type targetType) { return(XdrConverter.Deserialize(this, targetType)); }
public override void WriteObject(object value, Type type) { XdrConverter.Serialize(value, this); }