Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

NrbfDecoder.Decode Method

Definition

Namespace:
System.Formats.Nrbf
Assembly:
System.Formats.Nrbf.dll
Package:
System.Formats.Nrbf v11.0.0-preview.5.26302.115

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)

Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
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 encountered invalid NRBF data.

An I/O error occurred.

Reading from payload encountered unsupported records, for example, arrays with non-zero offset or unsupported record types (ClassWithMembers, SystemClassWithMembers, MethodCall, or MethodReturn).

Reading from payload encountered an invalid UTF8 sequence.

The end of the stream was reached before reading MessageEnd record.

Applies to

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

Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
Source:
NrbfDecoder.cs
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);
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.

recordMap
IReadOnlyDictionary<SerializationRecordId,SerializationRecord>

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.

Applies to


Feedback

Was this page helpful?