Table of Contents

ToStreamAsync Method

Definition

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

ToStreamAsync(string, Action<AsyncEncodingOptions>)

Converts the specified value to a Stream.

public static Task<Stream> ToStreamAsync(this string value, Action<AsyncEncodingOptions> setup = null)

Parameters

value string

The string to extend.

setup Action<AsyncEncodingOptions>

The AsyncEncodingOptions which may be configured.

Returns

Task<Stream>

A task that represents the asynchronous operation. The task result contains a Stream containing the result of the specified value.

Remarks

Exceptions

ArgumentNullException

value cannot be null.

InvalidEnumArgumentException

setup was initialized with an invalid Preamble.