Struct TextConsumer
Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to TextWriter.
Implements
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.dll
Syntax
public readonly record struct TextConsumer : IReadOnlySpanConsumer<char>, ISupplier<ReadOnlyMemory<char>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<char>, CancellationToken, ValueTask>>, IFlushable, IEquatable<TextConsumer>
Constructors
| Edit this page View SourceTextConsumer(TextWriter)
Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to TextWriter.
Declaration
public TextConsumer(TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | output | The text writer. |
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that the underlying text writer is null.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceToString()
Returns a string that represents the underlying writer.
Declaration
public override string? ToString()
Returns
Type | Description |
---|---|
string | A string that represents the underlying writer. |
Overrides
Operators
| Edit this page View Sourceimplicit operator TextConsumer(TextWriter)
Wraps the text writer.
Declaration
public static implicit operator TextConsumer(TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | output | The text writer. |
Returns
Type | Description |
---|---|
TextConsumer | The wrapped text writer. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|