EGDL2 2.1
|
Provides a set of static methods for the websocket-sharp. More...
Static Public Member Functions | |
static bool | Contains (this string value, params char[] chars) |
Determines whether the specified string contains any of characters in the specified array of char. | |
static bool | Contains (this NameValueCollection collection, string name) |
Determines whether the specified NameValueCollection contains the entry with the specified name . | |
static bool | Contains (this NameValueCollection collection, string name, string value) |
Determines whether the specified NameValueCollection contains the entry with the specified both name and value . | |
static void | Emit (this EventHandler eventHandler, object sender, EventArgs e) |
Emits the specified EventHandler delegate if it isn't null . | |
static void | Emit< TEventArgs > (this EventHandler< TEventArgs > eventHandler, object sender, TEventArgs e) |
Emits the specified EventHandler<TEventArgs> delegate if it isn't null . | |
static CookieCollection | GetCookies (this NameValueCollection headers, bool response) |
Gets the collection of the HTTP cookies from the specified HTTP headers . | |
static string | GetDescription (this HttpStatusCode code) |
Gets the description of the specified HTTP status code . | |
static string | GetName (this string nameAndValue, string separator) |
Gets the name from the specified string that contains a pair of name and value separated by a separator string. | |
static KeyValuePair< string, string > | GetNameAndValue (this string nameAndValue, string separator) |
Gets the name and value from the specified string that contains a pair of name and value separated by a separator string. | |
static string | GetStatusDescription (this int code) |
Gets the description of the specified HTTP status code . | |
static string | GetValue (this string nameAndValue, string separator) |
Gets the value from the specified string that contains a pair of name and value separated by a separator string. | |
static bool | IsCloseStatusCode (this ushort value) |
Determines whether the specified ushort is in the allowable range of the WebSocket close status code. | |
static bool | IsEnclosedIn (this string value, char c) |
Determines whether the specified string is enclosed in the specified char. | |
static bool | IsHostOrder (this ByteOrder order) |
Determines whether the specified ByteOrder is host (this computer architecture) byte order. | |
static bool | IsLocal (this System.Net.IPAddress address) |
Determines whether the specified System.Net.IPAddress represents the local IP address. | |
static bool | IsNullOrEmpty (this string value) |
Determines whether the specified string is null or empty. | |
static bool | IsPredefinedScheme (this string value) |
Determines whether the specified string is a predefined scheme. | |
static bool | IsUpgradeTo (this HttpListenerRequest request, string protocol) |
Determines whether the specified HttpListenerRequest is an HTTP Upgrade request to switch to the specified protocol . | |
static bool | MaybeUri (this string value) |
Determines whether the specified string is a URI string. | |
static T[] | SubArray< T > (this T[] array, int startIndex, int length) |
Retrieves a sub-array from the specified array . A sub-array starts at the specified element position. | |
static void | Times (this int n, Action act) |
Executes the specified Action delegate n times. | |
static void | Times (this long n, Action act) |
Executes the specified Action delegate n times. | |
static void | Times (this uint n, Action act) |
Executes the specified Action delegate n times. | |
static void | Times (this ulong n, Action act) |
Executes the specified Action delegate n times. | |
static void | Times (this int n, Action< int > act) |
Executes the specified Action<int> delegate n times. | |
static void | Times (this long n, Action< long > act) |
Executes the specified Action<long> delegate n times. | |
static void | Times (this uint n, Action< uint > act) |
Executes the specified Action<uint> delegate n times. | |
static void | Times (this ulong n, Action< ulong > act) |
Executes the specified Action<ulong> delegate n times. | |
static T | To< T > (this byte[] src, ByteOrder srcOrder) |
Converts the specified array of byte to the specified type data. | |
static byte[] | ToByteArray< T > (this T value, ByteOrder order) |
Converts the specified value to an array of byte. | |
static byte[] | ToHostOrder (this byte[] src, ByteOrder srcOrder) |
Converts the order of the specified array of byte to the host byte order. | |
static string | ToString< T > (this T[] array, string separator) |
Converts the specified array to a string that concatenates the each element of array across the specified separator . | |
static Uri | ToUri (this string uriString) |
Converts the specified string to a Uri. | |
static string | UrlDecode (this string value) |
URL-decodes the specified string. | |
static string | UrlEncode (this string value) |
URL-encodes the specified string. | |
static void | WriteContent (this HttpListenerResponse response, byte[] content) |
Writes the specified content data with the specified HttpListenerResponse. | |
Provides a set of static methods for the websocket-sharp.
|
inlinestatic |
Determines whether the specified NameValueCollection contains the entry with the specified name .
true
if collection contains the entry with name ; otherwise, false
. collection | A NameValueCollection to test. |
name | A string that represents the key of the entry to find. |
|
inlinestatic |
Determines whether the specified NameValueCollection contains the entry with the specified both name and value .
true
if collection contains the entry with both name and value ; otherwise, false
. collection | A NameValueCollection to test. |
name | A string that represents the key of the entry to find. |
value | A string that represents the value of the entry to find. |
|
inlinestatic |
Determines whether the specified string contains any of characters in the specified array of char.
true
if value contains any of chars ; otherwise, false
. value | A string to test. |
chars | An array of char that contains characters to find. |
|
inlinestatic |
Emits the specified EventHandler delegate if it isn't null
.
eventHandler | A EventHandler to emit. |
sender | An object from which emits this eventHandler . |
e | A EventArgs that contains no event data. |
|
inlinestatic |
Emits the specified EventHandler<TEventArgs>
delegate if it isn't null
.
eventHandler | An EventHandler<TEventArgs> to emit. |
sender | An object from which emits this eventHandler . |
e | A TEventArgs that represents the event data. |
TEventArgs | The type of the event data generated by the event. |
TEventArgs | : | EventArgs |
|
inlinestatic |
Gets the collection of the HTTP cookies from the specified HTTP headers .
headers | A NameValueCollection that contains a collection of the HTTP headers. |
response | true if headers is a collection of the response headers; otherwise, false . |
|
inlinestatic |
Gets the description of the specified HTTP status code .
code | One of HttpStatusCode enum values, indicates the HTTP status codes. |
|
inlinestatic |
Gets the name from the specified string that contains a pair of name and value separated by a separator string.
null
. nameAndValue | A string that contains a pair of name and value separated by a separator string. |
separator | A string that represents a separator string. |
|
inlinestatic |
Gets the name and value from the specified string that contains a pair of name and value separated by a separator string.
KeyValuePair<string, string>
that represents the name and value if any. nameAndValue | A string that contains a pair of name and value separated by a separator string. |
separator | A string that represents a separator string. |
|
inlinestatic |
Gets the description of the specified HTTP status code .
code | An int that represents the HTTP status code. |
|
inlinestatic |
Gets the value from the specified string that contains a pair of name and value separated by a separator string.
null
. nameAndValue | A string that contains a pair of name and value separated by a separator string. |
separator | A string that represents a separator string. |
|
inlinestatic |
Determines whether the specified ushort is in the allowable range of the WebSocket close status code.
Not allowable ranges are the followings.
true
if value is in the allowable range of the WebSocket close status code; otherwise, false
. value | A ushort to test. |
|
inlinestatic |
Determines whether the specified string is enclosed in the specified char.
true
if value is enclosed in c ; otherwise, false
. value | A string to test. |
c | A char that represents the character to find. |
|
inlinestatic |
Determines whether the specified ByteOrder is host (this computer architecture) byte order.
true
if order is host byte order; otherwise, false
. order | One of the ByteOrder enum values, to test. |
|
inlinestatic |
Determines whether the specified System.Net.IPAddress represents the local IP address.
true
if address represents the local IP address; otherwise, false
. address | A System.Net.IPAddress to test. |
ArgumentNullException | address is null . |
|
inlinestatic |
Determines whether the specified string is null
or empty.
true
if value is null
or empty; otherwise, false
. value | A string to test. |
|
inlinestatic |
Determines whether the specified string is a predefined scheme.
true
if value is a predefined scheme; otherwise, false
. value | A string to test. |
|
inlinestatic |
Determines whether the specified HttpListenerRequest is an HTTP Upgrade request to switch to the specified protocol .
true
if request is an HTTP Upgrade request to switch to protocol ; otherwise, false
. request | A HttpListenerRequest that represents the HTTP request. |
protocol | A string that represents the protocol name. |
ArgumentNullException | request is null . -or- protocol is null . |
ArgumentException | protocol is empty. |
|
inlinestatic |
Determines whether the specified string is a URI string.
true
if value may be a URI string; otherwise, false
. value | A string to test. |
|
inlinestatic |
Retrieves a sub-array from the specified array . A sub-array starts at the specified element position.
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 array . |
length | An int that contains the number of elements to retrieve a sub-array. |
T | The type of elements in the array . |
|
inlinestatic |
Executes the specified Action delegate n times.
n | An int is the number of times to execute. |
act | An Action delegate that references the method(s) to execute. |
|
inlinestatic |
Executes the specified Action<int>
delegate n times.
n | An int is the number of times to execute. |
act | An Action<int> delegate that references the method(s) to execute. An int parameter to pass to the method(s) is the zero-based count of iteration. |
|
inlinestatic |
Executes the specified Action delegate n times.
n | A long is the number of times to execute. |
act | An Action delegate that references the method(s) to execute. |
|
inlinestatic |
Executes the specified Action<long>
delegate n times.
n | A long is the number of times to execute. |
act | An Action<long> delegate that references the method(s) to execute. A long parameter to pass to the method(s) is the zero-based count of iteration. |
|
inlinestatic |
Executes the specified Action delegate n times.
n | A uint is the number of times to execute. |
act | An Action delegate that references the method(s) to execute. |
|
inlinestatic |
Executes the specified Action<uint>
delegate n times.
n | A uint is the number of times to execute. |
act | An Action<uint> delegate that references the method(s) to execute. A uint parameter to pass to the method(s) is the zero-based count of iteration. |
|
inlinestatic |
Executes the specified Action delegate n times.
n | A ulong is the number of times to execute. |
act | An Action delegate that references the method(s) to execute. |
|
inlinestatic |
Executes the specified Action<ulong>
delegate n times.
n | A ulong is the number of times to execute. |
act | An Action<ulong> delegate that references the method(s) to execute. A ulong parameter to pass to this method(s) is the zero-based count of iteration. |
|
inlinestatic |
Converts the specified array of byte to the specified type data.
src | An array of byte to convert. |
srcOrder | One of the ByteOrder enum values, indicates the byte order of src . |
T | The type of the return. The T must be a value type. |
ArgumentNullException | src is null . |
T | : | struct |
|
inlinestatic |
Converts the specified value to an array of byte.
value | A T to convert. |
order | One of the ByteOrder enum values, indicates the byte order of the return. |
T | The type of value . The T must be a value type. |
T | : | struct |
|
inlinestatic |
Converts the order of the specified array of byte to the host byte order.
src | An array of byte to convert. |
srcOrder | One of the ByteOrder enum values, indicates the byte order of src . |
ArgumentNullException | src is null . |
|
inlinestatic |
Converts the specified array to a string that concatenates the each element of array across the specified separator .
array | An array of T to convert. |
separator | A string that represents the separator string. |
T | The type of elements in array . |
ArgumentNullException | array is null . |
|
inlinestatic |
Converts the specified string to a Uri.
null
if uriString isn't successfully converted. uriString | A string to convert. |
|
inlinestatic |
URL-decodes the specified string.
null
or empty. value | A string to decode. |
|
inlinestatic |
URL-encodes the specified string.
null
or empty. value | A string to encode. |
|
inlinestatic |
Writes the specified content data with the specified HttpListenerResponse.
response | A HttpListenerResponse that represents the HTTP response used to write the content data. |
content | An array of byte that represents the content data to write. |
ArgumentNullException | response is null . |