WebHeaderCollection Methods
.NET Framework 4.5
The WebHeaderCollection type exposes the following members.
| Name | Description | |
|---|---|---|
|
Add(NameValueCollection) | Copies the entries in the specified NameValueCollection to the current NameValueCollection. (Inherited from NameValueCollection.) |
|
Add(String) | Inserts the specified header into the collection. |
|
Add(HttpRequestHeader, String) | Inserts the specified header with the specified value into the collection. |
|
Add(HttpResponseHeader, String) | Inserts the specified header with the specified value into the collection. |
|
Add(String, String) | Inserts a header with the specified name and value into the collection. (Overrides NameValueCollection.Add(String, String).) |
|
AddWithoutValidate | Inserts a header into the collection without checking whether the header is on the restricted header list. |
|
BaseAdd | Adds an entry with the specified key and value into the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseClear | Removes all entries from the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGet(Int32) | Gets the value of the entry at the specified index of the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGet(String) | Gets the value of the first entry with the specified key from the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGetAllKeys | Returns a String array that contains all the keys in the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGetAllValues() | Returns an Object array that contains all the values in the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGetAllValues(Type) | Returns an array of the specified type that contains all the values in the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseGetKey | Gets the key of the entry at the specified index of the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseHasKeys | Gets a value indicating whether the NameObjectCollectionBase instance contains entries whose keys are not null. (Inherited from NameObjectCollectionBase.) |
|
BaseRemove | Removes the entries with the specified key from the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseRemoveAt | Removes the entry at the specified index of the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseSet(Int32, Object) | Sets the value of the entry at the specified index of the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
BaseSet(String, Object) | Sets the value of the first entry with the specified key in the NameObjectCollectionBase instance, if found; otherwise, adds an entry with the specified key and value into the NameObjectCollectionBase instance. (Inherited from NameObjectCollectionBase.) |
|
Clear | Removes all headers from the collection. (Overrides NameValueCollection.Clear().) |
|
CopyTo | Copies the entire NameValueCollection to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from NameValueCollection.) |
|
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
Get(Int32) | Get the value of a particular header in the collection, specified by an index into the collection. (Overrides NameValueCollection.Get(Int32).) |
|
Get(String) | Get the value of a particular header in the collection, specified by the name of the header. (Overrides NameValueCollection.Get(String).) |
|
GetEnumerator | Returns an enumerator that can iterate through the WebHeaderCollection instance. (Overrides NameObjectCollectionBase.GetEnumerator().) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetKey | Get the header name at the specified position in the collection. (Overrides NameValueCollection.GetKey(Int32).) |
|
GetObjectData | Infrastructure. Populates a SerializationInfo with the data needed to serialize the target object. (Overrides NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext).) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
GetValues(Int32) | Gets an array of header values stored in the index position of the header collection. (Overrides NameValueCollection.GetValues(Int32).) |
|
GetValues(String) | Gets an array of header values stored in a header. (Overrides NameValueCollection.GetValues(String).) |
|
HasKeys | Gets a value indicating whether the NameValueCollection contains keys that are not null. (Inherited from NameValueCollection.) |
|
InvalidateCachedArrays | Resets the cached arrays of the collection to null. (Inherited from NameValueCollection.) |
|
IsRestricted(String) | Tests whether the specified HTTP header can be set for the request. |
|
IsRestricted(String, Boolean) | Tests whether the specified HTTP header can be set for the request or the response. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
OnDeserialization | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. (Overrides NameObjectCollectionBase.OnDeserialization(Object).) |
|
Remove(HttpRequestHeader) | Removes the specified header from the collection. |
|
Remove(HttpResponseHeader) | Removes the specified header from the collection. |
|
Remove(String) | Removes the specified header from the collection. (Overrides NameValueCollection.Remove(String).) |
|
Set(HttpRequestHeader, String) | Sets the specified header to the specified value. |
|
Set(HttpResponseHeader, String) | Sets the specified header to the specified value. |
|
Set(String, String) | Sets the specified header to the specified value. (Overrides NameValueCollection.Set(String, String).) |
|
ToByteArray | Infrastructure. Converts the WebHeaderCollection to a byte array.. |
|
ToString | Infrastructure. This method is obsolete. (Overrides Object.ToString().) |
| Name | Description | |
|---|---|---|
|
AsParallel | Enables parallelization of a query. (Defined by ParallelEnumerable.) |
|
AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
|
Cast<TResult> | Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
|
OfType<TResult> | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
|
ICollection.CopyTo | Copies the entire NameObjectCollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from NameObjectCollectionBase.) |
|
IEnumerable.GetEnumerator | Returns an enumerator that can iterate through the WebHeaderCollection instance. |
|
ISerializable.GetObjectData | Infrastructure. Serializes this instance into the specified SerializationInfo object. |