NrbfDecoder.Decode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Decode(Stream, PayloadOptions, Boolean) |
Decodes the provided NRBF payload. |
Decode(Stream, IReadOnlyDictionary<SerializationRecordId,SerializationRecord>, PayloadOptions, Boolean) |
Decodes the provided NRBF payload. |
Decode(Stream, PayloadOptions, Boolean)
- Source:
- NrbfDecoder.cs
Decodes the provided NRBF payload.
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
Parameters
- payload
- Stream
The NRBF payload.
- options
- PayloadOptions
Options to control behavior during parsing.
- leaveOpen
- Boolean
true
to leave payload
payload open
after the reading is finished; otherwise, false
.
Returns
A SerializationRecord that represents the root object. It can be either PrimitiveTypeRecord<T>, a ClassRecord or an ArrayRecord.
Exceptions
payload
is null
.
payload
does not support reading or is already closed.
Reading from payload
encounters invalid NRBF data.
Reading from payload
encounters an invalid UTF8 sequence.
Applies to
Decode(Stream, IReadOnlyDictionary<SerializationRecordId,SerializationRecord>, PayloadOptions, Boolean)
- Source:
- NrbfDecoder.cs
Decodes the provided NRBF payload.
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
Parameters
- payload
- Stream
The NRBF payload.
When this method returns, contains a mapping of SerializationRecordId to the associated serialization record. This parameter is treated as uninitialized.
- options
- PayloadOptions
An object that describes optional PayloadOptions parameters to use.
- leaveOpen
- Boolean
true
to leave payload
payload open
after the reading is finished; otherwise, false
.
Returns
A SerializationRecord that represents the root object. It can be either PrimitiveTypeRecord<T>, a ClassRecord or an ArrayRecord.