Reader<TInput> 结构

定义

提供从二进制输入分析数据的功能。

public ref struct Reader<TInput>
type Reader<'Input> = struct
Public Structure Reader(Of TInput)

类型参数

TInput

基础缓冲区读取器类型。

继承
Reader<TInput>

属性

Length

获取输入长度。

Position

获取当前读取器位置。

Session

获取序列化程序会话。

方法

ForkFrom(Int64, Reader<TInput>)

从指定位置开始创建新的读取器。

ReadByte()

从输入中读取字节。

ReadBytes(Span<Byte>)

destination用从输入中读取的字节填充。

ReadBytes(UInt32)

从输入中读取字节数组。

ReadBytes<TBufferWriter>(TBufferWriter, Int32)

将指定的字节数读取到提供的编写器中。

ReadInt32()

Int32从输入中读取 。

ReadInt64()

Int64从输入中读取 。

ReadUInt32()

UInt32从输入中读取 。

ReadUInt64()

UInt64从输入中读取 。

ReadVarUInt32()

从输入中读取可变宽度 UInt32

ReadVarUInt64()

从输入中读取可变宽度 UInt64

ResumeFrom(Int64)

在分叉读取器不再使用后,从指定位置恢复读取器。

Skip(Int64)

跳过指定的字节数。

TryReadBytes(Int32, ReadOnlySpan<Byte>)

尝试从输入读取指定数量的字节。

扩展方法

ReadInt16<TInput>(Reader<TInput>, WireType)

读取可变宽度 Int16的 。

ReadInt32<TInput>(Reader<TInput>, WireType)

读取可变宽度 Int32的 。

ReadInt64<TInput>(Reader<TInput>, WireType)

读取可变宽度 Int64的 。

ReadInt8<TInput>(Reader<TInput>, WireType)

读取可变宽度 SByte的 。

ReadUInt16<TInput>(Reader<TInput>, WireType)

读取可变宽度 UInt16的 。

ReadUInt32<TInput>(Reader<TInput>, WireType)

读取可变宽度 UInt32的 。

ReadUInt64<TInput>(Reader<TInput>, WireType)

读取可变宽度 UInt64的 。

ReadUInt8<TInput>(Reader<TInput>, WireType)

读取可变宽度 Byte的 。

ReadVarInt16<TInput>(Reader<TInput>)

读取可变宽度 UInt16的 。

ReadVarInt32<TInput>(Reader<TInput>)

读取可变宽度 Int32的 。

ReadVarInt64<TInput>(Reader<TInput>)

读取可变宽度 Int64的 。

ReadVarInt8<TInput>(Reader<TInput>)

读取可变宽度 SByte的 。

ReadVarUInt16<TInput>(Reader<TInput>)

读取可变宽度 UInt16的 。

ReadVarUInt8<TInput>(Reader<TInput>)

读取可变宽度 Byte的 。

ConsumeUnknownField<TInput>(Reader<TInput>, Field)

使用未知字段。

ConsumeUnknownField<TInput>(Reader<TInput>, Field)

使用未知字段。

ReadFieldHeader<TInput>(Reader<TInput>)

读取字段标头。

ReadFieldHeader<TInput>(Reader<TInput>, Field)

读取字段标头。

ReadFieldHeaderForAnalysis<TInput>(Reader<TInput>)

读取字段标头以进行诊断。

SkipField<TInput>(Reader<TInput>, Field)

跳过当前字段。

ConsumeEndBaseOrEndObject<TInput>(Reader<TInput>)

预期空内容 (或) 的单个字段标头 EndBaseFieldsEndTagDelimited ,但也会使用任何意外的字段。

ConsumeEndBaseOrEndObject<TInput>(Reader<TInput>, Field)

预期空内容 (或) 的单个字段标头 EndBaseFieldsEndTagDelimited ,但也会使用任何意外的字段。

DeserializeUnexpectedType<TInput,TField>(Reader<TInput>, Field)

反序列化意外值。

适用于