Class TextWriterSource
Represents TextWriter factory methods.
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.IO.dll
Syntax
public static class TextWriterSource
Methods
| Improve this Doc View SourceAsTextWriter<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
| Type | Name | Description |
|---|---|---|
| TWriter | writer | The buffer writer. |
| IFormatProvider | provider | The object that controls formatting. |
| Action<TWriter> | flush | The optional implementation of Flush() method. |
| Func<TWriter, CancellationToken, Task> | flushAsync | The optional implementation of FlushAsync() method. |
Returns
| Type | Description |
|---|---|
| TextWriter | The text writer backed by the buffer writer. |
Type Parameters
| Name | Description |
|---|---|
| TWriter | The type of the char buffer writer. |