/** <inheritdoc /> */ public T ReadBinary <T>(BinaryReader reader, IBinaryTypeDescriptor desc, int pos, Type typeOverride) { var obj = FormatterServices.GetUninitializedObject(typeOverride ?? desc.Type); reader.AddHandle(pos, obj); _serializer.ReadBinary(obj, reader); return((T)obj); }
/** <inheritdoc /> */ public T ReadBinary <T>(BinaryReader reader, Type type, int pos) { var obj = FormatterServices.GetUninitializedObject(type); reader.AddHandle(pos, obj); _serializer.ReadBinary(obj, reader); return((T)obj); }