Class ByteArrayDecoratorExtensions
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Extension methods for the byte[] hidden behind the IDecorator<T> interface.
public static class ByteArrayDecoratorExtensions
- Inheritance
-
ByteArrayDecoratorExtensions
Methods
ToEncodedString(IDecorator<Byte[]>, Action<EncodingOptions>)
Converts the enclosed byte[] of the specified decorator
to its equivalent String representation.
public static string ToEncodedString(this IDecorator<byte[]> decorator, Action<EncodingOptions> setup = null)
Parameters
decorator
IDecorator<Byte[]>The IDecorator{byte[]} to extend.
setup
Action<EncodingOptions>The EncodingOptions which may be configured.
Returns
Remarks
EncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.
ToStream(IDecorator<Byte[]>)
Converts the enclosed byte[] of the specified decorator
to its equivalent Stream representation.
public static Stream ToStream(this IDecorator<byte[]> decorator)
Parameters
decorator
IDecorator<Byte[]>The IDecorator{byte[]} to extend.
Returns
Exceptions
- ArgumentNullException
decorator
cannot be null.
See Also
IDecorator<T>
Decorator<T>