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.TextStreamExtensions.html below:

Class TextStreamExtensions | .NEXT

Class TextStreamExtensions

Represents various extension methods for TextWriter and TextReader classes.

Inheritance

TextStreamExtensions

Namespace: DotNext.IO Assembly: DotNext.IO.dll Syntax
public static class TextStreamExtensions
Methods | Edit this page View Source AsTextReader(ReadOnlySequence<byte>, Encoding, int, MemoryAllocator<char>?)

Creates TextReader over the sequence of encoded characters.

Declaration
public static TextReader AsTextReader(this ReadOnlySequence<byte> sequence, Encoding encoding, int bufferSize = 1024, MemoryAllocator<char>? allocator = null)
Parameters Type Name Description ReadOnlySequence<byte> sequence

The sequence of bytes representing encoded characters.

Encoding encoding

The encoding of the characters in the sequence.

int bufferSize

The size of the internal char buffer used to decode characters.

MemoryAllocator<char> allocator

The allocator of the internal buffer.

Returns Type Description TextReader

The reader over the sequence of encoded characters.

Exceptions | Edit this page View Source AsTextReader(ReadOnlySequence<char>)

Creates TextReader over the sequence of characters.

Declaration
public static TextReader AsTextReader(this ReadOnlySequence<char> sequence)
Parameters Returns Type Description TextReader

The reader over the sequence of characters.

| Edit this page View Source AsTextWriter<TWriter>(TWriter, IFormatProvider?, Action<TWriter>?, Func<TWriter, CancellationToken, Task>?)

Creates text writer backed by the char buffer writer.

Declaration
public static TextWriter AsTextWriter<TWriter>(this TWriter writer, IFormatProvider? provider = null, Action<TWriter>? flush = null, Func<TWriter, CancellationToken, Task>? flushAsync = null) where TWriter : class, IBufferWriter<char>
Parameters Returns Type Description TextWriter

The text writer backed by the buffer writer.

Type Parameters Name Description TWriter

The type of the char buffer writer.

| Edit this page View Source AsTextWriter<TWriter>(TWriter, Encoding, IFormatProvider?, Action<TWriter>?, Func<TWriter, CancellationToken, Task>?)

Creates text writer backed by the byte buffer writer.

Declaration
public static TextWriter AsTextWriter<TWriter>(this TWriter writer, Encoding encoding, IFormatProvider? provider = null, Action<TWriter>? flush = null, Func<TWriter, CancellationToken, Task>? flushAsync = null) where TWriter : class, IBufferWriter<byte>
Parameters Returns Type Description TextWriter

The text writer backed by the buffer writer.

Type Parameters Name Description TWriter

The type of the char buffer writer.

Exceptions | Edit this page View Source ReadAllAsync(TextReader, int, MemoryAllocator<char>?, CancellationToken)

Reads text stream sequentially.

Declaration
public static IAsyncEnumerable<ReadOnlyMemory<char>> ReadAllAsync(this TextReader reader, int bufferSize, MemoryAllocator<char>? allocator = null, CancellationToken token = default)
Parameters Returns Exceptions | Edit this page View Source Write(TextWriter, MemoryAllocator<char>?, ref PoolingInterpolatedStringHandler)

Writes interpolated string and appends a new line after it.

Declaration
public static void Write(this TextWriter writer, MemoryAllocator<char>? allocator, ref PoolingInterpolatedStringHandler handler)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

| Edit this page View Source Write(TextWriter, MemoryAllocator<char>?, IFormatProvider?, ref PoolingInterpolatedStringHandler)

Writes interpolated string and appends a new line after it.

Declaration
public static void Write(this TextWriter writer, MemoryAllocator<char>? allocator, IFormatProvider? provider, ref PoolingInterpolatedStringHandler handler)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

IFormatProvider provider

Optional formatting provider to be applied for each interpolated string argument.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

| Edit this page View Source WriteAsync(TextWriter, MemoryAllocator<char>?, ref PoolingInterpolatedStringHandler, CancellationToken)

Writes interpolated string.

Declaration
public static ValueTask WriteAsync(this TextWriter writer, MemoryAllocator<char>? allocator, ref PoolingInterpolatedStringHandler handler, CancellationToken token = default)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

A task that represents the asynchronous write operation.

| Edit this page View Source WriteAsync(TextWriter, MemoryAllocator<char>?, IFormatProvider?, ref PoolingInterpolatedStringHandler, CancellationToken)

Writes interpolated string.

Declaration
public static ValueTask WriteAsync(this TextWriter writer, MemoryAllocator<char>? allocator, IFormatProvider? provider, ref PoolingInterpolatedStringHandler handler, CancellationToken token = default)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

IFormatProvider provider

Optional formatting provider to be applied for each interpolated string argument.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

A task that represents the asynchronous write operation.

| Edit this page View Source WriteAsync(TextWriter, ReadOnlySequence<char>, CancellationToken)

Asynchronously writes a linked regions of characters to the text stream.

Declaration
public static ValueTask WriteAsync(this TextWriter writer, ReadOnlySequence<char> chars, CancellationToken token = default)
Parameters Returns Type Description ValueTask

The task representing asynchronous execution of this method.

Exceptions | Edit this page View Source WriteLine(TextWriter, MemoryAllocator<char>?, ref PoolingInterpolatedStringHandler)

Writes interpolated string and appends a new line after it.

Declaration
public static void WriteLine(this TextWriter writer, MemoryAllocator<char>? allocator, ref PoolingInterpolatedStringHandler handler)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

| Edit this page View Source WriteLine(TextWriter, MemoryAllocator<char>?, IFormatProvider?, ref PoolingInterpolatedStringHandler)

Writes interpolated string and appends a new line after it.

Declaration
public static void WriteLine(this TextWriter writer, MemoryAllocator<char>? allocator, IFormatProvider? provider, ref PoolingInterpolatedStringHandler handler)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

IFormatProvider provider

Optional formatting provider to be applied for each interpolated string argument.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

| Edit this page View Source WriteLineAsync(TextWriter, MemoryAllocator<char>?, ref PoolingInterpolatedStringHandler, CancellationToken)

Writes interpolated string and appends a new line after it.

Declaration
public static ValueTask WriteLineAsync(this TextWriter writer, MemoryAllocator<char>? allocator, ref PoolingInterpolatedStringHandler handler, CancellationToken token = default)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

A task that represents the asynchronous write operation.

| Edit this page View Source WriteLineAsync(TextWriter, MemoryAllocator<char>?, IFormatProvider?, ref PoolingInterpolatedStringHandler, CancellationToken)

Writes interpolated string and appends a new line after it.

Declaration
public static ValueTask WriteLineAsync(this TextWriter writer, MemoryAllocator<char>? allocator, IFormatProvider? provider, ref PoolingInterpolatedStringHandler handler, CancellationToken token = default)
Parameters Type Name Description TextWriter writer

An output for the interpolated string.

MemoryAllocator<char> allocator

The allocator for the buffer used by string interpolation handler.

IFormatProvider provider

Optional formatting provider to be applied for each interpolated string argument.

PoolingInterpolatedStringHandler handler

The interpolated string handler.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask

A task that represents the asynchronous write operation.


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