A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.IO.IAsyncBinaryWriter.html below:

Interface IAsyncBinaryWriter | .NEXT

Interface IAsyncBinaryWriter

Providers a uniform way to encode the data.

Namespace: DotNext.IO Assembly: DotNext.IO.dll Syntax
public interface IAsyncBinaryWriter : ISupplier<ReadOnlyMemory<byte>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask>>
Properties | Edit this page View Source Buffer

Gets buffer to modify.

Declaration
Memory<byte> Buffer { get; }
Property Value See Also Methods | Edit this page View Source AdvanceAsync(int, CancellationToken)

Instructs the writer that the specified number of bytes of Buffer is modified.

Declaration
ValueTask AdvanceAsync(int bytesWritten, CancellationToken token = default)
Parameters Type Name Description int bytesWritten

The number of written bytes to Buffer.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Exceptions | Edit this page View Source CopyFromAsync(PipeReader, long?, CancellationToken)

Writes the content from the specified pipe.

Declaration
ValueTask CopyFromAsync(PipeReader source, long? count = null, CancellationToken token = default)
Parameters Type Name Description PipeReader source

The pipe to read from.

long? count

The number of bytes to read from the source.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Exceptions | Edit this page View Source CopyFromAsync(Stream, long?, CancellationToken)

Writes the content from the specified stream.

Declaration
ValueTask CopyFromAsync(Stream source, long? count = null, CancellationToken token = default)
Parameters Type Name Description Stream source

The stream to read from the source.

long? count

The number of bytes to read from the source.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Exceptions | Edit this page View Source Create(IBufferWriter<byte>)

Creates default implementation of binary writer for the buffer writer.

Declaration
public static IAsyncBinaryWriter Create(IBufferWriter<byte> writer)
Parameters Returns Exceptions | Edit this page View Source Create(PipeWriter, long)

Creates default implementation of binary writer for the pipe.

Declaration
public static IAsyncBinaryWriter Create(PipeWriter output, long bufferSize = 0)
Parameters Type Name Description PipeWriter output

The stream instance.

long bufferSize

The maximum numbers of bytes that can be buffered in the memory without flushing.

Returns Exceptions | Edit this page View Source Create(Stream, Memory<byte>)

Creates default implementation of binary writer for the stream.

Declaration
public static IAsyncBinaryWriter Create(Stream output, Memory<byte> buffer)
Parameters Type Name Description Stream output

The stream instance.

Memory<byte> buffer

The buffer used for encoding binary data.

Returns Exceptions | Edit this page View Source EncodeAsync(ReadOnlyMemory<char>, EncodingContext, LengthFormat?, CancellationToken)

Encodes a block of characters using the specified encoding.

Declaration
ValueTask<long> EncodeAsync(ReadOnlyMemory<char> chars, EncodingContext context, LengthFormat? lengthFormat = null, CancellationToken token = default)
Parameters Returns Exceptions | Edit this page View Source FormatAsync<T>(T, EncodingContext, LengthFormat?, string?, IFormatProvider?, MemoryAllocator<char>?, CancellationToken)

Encodes formattable value as a set of characters using the specified encoding.

Declaration
ValueTask<long> FormatAsync<T>(T value, EncodingContext context, LengthFormat? lengthFormat = null, string? format = null, IFormatProvider? provider = null, MemoryAllocator<char>? allocator = null, CancellationToken token = default) where T : ISpanFormattable
Parameters Returns Type Parameters Name Description T

The type of formattable value.

Exceptions | Edit this page View Source FormatAsync<T>(T, LengthFormat?, string?, IFormatProvider?, CancellationToken)

Converts the value to UTF-8 encoded characters.

Declaration
ValueTask<int> FormatAsync<T>(T value, LengthFormat? lengthFormat, string? format = null, IFormatProvider? provider = null, CancellationToken token = default) where T : IUtf8SpanFormattable
Parameters Type Name Description T value

The value to convert.

LengthFormat? lengthFormat

String length encoding format.

string format

The format of the value.

IFormatProvider provider

The format provider.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<int>

The number of written bytes.

Type Parameters Name Description T

The type of the value to convert.

Exceptions | Edit this page View Source TryGetBufferWriter()

Attempts to get synchronous writer.

Declaration
IBufferWriter<byte>? TryGetBufferWriter()
Returns Type Description IBufferWriter<byte>

Synchronous writer wrapped by this asynchronous writer; or null if underlying I/O is fully asynchronous.

| Edit this page View Source WriteAsync(ReadOnlyMemory<byte>, LengthFormat?, CancellationToken)

Encodes a block of memory, optionally prefixed with the length encoded as a sequence of bytes according with the specified format.

Declaration
ValueTask WriteAsync(ReadOnlyMemory<byte> input, LengthFormat? lengthFormat = null, CancellationToken token = default)
Parameters Type Name Description ReadOnlyMemory<byte> input

A block of memory.

LengthFormat? lengthFormat

Indicates how the length of the BLOB must be encoded; or null to prevent length encoding.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Exceptions | Edit this page View Source WriteAsync<T>(T, CancellationToken)

Encodes formattable value as a set of bytes.

Declaration
ValueTask WriteAsync<T>(T value, CancellationToken token = default) where T : IBinaryFormattable<T>
Parameters Type Name Description T value

The value to be written as a sequence of bytes.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Type Parameters Name Description T

The type of formattable value.

Exceptions | Edit this page View Source WriteBigEndianAsync<T>(T, CancellationToken)

Writes integer value in big-endian format.

Declaration
ValueTask WriteBigEndianAsync<T>(T value, CancellationToken token = default) where T : IBinaryInteger<T>
Parameters Type Name Description T value

The value to be written in big-endian format.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Type Parameters Name Description T

The integer type.

Exceptions | Edit this page View Source WriteLittleEndianAsync<T>(T, CancellationToken)

Writes integer value in little-endian format.

Declaration
ValueTask WriteLittleEndianAsync<T>(T value, CancellationToken token = default) where T : IBinaryInteger<T>
Parameters Type Name Description T value

The value to be written in little-endian format.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Type Parameters Name Description T

The integer type.

Exceptions Extension Methods See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4