• API Documentation
Show / Hide Table of Contents
  • Rssdp
    • AggregateSsdpDeviceLocator
    • CustomHttpHeader
    • CustomHttpHeadersCollection
    • DeviceAvailableEventArgs
    • DeviceEventArgs
    • DeviceNetworkType
    • DeviceNetworkTypeExtensions
    • DeviceUnavailableEventArgs
    • DiscoveredSsdpDevice
    • ExceptionExtensions
    • ISsdpLogger
    • NullLogger
    • ServiceEventArgs
    • SocketClosedException
    • SocketFactory
    • SsdpDevice
    • SsdpDeviceExtensions
    • SsdpDeviceIcon
    • SsdpDeviceLocator
    • SsdpDevicePropertiesCollection
    • SsdpDeviceProperty
    • SsdpDevicePublisher
    • SsdpEmbeddedDevice
    • SsdpRootDevice
    • SsdpService
    • SsdpStandardsMode
    • SsdpTraceLogger
  • Rssdp.Infrastructure
    • DisposableManagedObjectBase
    • HttpParserBase<T>
    • HttpRequestParser
    • HttpResponseParser
    • ISocketFactory
    • ISsdpCommunicationsServer
    • ISsdpDeviceLocator
    • ISsdpDevicePublisher
    • IUdpSocket
    • IUpnpDeviceValidator
    • ReceivedUdpData
    • RequestReceivedEventArgs
    • ResponseReceivedEventArgs
    • SsdpCommunicationsServer
    • SsdpConstants
    • SsdpDeviceLocatorBase
    • SsdpDevicePublisherBase
    • UdpEndPoint
    • Upnp10DeviceValidator

Class CustomHttpHeadersCollection

Represents a collection of custom HTTP headers, keyed by name.

Inheritance
System.Object
CustomHttpHeadersCollection
Implements
System.Collections.Generic.IEnumerable<CustomHttpHeader>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Rssdp
Assembly: cs.temp.dll.dll
Syntax
public class CustomHttpHeadersCollection : IEnumerable<CustomHttpHeader>, IEnumerable

Constructors

CustomHttpHeadersCollection()

Default constructor.

Declaration
public CustomHttpHeadersCollection()

CustomHttpHeadersCollection(Int32)

Full constructor.

Declaration
public CustomHttpHeadersCollection(int capacity)
Parameters
Type Name Description
System.Int32 capacity

Specifies the initial capacity of the collection.

Properties

Count

Returns the number of items in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Item[String]

Returns the CustomHttpHeader instance from the collection that has the specified Name value.

Declaration
public CustomHttpHeader this[string name] { get; }
Parameters
Type Name Description
System.String name

The full name of the property to return.

Property Value
Type Description
CustomHttpHeader

A CustomHttpHeader instance from the collection.

Exceptions
Type Condition
System.Collections.Generic.KeyNotFoundException

Thrown if no item exists in the collection with the specified name value.

Methods

Add(CustomHttpHeader)

Adds a CustomHttpHeader instance to the collection.

Declaration
public void Add(CustomHttpHeader header)
Parameters
Type Name Description
CustomHttpHeader header

The CustomHttpHeader instance to add to the collection.

Remarks

Exceptions
Type Condition
System.ArgumentNullException

Thrown if header is null.

Contains(CustomHttpHeader)

Returns a boolean indicating whether or not the specified CustomHttpHeader instance is in the collection.

Declaration
public bool Contains(CustomHttpHeader header)
Parameters
Type Name Description
CustomHttpHeader header

An CustomHttpHeader instance to check the collection for.

Returns
Type Description
System.Boolean

True if the specified instance exists in the collection, otherwise false.

Contains(String)

Returns a boolean indicating whether or not a CustomHttpHeader instance with the specified full name value exists in the collection.

Declaration
public bool Contains(string headerName)
Parameters
Type Name Description
System.String headerName

A string containing the full name of the CustomHttpHeader instance to check for.

Returns
Type Description
System.Boolean

True if an item with the specified full name exists in the collection, otherwise false.

GetEnumerator()

Returns an enumerator of CustomHttpHeader instances in this collection.

Declaration
public IEnumerator<CustomHttpHeader> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<CustomHttpHeader>

An enumerator of CustomHttpHeader instances in this collection.

Remove(CustomHttpHeader)

Removes the specified header instance from the collection.

Declaration
public bool Remove(CustomHttpHeader header)
Parameters
Type Name Description
CustomHttpHeader header

The CustomHttpHeader instance to remove from the collection.

Returns
Type Description
System.Boolean

True if an item was removed from the collection, otherwise false (because it did not exist or was not the same instance).

Remarks

Only removes the specified header if that instance was in the collection, if another header with the same name exists in the collection it is not removed.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the header is null.

See Also
Remove(String)

Remove(String)

Removes the property with the specified key (Name from the collection.

Declaration
public bool Remove(string headerName)
Parameters
Type Name Description
System.String headerName

The name of the CustomHttpHeader instance to remove from the collection.

Returns
Type Description
System.Boolean

True if an item was removed from the collection, otherwise false (because no item exists in the collection with that key).

Exceptions
Type Condition
System.ArgumentException

Thrown if the headerName argument is null or empty string.

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
In This Article
Back to top Copyright (c) 2015 Troy Willmot