Show / Hide Table of Contents

Struct SequenceBinaryReader

Represents binary reader for the sequence of bytes.

Implements
IAsyncBinaryReader
Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: DotNext.IO
Assembly: DotNext.IO.dll
Syntax
public struct SequenceBinaryReader : IAsyncBinaryReader

Methods

| Improve this Doc View Source

Read(Memory<Byte>)

Copies the bytes from the sequence into contiguous block of memory.

Declaration
public void Read(Memory<byte> output)
Parameters
Type Name Description
Memory<Byte> output

The block of memory to fill.

Exceptions
Type Condition
EndOfStreamException

Unexpected end of sequence.

| Improve this Doc View Source

Read<T>()

Decodes the value of blittable type from the sequence of bytes.

Declaration
public T Read<T>()

    where T : struct
Returns
Type Description
T

The decoded value.

Type Parameters
Name Description
T

The type of the value to decode.

Exceptions
Type Condition
EndOfStreamException

Unexpected end of sequence.

| Improve this Doc View Source

ReadByte(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 8-bit unsigned integer from its string representation encoded in the underlying stream.

Declaration
public byte ReadByte(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Byte

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDateTime(StringLengthEncoding, DecodingContext, DateTimeStyles, IFormatProvider)

Parses DateTime from its string representation encoded in the underlying stream.

Declaration
public DateTime ReadDateTime(StringLengthEncoding lengthFormat, in DecodingContext context, DateTimeStyles style = DateTimeStyles.None, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

DateTimeStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
DateTime

The parsed value.

Exceptions
Type Condition
FormatException

The date/time is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDateTime(StringLengthEncoding, DecodingContext, String[], DateTimeStyles, IFormatProvider)

Parses DateTime from its string representation encoded in the underlying stream.

Declaration
public DateTime ReadDateTime(StringLengthEncoding lengthFormat, in DecodingContext context, string[] formats, DateTimeStyles style = DateTimeStyles.None, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

String[] formats

An array of allowable formats.

DateTimeStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
DateTime

The parsed value.

Exceptions
Type Condition
FormatException

The date/time is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDateTimeOffset(StringLengthEncoding, DecodingContext, DateTimeStyles, IFormatProvider)

Parses DateTimeOffset from its string representation encoded in the underlying stream.

Declaration
public DateTimeOffset ReadDateTimeOffset(StringLengthEncoding lengthFormat, in DecodingContext context, DateTimeStyles style = DateTimeStyles.None, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

DateTimeStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
DateTimeOffset

The parsed value.

Exceptions
Type Condition
FormatException

The date/time is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDateTimeOffset(StringLengthEncoding, DecodingContext, String[], DateTimeStyles, IFormatProvider)

Parses DateTimeOffset from its string representation encoded in the underlying stream.

Declaration
public DateTimeOffset ReadDateTimeOffset(StringLengthEncoding lengthFormat, in DecodingContext context, string[] formats, DateTimeStyles style = DateTimeStyles.None, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

String[] formats

An array of allowable formats.

DateTimeStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
DateTimeOffset

The parsed value.

Exceptions
Type Condition
FormatException

The date/time is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDecimal(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses Decimal from its string representation encoded in the underlying stream.

Declaration
public decimal ReadDecimal(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign | NumberStyles.AllowTrailingWhite | NumberStyles.Integer | NumberStyles.Number, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Decimal

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadDouble(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses double-precision floating-point number from its string representation encoded in the underlying stream.

Declaration
public double ReadDouble(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowThousands | NumberStyles.AllowTrailingWhite | NumberStyles.Float | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Double

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadGuid(StringLengthEncoding, DecodingContext)

Parses Guid from its string representation encoded in the underlying stream.

Declaration
public Guid ReadGuid(StringLengthEncoding lengthFormat, in DecodingContext context)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

Returns
Type Description
Guid

The parsed value.

Exceptions
Type Condition
FormatException

GUID value is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadGuid(StringLengthEncoding, DecodingContext, String)

Parses Guid from its string representation encoded in the underlying stream.

Declaration
public Guid ReadGuid(StringLengthEncoding lengthFormat, in DecodingContext context, string format)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

String format

The expected format of GUID value.

Returns
Type Description
Guid

The parsed value.

Exceptions
Type Condition
FormatException

GUID value is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt16(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 16-bit signed integer from its string representation encoded in the underlying stream.

Declaration
public short ReadInt16(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Int16

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt16(Boolean)

Decodes 16-bit signed integer using the specified endianness.

Declaration
public short ReadInt16(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
Int16

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt32(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 32-bit signed integer from its string representation encoded in the underlying stream.

Declaration
public int ReadInt32(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Int32

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt32(Boolean)

Decodes 32-bit signed integer using the specified endianness.

Declaration
public int ReadInt32(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
Int32

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt64(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 64-bit signed integer from its string representation encoded in the underlying stream.

Declaration
public long ReadInt64(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Int64

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadInt64(Boolean)

Decodes 64-bit signed integer using the specified endianness.

Declaration
public long ReadInt64(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
Int64

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadSByte(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 8-bit unsigned integer from its string representation encoded in the underlying stream.

Declaration
[CLSCompliant(false)]
public sbyte ReadSByte(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
SByte

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadSingle(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses single-precision floating-point number from its string representation encoded in the underlying stream.

Declaration
public float ReadSingle(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowThousands | NumberStyles.AllowTrailingWhite | NumberStyles.Float | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
Single

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadString(StringLengthEncoding, DecodingContext)

Decodes the string.

Declaration
public string ReadString(StringLengthEncoding lengthFormat, in DecodingContext context)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

Returns
Type Description
String

The decoded string.

Exceptions
Type Condition
EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadString(Int32, DecodingContext)

Decodes the string.

Declaration
public string ReadString(int length, in DecodingContext context)
Parameters
Type Name Description
Int32 length

The length of the encoded string, in bytes.

DecodingContext context

The decoding context containing string characters encoding.

Returns
Type Description
String

The decoded string.

Exceptions
Type Condition
EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadTimeSpan(StringLengthEncoding, DecodingContext, IFormatProvider)

Parses TimeSpan from its string representation encoded in the underlying stream.

Declaration
public TimeSpan ReadTimeSpan(StringLengthEncoding lengthFormat, in DecodingContext context, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
TimeSpan

The parsed value.

Exceptions
Type Condition
FormatException

The time span is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadTimeSpan(StringLengthEncoding, DecodingContext, String[], TimeSpanStyles, IFormatProvider)

Parses TimeSpan from its string representation encoded in the underlying stream.

Declaration
public TimeSpan ReadTimeSpan(StringLengthEncoding lengthFormat, in DecodingContext context, string[] formats, TimeSpanStyles style = TimeSpanStyles.None, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

String[] formats

An array of allowable formats.

TimeSpanStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
TimeSpan

The parsed value.

Exceptions
Type Condition
FormatException

The time span is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt16(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 16-bit unsigned integer from its string representation encoded in the underlying stream.

Declaration
[CLSCompliant(false)]
public ushort ReadUInt16(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
UInt16

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt16(Boolean)

Decodes 16-bit unsigned integer using the specified endianness.

Declaration
[CLSCompliant(false)]
public ushort ReadUInt16(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
UInt16

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt32(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 32-bit unsigned integer from its string representation encoded in the underlying stream.

Declaration
[CLSCompliant(false)]
public uint ReadUInt32(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
UInt32

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt32(Boolean)

Decodes 32-bit unsigned integer using the specified endianness.

Declaration
[CLSCompliant(false)]
public uint ReadUInt32(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
UInt32

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt64(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider)

Parses 64-bit unsigned integer from its string representation encoded in the underlying stream.

Declaration
[CLSCompliant(false)]
public ulong ReadUInt64(StringLengthEncoding lengthFormat, in DecodingContext context, NumberStyles style = NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.Integer, IFormatProvider provider = null)
Parameters
Type Name Description
StringLengthEncoding lengthFormat

The format of the string length encoded in the stream.

DecodingContext context

The decoding context containing string characters encoding.

NumberStyles style

A bitwise combination of the enumeration values that indicates the style elements.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
UInt64

The parsed value.

Exceptions
Type Condition
FormatException

The number is in incorrect format.

EndOfStreamException

The underlying source doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

ReadUInt64(Boolean)

Decodes 64-bit unsigned integer using the specified endianness.

Declaration
[CLSCompliant(false)]
public ulong ReadUInt64(bool littleEndian)
Parameters
Type Name Description
Boolean littleEndian

true if value is stored in the underlying binary stream as little-endian; otherwise, use big-endian.

Returns
Type Description
UInt64

The decoded value.

Exceptions
Type Condition
EndOfStreamException

The underlying sequence doesn't contain necessary amount of bytes to decode the value.

| Improve this Doc View Source

Reset()

Resets the reader so it can be used again.

Declaration
public void Reset()

Explicit Interface Implementations

| Improve this Doc View Source

IAsyncBinaryReader.CopyToAsync(IBufferWriter<Byte>, CancellationToken)

Declaration
Task IAsyncBinaryReader.CopyToAsync(IBufferWriter<byte> writer, CancellationToken token)
Parameters
Type Name Description
IBufferWriter<Byte> writer
CancellationToken token
Returns
Type Description
Task
| Improve this Doc View Source

IAsyncBinaryReader.CopyToAsync(PipeWriter, CancellationToken)

Declaration
Task IAsyncBinaryReader.CopyToAsync(PipeWriter output, CancellationToken token)
Parameters
Type Name Description
PipeWriter output
CancellationToken token
Returns
Type Description
Task
| Improve this Doc View Source

IAsyncBinaryReader.CopyToAsync(Stream, CancellationToken)

Declaration
Task IAsyncBinaryReader.CopyToAsync(Stream output, CancellationToken token)
Parameters
Type Name Description
Stream output
CancellationToken token
Returns
Type Description
Task
| Improve this Doc View Source

IAsyncBinaryReader.CopyToAsync<TArg>(ReadOnlySpanAction<Byte, TArg>, TArg, CancellationToken)

Declaration
Task IAsyncBinaryReader.CopyToAsync<TArg>(ReadOnlySpanAction<byte, TArg> reader, TArg arg, CancellationToken token)
Parameters
Type Name Description
ReadOnlySpanAction<Byte, TArg> reader
TArg arg
CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
TArg
| Improve this Doc View Source

IAsyncBinaryReader.CopyToAsync<TArg>(Func<ReadOnlyMemory<Byte>, TArg, CancellationToken, ValueTask>, TArg, CancellationToken)

Declaration
Task IAsyncBinaryReader.CopyToAsync<TArg>(Func<ReadOnlyMemory<byte>, TArg, CancellationToken, ValueTask> reader, TArg arg, CancellationToken token)
Parameters
Type Name Description
Func<ReadOnlyMemory<Byte>, TArg, CancellationToken, ValueTask> reader
TArg arg
CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
TArg
| Improve this Doc View Source

IAsyncBinaryReader.ReadAsync(Memory<Byte>, CancellationToken)

Declaration
ValueTask IAsyncBinaryReader.ReadAsync(Memory<byte> output, CancellationToken token)
Parameters
Type Name Description
Memory<Byte> output
CancellationToken token
Returns
Type Description
ValueTask
| Improve this Doc View Source

IAsyncBinaryReader.ReadAsync<T>(CancellationToken)

Declaration
ValueTask<T> IAsyncBinaryReader.ReadAsync<T>(CancellationToken token)

    where T : struct
Parameters
Type Name Description
CancellationToken token
Returns
Type Description
ValueTask<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

IAsyncBinaryReader.ReadByteAsync(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<byte> IAsyncBinaryReader.ReadByteAsync(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Byte>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDateTimeAsync(StringLengthEncoding, DecodingContext, DateTimeStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<DateTime> IAsyncBinaryReader.ReadDateTimeAsync(StringLengthEncoding lengthFormat, DecodingContext context, DateTimeStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
DateTimeStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<DateTime>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDateTimeAsync(StringLengthEncoding, DecodingContext, String[], DateTimeStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<DateTime> IAsyncBinaryReader.ReadDateTimeAsync(StringLengthEncoding lengthFormat, DecodingContext context, string[] formats, DateTimeStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
String[] formats
DateTimeStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<DateTime>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDateTimeOffsetAsync(StringLengthEncoding, DecodingContext, DateTimeStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<DateTimeOffset> IAsyncBinaryReader.ReadDateTimeOffsetAsync(StringLengthEncoding lengthFormat, DecodingContext context, DateTimeStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
DateTimeStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<DateTimeOffset>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDateTimeOffsetAsync(StringLengthEncoding, DecodingContext, String[], DateTimeStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<DateTimeOffset> IAsyncBinaryReader.ReadDateTimeOffsetAsync(StringLengthEncoding lengthFormat, DecodingContext context, string[] formats, DateTimeStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
String[] formats
DateTimeStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<DateTimeOffset>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDecimalAsync(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<decimal> IAsyncBinaryReader.ReadDecimalAsync(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Decimal>
| Improve this Doc View Source

IAsyncBinaryReader.ReadDoubleAsync(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<double> IAsyncBinaryReader.ReadDoubleAsync(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Double>
| Improve this Doc View Source

IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding, DecodingContext, String, CancellationToken)

Declaration
ValueTask<Guid> IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding lengthFormat, DecodingContext context, string format, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
String format
CancellationToken token
Returns
Type Description
ValueTask<Guid>
| Improve this Doc View Source

IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding, DecodingContext, CancellationToken)

Declaration
ValueTask<Guid> IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding lengthFormat, DecodingContext context, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
CancellationToken token
Returns
Type Description
ValueTask<Guid>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt16Async(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<short> IAsyncBinaryReader.ReadInt16Async(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Int16>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt16Async(Boolean, CancellationToken)

Declaration
ValueTask<short> IAsyncBinaryReader.ReadInt16Async(bool littleEndian, CancellationToken token)
Parameters
Type Name Description
Boolean littleEndian
CancellationToken token
Returns
Type Description
ValueTask<Int16>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt32Async(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<int> IAsyncBinaryReader.ReadInt32Async(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Int32>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt32Async(Boolean, CancellationToken)

Declaration
ValueTask<int> IAsyncBinaryReader.ReadInt32Async(bool littleEndian, CancellationToken token)
Parameters
Type Name Description
Boolean littleEndian
CancellationToken token
Returns
Type Description
ValueTask<Int32>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt64Async(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<long> IAsyncBinaryReader.ReadInt64Async(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Int64>
| Improve this Doc View Source

IAsyncBinaryReader.ReadInt64Async(Boolean, CancellationToken)

Declaration
ValueTask<long> IAsyncBinaryReader.ReadInt64Async(bool littleEndian, CancellationToken token)
Parameters
Type Name Description
Boolean littleEndian
CancellationToken token
Returns
Type Description
ValueTask<Int64>
| Improve this Doc View Source

IAsyncBinaryReader.ReadSingleAsync(StringLengthEncoding, DecodingContext, NumberStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<float> IAsyncBinaryReader.ReadSingleAsync(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
NumberStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<Single>
| Improve this Doc View Source

IAsyncBinaryReader.ReadStringAsync(StringLengthEncoding, DecodingContext, CancellationToken)

Declaration
ValueTask<string> IAsyncBinaryReader.ReadStringAsync(StringLengthEncoding lengthFormat, DecodingContext context, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
CancellationToken token
Returns
Type Description
ValueTask<String>
| Improve this Doc View Source

IAsyncBinaryReader.ReadStringAsync(Int32, DecodingContext, CancellationToken)

Declaration
ValueTask<string> IAsyncBinaryReader.ReadStringAsync(int length, DecodingContext context, CancellationToken token)
Parameters
Type Name Description
Int32 length
DecodingContext context
CancellationToken token
Returns
Type Description
ValueTask<String>
| Improve this Doc View Source

IAsyncBinaryReader.ReadTimeSpanAsync(StringLengthEncoding, DecodingContext, IFormatProvider, CancellationToken)

Declaration
ValueTask<TimeSpan> IAsyncBinaryReader.ReadTimeSpanAsync(StringLengthEncoding lengthFormat, DecodingContext context, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<TimeSpan>
| Improve this Doc View Source

IAsyncBinaryReader.ReadTimeSpanAsync(StringLengthEncoding, DecodingContext, String[], TimeSpanStyles, IFormatProvider, CancellationToken)

Declaration
ValueTask<TimeSpan> IAsyncBinaryReader.ReadTimeSpanAsync(StringLengthEncoding lengthFormat, DecodingContext context, string[] formats, TimeSpanStyles style, IFormatProvider provider, CancellationToken token)
Parameters
Type Name Description
StringLengthEncoding lengthFormat
DecodingContext context
String[] formats
TimeSpanStyles style
IFormatProvider provider
CancellationToken token
Returns
Type Description
ValueTask<TimeSpan>

Implements

IAsyncBinaryReader

Extension Methods

Sequence.Skip<TEnumerator, T>(ref TEnumerator, Int32)
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX