Interface IWritesStreamToTextWriter
An object which writes the contents of a System.IO.Stream to a System.IO.TextWriter.
Namespace: ZptSharp
Assembly: ZptSharp.Abstractions.dll
Syntax
public interface IWritesStreamToTextWriter
Remarks
This service is provided as a convenience for when the developer wishes to write the contents of a stream into a text writer. This could be useful when dealing with the result of WriteDocumentAsync(IDocument, RenderingConfig, CancellationToken).
Methods
| Improve this Doc View SourceWriteToTextWriterAsync(Stream, TextWriter, CancellationToken)
Writes the contents of the stream
to the specified
writer
.
Declaration
Task WriteToTextWriterAsync(Stream stream, TextWriter writer, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream (source). |
System.IO.TextWriter | writer | The text writer (destination). |
System.Threading.CancellationToken | token | An optional cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task which indicates when the stream has been completely written to the text writer. |
Remarks
The implementation of this method provides a well-performing, asynchronous API to write the specified stream into the specified text writer.