Table of Contents

DelegatingTextWriter Class

Definition

Namespace
DotMake.CommandLine.Util
Assembly
DotMake.CommandLine.dll

Delegates all write operations to an underlying TextWriter.

public class DelegatingTextWriter : TextWriter, IAsyncDisposable, IDisposable
Inheritance
DelegatingTextWriter
Implements
Derived

Remarks

This class does not own the underlying writer unless explicitly configured.

Constructors

DelegatingTextWriter(TextWriter, bool)

Initializes a new instance of the DelegatingTextWriter class.

Fields

Inner

Properties

Encoding

When overridden in a derived class, returns the character encoding in which the output is written.

FormatProvider

Gets an object that controls formatting.

NewLine

Gets or sets the line terminator string used by the current TextWriter.

Methods

Dispose(bool)

Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources.

DisposeAsync()

Asynchronously releases all resources used by the TextWriter object.

Flush()

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

FlushAsync()

Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

Write(char)

Writes a character to the text stream.

Write(char[], int, int)

Writes a subarray of characters to the text stream.

Write(object?)

Writes the text representation of an object to the text stream by calling the ToString method on that object.

Write(string?)

Writes a string to the text stream.

WriteAsync(char)

Writes a character to the text stream asynchronously.

WriteAsync(char[], int, int)

Writes a subarray of characters to the text stream asynchronously.

WriteAsync(ReadOnlyMemory<char>, CancellationToken)

Asynchronously writes a character memory region to the text stream.

WriteAsync(string?)

Writes a string to the text stream asynchronously.

WriteLine()

Writes a line terminator to the text stream.

WriteLine(char)

Writes a character to the text stream, followed by a line terminator.

WriteLine(char[], int, int)

Writes a subarray of characters to the text stream, followed by a line terminator.

WriteLine(object?)

Writes the text representation of an object to the text stream, by calling the ToString method on that object, followed by a line terminator.

WriteLine(string?)

Writes a string to the text stream, followed by a line terminator.

WriteLineAsync()

Asynchronously writes a line terminator to the text stream.

WriteLineAsync(char)

Asynchronously writes a character to the text stream, followed by a line terminator.

WriteLineAsync(char[], int, int)

Asynchronously writes a subarray of characters to the text stream, followed by a line terminator.

WriteLineAsync(ReadOnlyMemory<char>, CancellationToken)

Asynchronously writes the text representation of a character memory region to the text stream, followed by a line terminator.

WriteLineAsync(string?)

Asynchronously writes a string to the text stream, followed by a line terminator.