Table of Contents

ToByteArray Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Extensions/StringDecoratorExtensions.cs

ToByteArray(IDecorator<string>, Action<EncodingOptions>)

Converts the enclosed string of the specified decorator to its equivalent byte array representation.

public static byte[] ToByteArray(this IDecorator<string> decorator, Action<EncodingOptions> setup = null)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

setup Action<EncodingOptions>

The EncodingOptions which may be configured.

Returns

byte[]

A byte array containing the result of the enclosed string of the specified decorator.

Exceptions

ArgumentNullException

decorator cannot be null.

InvalidEnumArgumentException

setup was initialized with an invalid Preamble.