Table of Contents

Class StringFactory

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Provides access to factory methods for creating and configuring encoded System.String instances.

public static class StringFactory
Inheritance
Object
StringFactory

Methods

CreateBinaryDigits(Byte[])

Creates a binary digits string representation from the specified value.

public static string CreateBinaryDigits(byte[] value)

Parameters

value Byte[]

The byte[] to convert.

Returns

String

A binary digits string representation that is equivalent to value.

Exceptions

System.ArgumentNullException

value cannot be null.

CreateHexadecimal(Byte[])

Creates a hexadecimal string representation from the specified value.

public static string CreateHexadecimal(byte[] value)

Parameters

value Byte[]

The byte[] to convert.

Returns

String

A hexadecimal string representation that is equivalent to value.

Exceptions

System.ArgumentNullException

value cannot be null.

CreateHexadecimal(String, Action<EncodingOptions>)

Creates a hexadecimal string representation from the specified value.

public static string CreateHexadecimal(string value, Action<EncodingOptions> setup = null)

Parameters

value String

The System.String to convert.

setup Action<EncodingOptions>

The EncodingOptions which may be configured.

Returns

String

A hexadecimal string representation that is equivalent to value.

Exceptions

System.ArgumentNullException

value cannot be null.

System.ComponentModel.InvalidEnumArgumentException

setup was initialized with an invalid PreambleSequence.

CreateProtocolRelativeUrl(Uri, Action<ProtocolRelativeUriStringOptions>)

Creates a protocol-relative URL string representation from the specified value.

public static string CreateProtocolRelativeUrl(Uri value, Action<ProtocolRelativeUriStringOptions> setup = null)

Parameters

value Uri

The System.Uri to convert.

setup Action<ProtocolRelativeUriStringOptions>

The ProtocolRelativeUriStringOptions which may be configured.

Returns

String

A protocol-relative URL string representation that is equivalent to value.

Exceptions

System.ArgumentNullException

value cannot be null.

ArgumentException

value must be an absolute URI.

CreateUriScheme(UriScheme)

Creates an URI scheme string representation from the specified value.

public static string CreateUriScheme(UriScheme value)

Parameters

value UriScheme

The UriScheme to convert.

Returns

String

An URI scheme string representation that is equivalent to value.

CreateUrlEncodedBase64(Byte[])

Creates a base64 string representation, in URL-safe characters, from the specified value.

public static string CreateUrlEncodedBase64(byte[] value)

Parameters

value Byte[]

The byte[] to convert.

Returns

String

A base64 string representation, in URL-safe characters, that is equivalent to value.

Remarks

Exceptions

System.ArgumentNullException

value cannot be null.