ToEncodedStringAsync Method
Definition
- Namespace
- Cuemon.Extensions.IO
- Assemblies
- Cuemon.Extensions.IO.dll
ToEncodedStringAsync(Stream, Action<AsyncStreamEncodingOptions>)
Converts the specified value to a string.
public static Task<string> ToEncodedStringAsync(this Stream value, Action<AsyncStreamEncodingOptions> setup = null)
Parameters
valueStreamThe Stream to extend.
setupAction<AsyncStreamEncodingOptions>The AsyncStreamEncodingOptions 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 specified
value.
Remarks
IEncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.
Exceptions
- ArgumentNullException
valuecannot be null.- InvalidEnumArgumentException
setupwas initialized with an invalid Preamble.