public static T Deserialize <T>(this BinaryReader rReader, T value) where T : HotfixSerializerBinary { bool bValid = rReader.Deserialize(false); if (!bValid) { return(null); } var rInstance = HotfixReflectAssists.Construct <T>(); rInstance.Deserialize(rReader); return(rInstance); }
public static T DeserializeDynamic <T>(this BinaryReader rReader, T rValue) where T : HotfixSerializerBinary { bool bValid = rReader.Deserialize(false); if (!bValid) { return(null); } var rFullName = rReader.Deserialize(string.Empty); var rInstance = HotfixReflectAssists.TConstruct <T>(Type.GetType(rFullName)); rInstance.Deserialize(rReader); return(rInstance); }