Provides a collection of the HTTP headers associated with a request or response.
See Also: Inherited members from System.Collections.Specialized.NameValueCollection.
|
Initializes a new instance of the WebSocketSharp.Net.WebHeaderCollection class. |
|
Initializes a new instance of the WebSocketSharp.Net.WebHeaderCollection class with the specified System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext. |
[read-only] override |
AllKeys | string[]. Gets all header names in the collection. |
[read-only] override |
Count | int . Gets the number of headers in the collection. |
default property
|
Item (System.Net.HttpRequestHeader) | string . Gets or sets the specified request header in the collection. |
default property
|
Item (System.Net.HttpResponseHeader) | string . Gets or sets the specified response header in the collection. |
[read-only] override |
Keys | System.Collections.Specialized.NameObjectCollectionBase.KeysCollection . Gets a collection of header names in the collection. |
|
Add
(string)Adds the specified header to the collection. |
|
|
Add
(System.Net.HttpRequestHeader, string)Adds the specified request header with the specified value to the collection. |
|
|
Add
(System.Net.HttpResponseHeader, string)Adds the specified response header with the specified value to the collection. |
|
override
|
Add
(string, string)Adds a header with the specified name and value to the collection. |
|
override
|
Clear
()Removes all headers from the collection. |
|
override
|
Get
(int)Get the value of the header with the specified index in the collection. |
|
override
|
Get
(string)Get the value of the header with the specified name in the collection. |
|
override
|
GetEnumerator
()Gets the enumerator to use to iterate through the WebSocketSharp.Net.WebHeaderCollection. |
|
override
|
GetKey
(int)Get the header name at the specified index position in the collection. |
|
override
|
GetObjectData
(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)Populates the specified System.Runtime.Serialization.SerializationInfo with the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object. |
|
override
|
GetValues
(int)Gets an array of header values stored in the specified index position of the header collection. |
|
override
|
GetValues
(string)Gets an array of header values stored in the specified header name. |
|
static
|
IsRestricted
(string)Determines whether the specified header can be set for the request. |
|
static
|
IsRestricted
(string, bool)Determines whether the specified header can be set for the request or the response. |
|
override
|
OnDeserialization
(object)Implements the System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete. |
|
|
Remove
(System.Net.HttpRequestHeader)Removes the specified header from the collection. |
|
|
Remove
(System.Net.HttpResponseHeader)Removes the specified header from the collection. |
|
override
|
Remove
(string)Removes the specified header from the collection. |
|
|
Set
(System.Net.HttpRequestHeader, string)Sets the specified header to the specified value. |
|
|
Set
(System.Net.HttpResponseHeader, string)Sets the specified header to the specified value. |
|
override
|
Set
(string, string)Sets the specified header to the specified value. |
|
|
ToByteArray
()Converts the current WebSocketSharp.Net.WebHeaderCollection to an array of byte. |
|
override
|
ToString
()Returns a string that represents the current WebSocketSharp.Net.WebHeaderCollection. |
|
AddWithoutValidate
(string, string)Adds a header to the collection without checking whether the header is on the restricted header list. |
|
System.Runtime.Serialization.ISerializable.GetObjectData | Populates the specified System.Runtime.Serialization.SerializationInfo with the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object. |
static
|
Exists
(this System.Collections.Specialized.NameValueCollection, string)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)Determines whether the entry with the specified both key and value exists in the specified System.Collections.Specialized.NameValueCollection. |
|
static
|
IsNull<T>
(this T)Determines whether the specified object is null. |
|
static
|
IsNullDo<T>
(this T, Action)Determines whether the specified object is null. And invokes the specified Action delegate if the specified object is null. |
Initializes a new instance of the WebSocketSharp.Net.WebHeaderCollection class.
Syntax
public WebHeaderCollection ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Initializes a new instance of the WebSocketSharp.Net.WebHeaderCollection class with the specified System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext.
Syntax
protected WebHeaderCollection (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)Parameters
- serializationInfo
- A System.Runtime.Serialization.SerializationInfo that contains the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that contains the source of the serialized stream associated with the new WebSocketSharp.Net.WebHeaderCollection.
Exceptions
Type Reason ArgumentNullException serializationInfo is null. ArgumentException An element with the specified name is not found in serializationInfo. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Adds the specified header to the collection.
Syntax
Parameters
- header
- A string that contains a header with the name and value separated by a colon (:).
Exceptions
Type Reason ArgumentNullException header is null, string.Empty, or the name part of header is string.Empty. ArgumentException header does not contain a colon.
-or-
header is a restricted header.
-or-
The name or value part of header contains invalid characters.
ArgumentOutOfRangeException The length of the value part of header is greater than 65535. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow the header. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Adds the specified request header with the specified value to the collection.
Syntax
Parameters
- header
- A System.Net.HttpRequestHeader is a request header to add.
- value
- A string that contains the value of the header to add.
Exceptions
Type Reason ArgumentOutOfRangeException The length of value is greater than 65535. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpRequestHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Adds the specified response header with the specified value to the collection.
Syntax
Parameters
- header
- A System.Net.HttpResponseHeader is a response header to add.
- value
- A string that contains the value of the header to add.
Exceptions
Type Reason ArgumentOutOfRangeException The length of value is greater than 65535. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpResponseHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Adds a header with the specified name and value to the collection.
Syntax
Parameters
Exceptions
Type Reason ArgumentException name or value contains invalid characters.
-or-
name is a restricted header name.
ArgumentOutOfRangeException The length of value is greater than 65535. ArgumentNullException name is null or string.Empty. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow the header name. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Adds a header to the collection without checking whether the header is on the restricted header list.
Syntax
Parameters
Exceptions
Type Reason ArgumentException headerName or headerValue contains invalid characters. ArgumentNullException headerName is null or string.Empty. ArgumentOutOfRangeException The length of headerValue is greater than 65535. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow the headerName. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets all header names in the collection.
Syntax
public override string[] AllKeys { get; }Value
An array of string that contains all header names in the collection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Removes all headers from the collection.
Syntax
public override void Clear ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets the number of headers in the collection.
Syntax
public override int Count { get; }Value
An int that indicates the number of headers in the collection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Get the value of the header with the specified index in the collection.
Syntax
Parameters
- index
- An int that is the zero-based index of the header to get.
Returns
A string that receives the value of the header.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Get the value of the header with the specified name in the collection.
Syntax
Parameters
- name
- A string that contains the name of the header to get.
Returns
A string that receives the value of the header. null if there is no header with name in the collection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets the enumerator to use to iterate through the WebSocketSharp.Net.WebHeaderCollection.
Syntax
public override IEnumerator GetEnumerator ()Returns
An instance of an implementation of the IEnumerator interface to use to iterate through the WebSocketSharp.Net.WebHeaderCollection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Get the header name at the specified index position in the collection.
Syntax
Parameters
- index
- An int is the zero-based index of the key to get from the collection.
Returns
A string that receives the header name.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Populates the specified System.Runtime.Serialization.SerializationInfo with the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object.
Syntax
public override void GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)Parameters
- serializationInfo
- A System.Runtime.Serialization.SerializationInfo that holds the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization.
Exceptions
Type Reason ArgumentNullException serializationInfo is null. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets an array of header values stored in the specified index position of the header collection.
Syntax
Parameters
- index
- An int is the zero-based index of the header in the collection.
Returns
An array of string that receives the header values.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets an array of header values stored in the specified header name.
Syntax
Parameters
- header
- A string that contains a header name.
Returns
An array of string that receives the header values.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Determines whether the specified header can be set for the request.
Syntax
Parameters
- headerName
- A string that contains the name of the header to test.
Returns
true if the header is restricted; otherwise, false.Exceptions
Type Reason ArgumentNullException headerName is null or string.Empty. ArgumentException headerName contains invalid characters. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Determines whether the specified header can be set for the request or the response.
Syntax
Parameters
- headerName
- A string that contains the name of the header to test.
- response
- true if does the test for the response; for the request, false.
Returns
true if the header is restricted; otherwise, false.Exceptions
Type Reason ArgumentNullException headerName is null or string.Empty. ArgumentException headerName contains invalid characters. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets or sets the specified request header in the collection.
Syntax
This is the default property for this class.
public string this [System.Net.HttpRequestHeader header] { get; set; }Parameters
- header
- A System.Net.HttpRequestHeader that indicates a request header.
Value
A string that contains the value of the specified request header.Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpRequestHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
ArgumentOutOfRangeException The length of value is greater than 65535. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets or sets the specified response header in the collection.
Syntax
This is the default property for this class.
public string this [System.Net.HttpResponseHeader header] { get; set; }Parameters
- header
- A System.Net.HttpResponseHeader that indicates a response header.
Value
A string that contains the value of the specified response header.Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpResponseHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
ArgumentOutOfRangeException The length of value is greater than 65535. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Gets a collection of header names in the collection.
Syntax
public override System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get; }Value
A System.Collections.Specialized.NameObjectCollectionBase.KeysCollection that contains a collection of header names in the collection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Implements the System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete.
Syntax
Parameters
- sender
- An object that contains the source of the deserialization event.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Removes the specified header from the collection.
Syntax
public void Remove (System.Net.HttpRequestHeader header)Parameters
- header
- A System.Net.HttpRequestHeader to remove from the collection.
Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpRequestHeader values. ArgumentException header is a restricted header. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Removes the specified header from the collection.
Syntax
public void Remove (System.Net.HttpResponseHeader header)Parameters
- header
- A System.Net.HttpResponseHeader to remove from the collection.
Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpResponseHeader values. ArgumentException header is a restricted header. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Removes the specified header from the collection.
Syntax
Parameters
- name
- A string that contains the name of the header to remove from the collection.
Exceptions
Type Reason ArgumentNullException name is null or string.Empty. ArgumentException name contains invalid characters.
-or-
name is a restricted header name.
InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow the header name. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Sets the specified header to the specified value.
Syntax
Parameters
- header
- A System.Net.HttpRequestHeader to set.
- value
- A string that contains the value of the header to set.
Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpRequestHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
ArgumentOutOfRangeException The length of value is greater than 65535. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Sets the specified header to the specified value.
Syntax
Parameters
- header
- A System.Net.HttpResponseHeader to set.
- value
- A string that contains the value of the header to set.
Exceptions
Type Reason InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow any of System.Net.HttpResponseHeader values. ArgumentException header is a restricted header.
-or-
value contains invalid characters.
ArgumentOutOfRangeException The length of value is greater than 65535. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Sets the specified header to the specified value.
Syntax
Parameters
Exceptions
Type Reason ArgumentNullException name is null or string.Empty. ArgumentException name or value contain invalid characters.
-or-
name is a restricted header name.
ArgumentOutOfRangeException The length of value is greater than 65535. InvalidOperationException The current WebSocketSharp.Net.WebHeaderCollection instance does not allow the header name. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Populates the specified System.Runtime.Serialization.SerializationInfo with the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object.
Syntax
void System.Runtime.Serialization.ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)Parameters
- serializationInfo
- A System.Runtime.Serialization.SerializationInfo that holds the data to need to serialize the WebSocketSharp.Net.WebHeaderCollection object.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization.
Exceptions
Type Reason ArgumentNullException serializationInfo is null. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Converts the current WebSocketSharp.Net.WebHeaderCollection to an array of byte.
Syntax
public byte[] ToByteArray ()Returns
An array of byte that receives the converted current WebSocketSharp.Net.WebHeaderCollection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)
Returns a string that represents the current WebSocketSharp.Net.WebHeaderCollection.
Syntax
public override string ToString ()Returns
A string that represents the current WebSocketSharp.Net.WebHeaderCollection.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)