Interface IWritesStreamToTextWriter
An object which writes the contents of a System.
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
Write
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. |
stream | The stream (source). |
System. |
writer | The text writer (destination). |
System. |
token | An optional cancellation token |
Returns
Type | Description |
---|---|
System. |
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.