websocket-sharp : WebSocketSharp Namespace

# Ext Class

Provides a set of static methods for the websocket-sharp.

## Syntax

public static class Ext

## Remarks

Documentation for this section has not yet been entered.

## Requirements

Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)

## Members

See Also: Inherited members from object.

## Public Methods

static | AcceptWebSocket (this System.Net.Sockets.TcpListener, bool) : WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext Accepts a WebSocket connection by the System.Net.Sockets.TcpListener.
static | AcceptWebSocketAsync (this System.Net.Sockets.TcpListener, bool, Action<WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext>) Accepts a WebSocket connection asynchronously by the System.Net.Sockets.TcpListener.
static | Emit (this EventHandler, object, EventArgs) Emit the specified EventHandler delegate if is not `null`.
static | Emit<TEventArgs> (this EventHandler<TEventArgs>, object, TEventArgs) Emit the specified EventHandler<TEventArgs> delegate if is not `null`.
static | EqualsAndSaveTo (this int, char, List<byte>) : bool Determines whether the specified int equals the specified char as byte. And save this specified int as byte to the specified List<byte>.
static | Exists (this System.Collections.Specialized.NameValueCollection, string) : bool Determines whether the entry with the specified key exists in the specified System.Collections.Specialized.NameValueCollection.
static | Exists (this System.Collections.Specialized.NameValueCollection, string, string) : bool Determines whether the entry with the specified both key and value exists in the specified System.Collections.Specialized.NameValueCollection.
static | GetAbsolutePath (this Uri) : string Gets the absolute path from the specified Uri.
static | GetDescription (this WebSocketSharp.Net.HttpStatusCode) : string Gets the description of the HTTP status code using the specified WebSocketSharp.Net.HttpStatusCode.
static | GetName (this string, string) : string Gets the name from the specified string that contains a pair of name and value are separated by a separator string.
static | GetNameAndValue (this string, string) : KeyValuePair<string, string> Gets the name and value from the specified string that contains a pair of name and value are separated by a separator string.
static | GetStatusDescription (this int) : string Gets the description of the HTTP status code using the specified int.
static | GetValue (this string, string) : string Gets the value from the specified string that contains a pair of name and value are separated by a separator string.
static | IsEmpty (this string) : bool Determines whether the specified string is a string.Empty.
static | IsHostOrder (this ByteOrder) : bool Determines whether the specified WebSocketSharp.ByteOrder is host (this computer architecture) byte order.
static | IsNull<T> (this T) : bool Determines whether the specified object is `null`.
static | IsNullDo<T> (this T, Action) : bool Determines whether the specified object is `null`. And invokes the specified Action delegate if the specified object is `null`.
static | IsNullOrEmpty (this string) : bool Determines whether the specified string is `null` or string.Empty.
static | IsPredefinedScheme (this string) : bool Determines whether the specified string is predefined scheme.
static | IsUpgradeTo (this WebSocketSharp.Net.HttpListenerRequest, string) : bool Determines whether the specified WebSocketSharp.Net.HttpListenerRequest is the HTTP Upgrade request to switch to the specified protocol.
static | IsValidAbsolutePath (this string, out string) : bool Determines whether the specified string is valid absolute path.
static | MaybeUri (this string) : bool Determines whether the specified string is a URI string.
static | NotEqual (this string, string, bool) : bool Determines whether two specified string objects don't have the same value.
static | ReadBytes (this System.IO.Stream, int) : byte[] Reads a block of bytes from the specified stream and returns the read data in an array of byte.
static | ReadBytes (this System.IO.Stream, long) : byte[] Reads a block of bytes from the specified stream and returns the read data in an array of byte.
static | ReadBytes (this System.IO.Stream, long, int) : byte[] Reads a block of bytes from the specified stream and returns the read data in an array of byte.
static | SubArray<T> (this T[], int, int) : T[] Retrieves a sub-array from the specified array. A sub-array starts at the specified element position.
static | Times (this int, Action) Executes the specified Action delegate n times.
static | Times (this int, Action<ulong>) Executes the specified Action<ulong> delegate n times.
static | Times (this long, Action) Executes the specified Action delegate n times.
static | Times (this long, Action<ulong>) Executes the specified Action<ulong> delegate n times.
static | Times (this uint, Action) Executes the specified Action delegate n times.
static | Times (this uint, Action<ulong>) Executes the specified Action<ulong> delegate n times.
static | Times (this ulong, Action) Executes the specified Action delegate n times.
static | Times (this ulong, Action<ulong>) Executes the specified Action<ulong> delegate n times.
static | To<T> (this byte[], ByteOrder) : T Converts the specified array of byte to the specified type data.
static | ToBytes<T> (this T, ByteOrder) : byte[] Converts the specified data to an array of byte.
static | ToHostOrder (this byte[], ByteOrder) : byte[] Converts the order of the specified array of byte to the host byte order.
static | ToString<T> (this T[], string) : string Converts the specified array to a string concatenated the specified separator string between each element of this array.
static | ToUri (this string) : Uri Converts the specified string to a Uri object.
static | TryCreateWebSocketUri (this string, out Uri, out string) : bool Tries to create a new WebSocket Uri using the specified uriString.
static | UrlDecode (this string) : string URL-decodes the specified string.
static | UrlEncode (this string) : string URL-encodes the specified string.
static | WriteContent (this WebSocketSharp.Net.HttpListenerResponse, byte[]) Writes the specified content data using the specified WebSocketSharp.Net.HttpListenerResponse.

## Member Details

### AcceptWebSocket Method

> Accepts a WebSocket connection by the System.Net.Sockets.TcpListener.

> ## Syntax

> public static WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext AcceptWebSocket (this System.Net.Sockets.TcpListener listener, bool secure)

> #### Parameters

> > listener
> >   A System.Net.Sockets.TcpListener that provides a TCP connection to accept a WebSocket connection.
> > secure
> >   A bool that indicates a secure connection or not. (`true` indicates a secure connection.)

> #### Returns

> > A WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext that contains a WebSocket connection.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | listener is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### AcceptWebSocketAsync Method

> Accepts a WebSocket connection asynchronously by the System.Net.Sockets.TcpListener.

> ## Syntax

> public static void AcceptWebSocketAsync (this System.Net.Sockets.TcpListener listener, bool secure, Action<WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext> completed)

> #### Parameters

> > listener
> >   A System.Net.Sockets.TcpListener that provides a TCP connection to accept a WebSocket connection.
> > secure
> >   A bool that indicates a secure connection or not. (`true` indicates a secure connection.)
> > completed
> >   An Action<TcpListenerWebSocketContext> delegate that contains the method(s) that is called when an asynchronous operation completes.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | listener is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Emit Method

> Emit the specified EventHandler delegate if is not `null`.

> ## Syntax

> public static void Emit (this EventHandler eventHandler, object sender, EventArgs e)

> #### Parameters

> > eventHandler
> >   An EventHandler to emit.
> > sender
> >   An object that emits the eventHandler.
> > e
> >   An EventArgs that contains no event data.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Emit<TEventArgs> Generic Method

> Emit the specified EventHandler<TEventArgs> delegate if is not `null`.

> ## Syntax

> public static void Emit<TEventArgs> (this EventHandler<TEventArgs> eventHandler, object sender, TEventArgs e)
> where TEventArgs : EventArgs

> #### Type Parameters

> > TEventArgs
> >   The type of the event data generated by the event.

> #### Parameters

> > eventHandler
> >   An EventHandler<TEventArgs> to emit.
> > sender
> >   An object that emits the eventHandler.
> > e
> >   A TEventArgs that contains the event data.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### EqualsAndSaveTo Method

> Determines whether the specified int equals the specified char as byte. And save this specified int as byte to the specified List<byte>.

> ## Syntax

> public static bool EqualsAndSaveTo (this int value, char c, List<byte> dest)

> #### Parameters

> > value
> >   An int to compare.
> > c
> >   A char to compare.
> > dest
> >   A List<byte> to save the value as byte.

> #### Returns

> > `true` if the value parameter equals the c parameter as byte; otherwise, `false`.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentOutOfRangeException | Is thrown when the value parameter passed to a method is invalid because it is outside the allowable range of values as byte.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Exists Method

> Determines whether the entry with the specified key exists in the specified System.Collections.Specialized.NameValueCollection.

> ## Syntax

> public static bool Exists (this System.Collections.Specialized.NameValueCollection collection, string name)

> #### Parameters

> > collection
> >   A System.Collections.Specialized.NameValueCollection that contains the entries.
> > name
> >   A string that contains the key of the entry to find.

> #### Returns

> > `true` if the entry with the name exists in the collection; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Exists Method

> Determines whether the entry with the specified both key and value exists in the specified System.Collections.Specialized.NameValueCollection.

> ## Syntax

> public static bool Exists (this System.Collections.Specialized.NameValueCollection collection, string name, string value)

> #### Parameters

> > collection
> >   A System.Collections.Specialized.NameValueCollection that contains the entries.
> > name
> >   A string that contains the key of the entry to find.
> > value
> >   A string that contains the value of the entry to find.

> #### Returns

> > `true` if the entry with the both name and value exists in the collection; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetAbsolutePath Method

> Gets the absolute path from the specified Uri.

> ## Syntax

> public static string GetAbsolutePath (this Uri uri)

> #### Parameters

> > uri
> >   A Uri that contains the URI to get the absolute path from.

> #### Returns

> > A string that contains the absolute path if got successfully; otherwise, `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetDescription Method

> Gets the description of the HTTP status code using the specified WebSocketSharp.Net.HttpStatusCode.

> ## Syntax

> public static string GetDescription (this WebSocketSharp.Net.HttpStatusCode code)

> #### Parameters

> > code
> >   One of WebSocketSharp.Net.HttpStatusCode values that contains an HTTP status code.

> #### Returns

> > A string that contains the description of the HTTP status code.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetName Method

> Gets the name from the specified string that contains a pair of name and value are separated by a separator string.

> ## Syntax

> public static string GetName (this string nameAndValue, string separator)

> #### Parameters

> > nameAndValue
> >   A string that contains a pair of name and value are separated by a separator string.
> > separator
> >   A string that contains a separator string.

> #### Returns

> > A string that contains the name if any; otherwise, `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetNameAndValue Method

> Gets the name and value from the specified string that contains a pair of name and value are separated by a separator string.

> ## Syntax

> public static KeyValuePair<string, string> GetNameAndValue (this string nameAndValue, string separator)

> #### Parameters

> > nameAndValue
> >   A string that contains a pair of name and value are separated by a separator string.
> > separator
> >   A string that contains a separator string.

> #### Returns

> > A KeyValuePair<string, string> that contains the name and value if any.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetStatusDescription Method

> Gets the description of the HTTP status code using the specified int.

> ## Syntax

> public static string GetStatusDescription (this int code)

> #### Parameters

> > code
> >   An int that contains an HTTP status code.

> #### Returns

> > A string that contains the description of the HTTP status code.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetValue Method

> Gets the value from the specified string that contains a pair of name and value are separated by a separator string.

> ## Syntax

> public static string GetValue (this string nameAndValue, string separator)

> #### Parameters

> > nameAndValue
> >   A string that contains a pair of name and value are separated by a separator string.
> > separator
> >   A string that contains a separator string.

> #### Returns

> > A string that contains the value if any; otherwise, `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsEmpty Method

> Determines whether the specified string is a string.Empty.

> ## Syntax

> public static bool IsEmpty (this string value)

> #### Parameters

> > value
> >   A string to test.

> #### Returns

> > `true` if the value parameter is a string.Empty; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsHostOrder Method

> Determines whether the specified WebSocketSharp.ByteOrder is host (this computer architecture) byte order.

> ## Syntax

> public static bool IsHostOrder (this ByteOrder order)

> #### Parameters

> > order
> >   A WebSocketSharp.ByteOrder to test.

> #### Returns

> > `true` if the order parameter is host byte order; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsNull<T> Generic Method

> Determines whether the specified object is `null`.

> ## Syntax

> public static bool IsNull<T> (this T obj)
> where T : class

> #### Type Parameters

> > T
> >   The type of the obj parameter.

> #### Parameters

> > obj
> >   A class to test.

> #### Returns

> > `true` if the obj parameter is `null`; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsNullDo<T> Generic Method

> Determines whether the specified object is `null`. And invokes the specified Action delegate if the specified object is `null`.

> ## Syntax

> public static bool IsNullDo<T> (this T obj, Action act)
> where T : class

> #### Type Parameters

> > T
> >   The type of the obj parameter.

> #### Parameters

> > obj
> >   A class to test.
> > act
> >   An Action delegate that contains the method(s) called if the obj is `null`.

> #### Returns

> > `true` if the obj parameter is `null`; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsNullOrEmpty Method

> Determines whether the specified string is `null` or string.Empty.

> ## Syntax

> public static bool IsNullOrEmpty (this string value)

> #### Parameters

> > value
> >   A string to test.

> #### Returns

> > `true` if the value parameter is `null` or string.Empty; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsPredefinedScheme Method

> Determines whether the specified string is predefined scheme.

> ## Syntax

> public static bool IsPredefinedScheme (this string scheme)

> #### Parameters

> > scheme
> >   A string to test.

> #### Returns

> > `true` if the scheme parameter is the predefined scheme; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsUpgradeTo Method

> Determines whether the specified WebSocketSharp.Net.HttpListenerRequest is the HTTP Upgrade request to switch to the specified protocol.

> ## Syntax

> public static bool IsUpgradeTo (this WebSocketSharp.Net.HttpListenerRequest request, string protocol)

> #### Parameters

> > request
> >   A WebSocketSharp.Net.HttpListenerRequest that contains an HTTP request information.
> > protocol
> >   A string that contains a protocol name.

> #### Returns

> > `true` if the specified WebSocketSharp.Net.HttpListenerRequest is the HTTP Upgrade request to switch to the specified protocol; otherwise, `false`.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | request is `null`. -or- protocol is `null`.
> > ArgumentException | protocol is string.Empty.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsValidAbsolutePath Method

> Determines whether the specified string is valid absolute path.

> ## Syntax

> public static bool IsValidAbsolutePath (this string absPath, out string message)

> #### Parameters

> > absPath
> >   A string to test.
> > message
> >   A string that receives a message if the absPath is invalid.

> #### Returns

> > `true` if the absPath parameter is valid absolute path; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### MaybeUri Method

> Determines whether the specified string is a URI string.

> ## Syntax

> public static bool MaybeUri (this string uriString)

> #### Parameters

> > uriString
> >   A string to test.

> #### Returns

> > `true` if the uriString parameter is maybe a URI string; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### NotEqual Method

> Determines whether two specified string objects don't have the same value.

> ## Syntax

> public static bool NotEqual (this string expected, string actual, bool ignoreCase)

> #### Parameters

> > expected
> >   The first string to compare.
> > actual
> >   The second string to compare.
> > ignoreCase
> >   A bool that indicates a case-sensitive or insensitive comparison. (`true` indicates a case-insensitive comparison.)

> #### Returns

> > `true` if the value of expected parameter isn't the same as the value of actual parameter; otherwise, `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ReadBytes Method

> Reads a block of bytes from the specified stream and returns the read data in an array of byte.

> ## Syntax

> public static byte[] ReadBytes (this System.IO.Stream stream, int length)

> #### Parameters

> > stream
> >   A System.IO.Stream that contains the data to read.
> > length
> >   An int that contains the number of bytes to read.

> #### Returns

> > An array of byte that receives the read data.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ReadBytes Method

> Reads a block of bytes from the specified stream and returns the read data in an array of byte.

> ## Syntax

> public static byte[] ReadBytes (this System.IO.Stream stream, long length)

> #### Parameters

> > stream
> >   A System.IO.Stream that contains the data to read.
> > length
> >   A long that contains the number of bytes to read.

> #### Returns

> > An array of byte that receives the read data.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ReadBytes Method

> Reads a block of bytes from the specified stream and returns the read data in an array of byte.

> ## Syntax

> public static byte[] ReadBytes (this System.IO.Stream stream, long length, int bufferLength)

> #### Parameters

> > stream
> >   A System.IO.Stream that contains the data to read.
> > length
> >   A long that contains the number of bytes to read.
> > bufferLength
> >   An int that contains the buffer size in bytes of each internal read.

> #### Returns

> > An array of byte that receives the read data.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### SubArray<T> Generic Method

> Retrieves a sub-array from the specified array. A sub-array starts at the specified element position.

> ## Syntax

> public static T[] SubArray<T> (this T[] array, int startIndex, int length)

> #### Type Parameters

> > T
> >   The type of elements in the array.

> #### Parameters

> > array
> >   An array of T that contains the data to retrieve a sub-array.
> > startIndex
> >   An int that contains the zero-based starting position of a sub-array in the array.
> > length
> >   An int that contains the number of elements to retrieve a sub-array.

> #### Returns

> > An array of T that receives a sub-array, or an empty array of T if any problems with the parameters.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action delegate n times.

> ## Syntax

> public static void Times (this int n, Action act)

> #### Parameters

> > n
> >   An int that contains the number of times to execute.
> > act
> >   An Action delegate that contains the method(s) to execute.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action<ulong> delegate n times.

> ## Syntax

> public static void Times (this int n, Action<ulong> act)

> #### Parameters

> > n
> >   An int that contains the number of times to execute.
> > act
> >   An Action<ulong> delegate that contains the method(s) to execute. A ulong parameter to pass to this method(s) contains the zero-based count of iteration.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action delegate n times.

> ## Syntax

> public static void Times (this long n, Action act)

> #### Parameters

> > n
> >   A long that contains the number of times to execute.
> > act
> >   An Action delegate that contains the method(s) to execute.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action<ulong> delegate n times.

> ## Syntax

> public static void Times (this long n, Action<ulong> act)

> #### Parameters

> > n
> >   A long that contains the number of times to execute.
> > act
> >   An Action<ulong> delegate that contains the method(s) to execute. A ulong parameter to pass to this method(s) contains the zero-based count of iteration.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action delegate n times.

> ## Syntax

> public static void Times (this uint n, Action act)

> #### Parameters

> > n
> >   A uint that contains the number of times to execute.
> > act
> >   An Action delegate that contains the method(s) to execute.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action<ulong> delegate n times.

> ## Syntax

> public static void Times (this uint n, Action<ulong> act)

> #### Parameters

> > n
> >   A uint that contains the number of times to execute.
> > act
> >   An Action<ulong> delegate that contains the method(s) to execute. A ulong parameter to pass to this method(s) contains the zero-based count of iteration.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action delegate n times.

> ## Syntax

> public static void Times (this ulong n, Action act)

> #### Parameters

> > n
> >   A ulong that contains the number of times to execute.
> > act
> >   An Action delegate that contains the method(s) to execute.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Times Method

> Executes the specified Action<ulong> delegate n times.

> ## Syntax

> public static void Times (this ulong n, Action<ulong> act)

> #### Parameters

> > n
> >   A ulong that contains the number of times to execute.
> > act
> >   An Action<ulong> delegate that contains the method(s) to execute. A ulong parameter to pass to this method(s) contains the zero-based count of iteration.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### To<T> Generic Method

> Converts the specified array of byte to the specified type data.

> ## Syntax

> public static T To<T> (this byte[] src, ByteOrder srcOrder)
> where T : struct

> #### Type Parameters

> > T
> >   The type of the return value. The T must be a value type.

> #### Parameters

> > src
> >   An array of byte to convert.
> > srcOrder
> >   A WebSocketSharp.ByteOrder that indicates the byte order of the src.

> #### Returns

> > A T converted from the src, or a default value of T if the src is an empty array of byte or if the types of T aren't the bool, char, double, float, int, long, short, uint, ulong, ushort.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | Is thrown when the src parameter passed to a method is invalid because it is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ToBytes<T> Generic Method

> Converts the specified data to an array of byte.

> ## Syntax

> public static byte[] ToBytes<T> (this T value, ByteOrder order)
> where T : struct

> #### Type Parameters

> > T
> >   The type of the value. The T must be a value type.

> #### Parameters

> > value
> >   A T to convert.
> > order
> >   A WebSocketSharp.ByteOrder that indicates the byte order of the return.

> #### Returns

> > An array of byte converted from the value.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ToHostOrder Method

> Converts the order of the specified array of byte to the host byte order.

> ## Syntax

> public static byte[] ToHostOrder (this byte[] src, ByteOrder srcOrder)

> #### Parameters

> > src
> >   An array of byte to convert.
> > srcOrder
> >   A WebSocketSharp.ByteOrder that indicates the byte order of the src.

> #### Returns

> > An array of byte converted from the src.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | Is thrown when the src parameter passed to a method is invalid because it is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ToString<T> Generic Method

> Converts the specified array to a string concatenated the specified separator string between each element of this array.

> ## Syntax

> public static string ToString<T> (this T[] array, string separator)

> #### Type Parameters

> > T
> >   The type of elements in the array.

> #### Parameters

> > array
> >   An array of T to convert.
> > separator
> >   A string that contains a separator string.

> #### Returns

> > A string converted from the array parameter, or a string.Empty if the length of the array is zero.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | Is thrown when the array parameter passed to a method is invalid because it is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### ToUri Method

> Converts the specified string to a Uri object.

> ## Syntax

> public static Uri ToUri (this string uriString)

> #### Parameters

> > uriString
> >   A string to convert.

> #### Returns

> > A Uri converted from the uriString parameter, or `null` if the uriString is `null` or string.Empty.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### TryCreateWebSocketUri Method

> Tries to create a new WebSocket Uri using the specified uriString.

> ## Syntax

> public static bool TryCreateWebSocketUri (this string uriString, out Uri result, out string message)

> #### Parameters

> > uriString
> >   A string that contains a WebSocket URI.
> > result
> >   When this method returns, contains a created WebSocket Uri if the uriString parameter is valid WebSocket URI; otherwise, `null`.
> > message
> >   When this method returns, contains a error message string if the uriString parameter is invalid WebSocket URI; otherwise, `String.Empty`.

> #### Returns

> > `true` if the WebSocket Uri was successfully created; otherwise, `false`.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | Is thrown when the uriString parameter passed to a method is invalid because it is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### UrlDecode Method

> URL-decodes the specified string.

> ## Syntax

> public static string UrlDecode (this string s)

> #### Parameters

> > s
> >   A string to decode.

> #### Returns

> > A string that receives a decoded string, or the s parameter if the s is `null` or string.Empty.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### UrlEncode Method

> URL-encodes the specified string.

> ## Syntax

> public static string UrlEncode (this string s)

> #### Parameters

> > s
> >   A string to encode.

> #### Returns

> > A string that receives a encoded string, or the s parameter if the s is `null` or string.Empty.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)

### WriteContent Method

> Writes the specified content data using the specified WebSocketSharp.Net.HttpListenerResponse.

> ## Syntax

> public static void WriteContent (this WebSocketSharp.Net.HttpListenerResponse response, byte[] content)

> #### Parameters

> > response
> >   A WebSocketSharp.Net.HttpListenerResponse that contains a network stream to write a content data.
> > content
> >   An array of byte that contains a content data to write.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | Is thrown when the response parameter passed to a method is invalid because it is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp
> Assembly: websocket-sharp (in websocket-sharp.dll)