一款简单易用的基础网络通讯组件库。

PackageFastBinaryConverterTPackageIFastBinaryConverterRead 方法

从字节块中读取数据并转换为TPackage类型的对象。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
Object IFastBinaryConverter.Read<TByteBlock>(
	ref TByteBlock byteBlock,
	Type type
)
where TByteBlock : IBytesReader

参数

byteBlock  TByteBlock
字节块的引用。
type  Type
要转换的类型。

类型参数

TByteBlock
实现了IByteBlock接口的字节块类型。

返回值

Object
转换后的TPackage类型的对象。

实现

IFastBinaryConverterReadTReader(TReader, Type)

参见