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 needed to serialize the WebSocketSharp.Net.WebHeaderCollection. |
|
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 needed to serialize the WebSocketSharp.Net.WebHeaderCollection. |
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 holds the serialized object data.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that contains the contextual information about the source or destination.
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 or a string.Empty. ArgumentException header does not contain a colon. 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 that contains the name of the request header to add.
- value
- A string that contains the value of the header to add.
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 that contains the name of the response header to add.
- value
- A string that contains the value of the header to add.
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 is null or a string.Empty.
-or-
name is a restricted header that must be set with a property setting.
-or-
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)
Adds a header to the collection without checking whether the header is on the restricted header list.
Syntax
Parameters
Exceptions
Type Reason ArgumentException headerName is null, string.Empty, or contains invalid characters.
-or-
headerValue 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 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 needed to serialize the WebSocketSharp.Net.WebHeaderCollection.
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 serialized object data.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization.
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 contains a request header name.
Value
A string that contains the value of the specified request header.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 contains a response header name.
Value
A string that contains the value of the specified response header.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.
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.
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.
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.
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.
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. 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 needed to serialize the WebSocketSharp.Net.WebHeaderCollection.
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 serialized object data.
- streamingContext
- A System.Runtime.Serialization.StreamingContext that specifies the destination for the serialization.
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)