public unsafe static DeSerializeResult deSerialize <T>(this T value, UnmanagedStream data, int startIndex = 0, DeSerializeConfig config = null) { if (data == null) { return new DeSerializeResult { State = DeSerializeState.UnknownData } } ; return(BinaryDeSerializer.DeSerialize <T>(null, data.Data.Byte + startIndex, data.Data.CurrentIndex - startIndex, ref value, config)); }
public unsafe static DeSerializeResult deSerialize <T>(this T value, ref LeftArray <byte> data, DeSerializeConfig config = null) { if (data.Length == 0) { return new DeSerializeResult { State = DeSerializeState.UnknownData } } ; fixed(byte *dataFixed = data.GetFixedBuffer()) return(BinaryDeSerializer.DeSerialize <T>(data.Array, dataFixed, data.Length, ref value, config)); }
public unsafe static DeSerializeResult deSerialize <T>(this T value, byte *data, int size, DeSerializeConfig config = null) { if (data == null) { return new DeSerializeResult { State = DeSerializeState.UnknownData } } ; return(BinaryDeSerializer.DeSerialize <T>(null, data, size, ref value, config)); } }
public static DeSerializeResult deSerialize <T>(this T value, byte[] data, DeSerializeConfig config = null) { return(BinaryDeSerializer.DeSerialize(data, ref value, config)); }