共用方式為


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>)

預期空白內容 (或 EndTagDelimited) 的單一欄位標頭 EndBaseFields ,但也會取用任何非預期的欄位。

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

預期空白內容 (或 EndTagDelimited) 的單一欄位標頭 EndBaseFields ,但也會取用任何非預期的欄位。

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

還原序列化非預期的值。

適用於