Table of Contents

ToEncodedStringAsync Method

Definition

Namespace
Cuemon.IO
Assemblies
Cuemon.IO.dll
Source
src/Cuemon.IO/Extensions/StreamDecoratorExtensions.cs

ToEncodedStringAsync(IDecorator<Stream>, Action<AsyncStreamReaderOptions>)

Converts the enclosed Stream of the specified decorator to a string.

public static Task<string> ToEncodedStringAsync(this IDecorator<Stream> decorator, Action<AsyncStreamReaderOptions> setup = null)

Parameters

decorator IDecorator<Stream>

The IDecorator<T> to extend.

setup Action<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

Exceptions

ArgumentNullException

decorator cannot be null.

InvalidEnumArgumentException

setup was initialized with an invalid Preamble.