FastBinaryFormatterDeserializeT(ValueByteBlock, FastSerializerContext) 方法
从值类型字节块中反序列化对象。
命名空间: TouchSocket.Core程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
public static T Deserialize<T>(
ref ValueByteBlock byteBlock,
FastSerializerContext serializerContext = null
)
Public Shared Function Deserialize(Of T) (
ByRef byteBlock As ValueByteBlock,
Optional serializerContext As FastSerializerContext = Nothing
) As T
static member Deserialize :
byteBlock : ValueByteBlock byref *
?serializerContext : FastSerializerContext
(* Defaults:
let _serializerContext = defaultArg serializerContext null
*)
-> 'T
- byteBlock ValueByteBlock
- 包含序列化数据的ValueByteBlock。
- serializerContext FastSerializerContext (Optional)
- 序列化上下文,为 时使用默认上下文。
- T
- 要反序列化的对象类型。
T反序列化的对象实例。
此方法会先校验魔数(协议头),确保数据格式正确。