ToEncodedStringAsync Method
Definition
- Assemblies
- Cuemon.IO.dll
ToEncodedStringAsync(IDecorator<Stream>, Action<AsyncStreamReaderOptions>)
public static Task<string> ToEncodedStringAsync(this IDecorator<Stream> decorator, Action<AsyncStreamReaderOptions> setup = null)
Parameters
decoratorIDecorator<Stream>The IDecorator<T> to extend.
setupAction<AsyncStreamReaderOptions>The AsyncStreamReaderOptions which may be configured.
Returns
- Task<string>
A task that represents the asynchronous operation. The task result contains a string containing the result of the enclosed Stream of the specified
decorator.
Remarks
IEncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.
Exceptions
- ArgumentNullException
decoratorcannot be null.- InvalidEnumArgumentException
setupwas initialized with an invalid Preamble.