NrbfDecoder.Decode 方法

定义

重载

Decode(Stream, PayloadOptions, Boolean)

解码提供的 NRBF 有效负载。

Decode(Stream, IReadOnlyDictionary<SerializationRecordId,SerializationRecord>, PayloadOptions, Boolean)

解码提供的 NRBF 有效负载。

Decode(Stream, PayloadOptions, Boolean)

Source:
NrbfDecoder.cs

解码提供的 NRBF 有效负载。

public static System.Formats.Nrbf.SerializationRecord Decode (System.IO.Stream payload, System.Formats.Nrbf.PayloadOptions? options = default, bool leaveOpen = false);
static member Decode : System.IO.Stream * System.Formats.Nrbf.PayloadOptions * bool -> System.Formats.Nrbf.SerializationRecord
Public Shared Function Decode (payload As Stream, Optional options As PayloadOptions = Nothing, Optional leaveOpen As Boolean = false) As SerializationRecord

参数

payload
Stream

NRBF 有效负载。

options
PayloadOptions

用于在分析期间控制行为的选项。

leaveOpen
Boolean

true 在读取完成后将 payload 有效负载保持打开状态;否则,false

返回

表示根对象的 SerializationRecord。 它可以是 PrimitiveTypeRecord<T>ClassRecordArrayRecord

例外

payload null

payload 不支持读取或已关闭。

payload 读取遇到无效的 NRBF 数据。

payload 读取遇到无效的 UTF8 序列。

适用于

Decode(Stream, IReadOnlyDictionary<SerializationRecordId,SerializationRecord>, PayloadOptions, Boolean)

Source:
NrbfDecoder.cs

解码提供的 NRBF 有效负载。

public static System.Formats.Nrbf.SerializationRecord Decode (System.IO.Stream payload, out System.Collections.Generic.IReadOnlyDictionary<System.Formats.Nrbf.SerializationRecordId,System.Formats.Nrbf.SerializationRecord> recordMap, System.Formats.Nrbf.PayloadOptions? options = default, bool leaveOpen = false);
public static System.Formats.Nrbf.SerializationRecord Decode (System.IO.Stream payload, out System.Collections.Generic.IReadOnlyDictionary<System.Formats.Nrbf.SerializationRecordId,System.Formats.Nrbf.SerializationRecord> recordMap, System.Formats.Nrbf.PayloadOptions options = default, bool leaveOpen = false);
static member Decode : System.IO.Stream * IReadOnlyDictionary * System.Formats.Nrbf.PayloadOptions * bool -> System.Formats.Nrbf.SerializationRecord
Public Shared Function Decode (payload As Stream, ByRef recordMap As IReadOnlyDictionary(Of SerializationRecordId, SerializationRecord), Optional options As PayloadOptions = Nothing, Optional leaveOpen As Boolean = false) As SerializationRecord

参数

payload
Stream

NRBF 有效负载。

recordMap
IReadOnlyDictionary<SerializationRecordId,SerializationRecord>

此方法返回时,包含 SerializationRecordId 到关联的序列化记录的映射。 此参数被视为未初始化。

options
PayloadOptions

描述要使用的可选 PayloadOptions 参数的对象。

leaveOpen
Boolean

true 在读取完成后将 payload 有效负载保持打开状态;否则,false

返回

表示根对象的 SerializationRecord。 它可以是 PrimitiveTypeRecord<T>ClassRecordArrayRecord

适用于