System.Formats.Nrbf
Any .NET object (a primitive, a reference type, a reference or single null).
Array information structure.
ArrayInfo structures are described in [MS-NRBF] 2.4.2.1.
Defines the core behavior for NRBF array records and provides a base for derived classes.
When overridden in a derived class, gets a buffer of integers that represent the number of elements in every dimension.
A buffer of integers that represent the number of elements in every dimension.
Gets the rank of the array.
The rank of the array.
Gets the type of the array.
The type of the array.
Allocates an array and fills it with the data provided in the serialized records (in case of primitive types like or ) or the serialized records themselves.
Expected array type.
to permit values within the array;
otherwise, .
An array filled with the data provided in the serialized records.
does not match the data from the payload.
Represents a single dimensional array of .
ArraySingleObject records are described in [MS-NRBF] 2.4.3.2.
Represents a single-dimensional array of a primitive type.
ArraySinglePrimitive records are described in [MS-NRBF] 2.4.3.3.
Represents a single dimensional array of .
ArraySingleString records are described in [MS-NRBF] 2.4.3.4.
Indicates the kind of an array for an NRBF BinaryArray record.
BinaryArrayType enumeration is described in [MS-NRBF] 2.4.1.1.
A single-dimensional array.
An array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes.
A multi-dimensional rectangular array.
Represents a library.
BinaryLibrary records are described in [MS-NRBF] 2.6.2.
Represents a record.
BinaryObjectString records are described in [MS-NRBF] 2.5.7.
Identifies the remoting type of a class member or array item.
BinaryType enumeration is described in [MS-NRBF] 2.1.2.2.
The type is defined by and it is not a string.
The type is a
length prefixed string.
The type is the .
The type is a class or a struct defined in mscorlib.
The type is a class or a struct.
The type is a single-dimensional array of objects.
The type is a single-dimensional array of strings.
The type is a single-dimensional array of a primitive type.
Class info that provides type and member names.
ClassInfo structures are described in [MS-NRBF] 2.3.1.1.
Defines the core behavior for NRBF class records and provides a base for derived classes.
Gets the names of the serialized members.
The names of the serialized members.
Checks if member of given name was present in the payload.
The name of the member.
if it was present, otherwise .
It's recommended to use this method when dealing with payload that may contain
different versions of the same type.
Retrieves the value of the provided .
The name of the member.
The value.
does not refer to a known member. You can use to check if given member exists.
Member of such name has value of a different type.
For primitive types like , or returns their value.
For nulls, returns a null.
For other types that are not arrays, returns an instance of .
For single-dimensional arrays returns where the generic type is the primitive type or .
For jagged and multi-dimensional arrays, returns an instance of .
Retrieves the of the provided .
The name of the field.
The serialization record, which can be any of ,
, or .
does not refer to a known member. You can use to check if given member exists.
The specified member is not a , but just a raw primitive value.
Identifies a class by its name and library id.
ClassTypeInfo structures are described in [MS-NRBF] 2.1.1.8.
Represents a class information that references another class record's metadata.
ClassWithId records are described in [MS-NRBF] 2.3.2.5.
Represents a class information with type info and the source library.
ClassWithMembersAndTypes records are described in [MS-NRBF] 2.3.2.1.
Represents an array of arrays.
BinaryArray records are described in [MS-NRBF] 2.4.3.1.
Represents a primitive value other than .
MemberPrimitiveTyped records are described in [MS-NRBF] 2.5.1.
Represents a record that contains a reference to another record that contains the actual value.
MemberReference records are described in [MS-NRBF] 2.5.3.
Member type info.
MemberTypeInfo structures are described in [MS-NRBF] 2.3.1.2.
Represents the record that marks the end of the binary format stream.
MessageEnd records are described in [MS-NRBF] 2.6.3.
Provides stateless methods for decoding .NET Remoting Binary Format (NRBF) encoded data.
Checks if given buffer starts with NRBF payload header.
The buffer to inspect.
if it starts with NRBF payload header; otherwise, .
Checks if given stream starts with NRBF payload header.
The stream to inspect. The stream must be both readable and seekable.
if it starts with NRBF payload header; otherwise, .
is .
The stream does not support reading or seeking.
The stream was closed.
An I/O error occurred.
When this method returns, will be restored to its original position.
Decodes the provided NRBF payload.
The NRBF payload.
Options to control behavior during parsing.
to leave payload open
after the reading is finished; otherwise, .
A that represents the root object.
It can be either ,
a or an .
is .
does not support reading or is already closed.
Reading from encounters invalid NRBF data.
An I/O error occurred.
Reading from encounters not supported records.
For example, arrays with non-zero offset or not supported record types
(, ,
or ).
Reading from
encounters an invalid UTF8 sequence.
The end of the stream is reached before reading record.
The NRBF payload.
When this method returns, contains a mapping of to the associated serialization record.
This parameter is treated as uninitialized.
An object that describes optional parameters to use.
to leave payload open
after the reading is finished; otherwise, .
Decodes the provided NRBF payload that is expected to contain an instance of any class (or struct) that is not an or a primitive type.
A that represents the root object.
This method is responsible for pushing only the FIRST read info
of the NESTED record into the .
It's not pushing all of them, because it could be used as a vector of attack.
Example: BinaryArrayRecord with Array.MaxLength length,
where first item turns out to be
that provides Array.MaxLength nulls.
Represents multiple (less than 256) .
ObjectNullMultiple256 records are described in [MS-NRBF] 2.5.6.
Represents multiple .
ObjectNullMultiple records are described in [MS-NRBF] 2.5.5.
Represents a .
ObjectNull records are described in [MS-NRBF] 2.5.4.
Defines a variety of configuration options for decoding NRBF payloads.
Initializes a instance with default values.
Configuration options for parsing instances.
Gets or sets a value that indicates whether type name truncation is undone.
if truncated type names should be reassembled; otherwise, .
Example:
TypeName: "Namespace.TypeName`1[[Namespace.GenericArgName"
LibraryName: "AssemblyName]]"
Is combined into "Namespace.TypeName`1[[Namespace.GenericArgName, AssemblyName]]"
Setting this to can render susceptible to Denial of Service
attacks when parsing or handling malicious input.
The default value is .
Primitive type.
PrimitiveTypeEnumeration enumeration is described in [MS-NRBF] 2.1.2.3.
Represents a record that itself represents a primitive value.
The NRBF specification considers the following types to be primitive:
, , ,
, , ,
, , , ,
, , ,
and .
Other serialization records are represented with or .
Gets the serialized primitive value.
The primitive value.
Represents a record that itself represents the primitive value of type.
The type of the primitive value.
The NRBF specification considers the following types to be primitive:
, , ,
, , ,
, , , ,
, , ,
and .
Other serialization records are represented with or .
Gets the serialized primitive value.
The primitive value.
Abstract class that represents the serialization record.
Every instance returned to the end user can be either ,
a , or an .
Gets the type of the record.
The type of the record.
Gets the ID of the record.
The ID of the record.
Gets the name of the serialized type.
The name of the serialized type.
Compares the type name read from the payload against the specified type.
This method ignores assembly names.
This method does NOT take into account member names or their types.
The type to compare against.
if the serialized type name match provided type; otherwise, .
is .
Gets the primitive, string or null record value.
For reference records, it returns the referenced record.
For other records, it returns the records themselves.
Overrides of this method should take care not to allow
the introduction of cycles, even in the face of adversarial
edges in the object graph.
The ID of .
Record type.
SerializationRecordType enumeration is described in [MS-NRBF] 2.1.2.1.
The NRBF header (the first record in NRBF payload).
Class information that references another class record's metadata.
A system class information without type info.
Not supported by design.
A class information with source library, but without type info.
Not supported by design.
A system class information with type info.
A class information with type info and the source library.
A .
An array of any rank or element type.
A primitive value other than .
A record that contains a reference to another record that contains the actual value.
A single value.
The record that marks the end of the binary format stream.
A record that associates a numeric identifier with a named library.
Multiple (less than 256) values.
Multiple .
A single-dimensional array of a primitive type.
A single-dimensional array of values.
A single-dimensional array of values.
A remote method call.
Not supported by design.
An information returned by a remote method.
Not supported by design.
Represents the NRBF header, it must be the first record in NRBF payload.
SerializedStreamHeader records are described in [MS-NRBF] 2.6.1.
Class information with type info.
SystemClassWithMembersAndType records are described in [MS-NRBF] 2.3.2.3.
Defines the core behavior for NRBF single dimensional, zero-indexed array records and provides a base for derived classes.
Gets the length of the array.
The length of the array.
When overridden in a derived class, allocates an array of and fills it with the data provided in the serialized records (in case of primitive types like or ) or the serialized records themselves.
to permit values within the array;
otherwise, .
An array filled with the data provided in the serialized records.
Reads a primitive of from the given .
Creates a object from raw data with validation.
was invalid.
The array contained null(s).
Invalid value: `{0}`.
Unexpected Null Record count.
{0} Record Type is not supported by design.
Invalid member reference.
Invalid type name.
Expected the array to be of type {0}, but its element type was {1}.
Invalid type or assembly name.
Duplicate member name.
Stream does not support seeking.
Duplicate Serialization Record Id: `{0}`.
Specified member '{0}' was not of the expected type.
Only arrays with zero offsets are supported.
Invalid assembly name.
Invalid format.
A surrogate character was read.