• 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 SsdpDevicePropertiesCollection

Represents a collection of SsdpDeviceProperty instances keyed by the FullName property value.

Inheritance
System.Object
SsdpDevicePropertiesCollection
Implements
System.Collections.Generic.IEnumerable<SsdpDeviceProperty>
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 SsdpDevicePropertiesCollection : IEnumerable<SsdpDeviceProperty>, IEnumerable
Remarks

Items added to this collection are keyed by their FullName property value, at the time they were added. If the name changes after they were added to the collection, the key is not updated unless the item is manually removed and re-added to the collection.

Constructors

SsdpDevicePropertiesCollection()

Default constructor.

Declaration
public SsdpDevicePropertiesCollection()

SsdpDevicePropertiesCollection(Int32)

Full constructor.

Declaration
public SsdpDevicePropertiesCollection(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 SsdpDeviceProperty instance from the collection that has the specified FullName value.

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

The full name of the property to return.

Property Value
Type Description
SsdpDeviceProperty

A SsdpDeviceProperty instance from the collection.

Exceptions
Type Condition
System.Collections.Generic.KeyNotFoundException

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

Methods

Add(SsdpDeviceProperty)

Adds a SsdpDeviceProperty instance to the collection.

Declaration
public void Add(SsdpDeviceProperty customDeviceProperty)
Parameters
Type Name Description
SsdpDeviceProperty customDeviceProperty

The property instance to add to the collection.

Remarks

Exceptions
Type Condition
System.ArgumentNullException

Thrown if customDeviceProperty is null.

System.ArgumentException

Thrown if the FullName property of the customDeviceProperty argument is null or empty string, or if the collection already contains an item with the same key.

Contains(SsdpDeviceProperty)

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

Declaration
public bool Contains(SsdpDeviceProperty customDeviceProperty)
Parameters
Type Name Description
SsdpDeviceProperty customDeviceProperty

An SsdpDeviceProperty 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 SsdpDeviceProperty instance with the specified full name value exists in the collection.

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

A string containing the full name of the SsdpDeviceProperty 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 SsdpDeviceProperty instances in this collection.

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

An enumerator of SsdpDeviceProperty instances in this collection.

Remove(SsdpDeviceProperty)

Removes the specified property instance from the collection.

Declaration
public bool Remove(SsdpDeviceProperty customDeviceProperty)
Parameters
Type Name Description
SsdpDeviceProperty customDeviceProperty

The SsdpDeviceProperty 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 remove the specified property if that instance was in the collection, if another property with the same full name exists in the collection it is not removed.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the customDeviceProperty is null.

System.ArgumentException

Thrown if the FullName property of the customDeviceProperty argument is null or empty string, or if the collection already contains an item with the same key.

See Also
Remove(String)

Remove(String)

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

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

The full name of the SsdpDeviceProperty 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 customDevicePropertyFullName argument is null or empty string.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator of SsdpDeviceProperty instances in this collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An enumerator of SsdpDeviceProperty instances in this collection.

Implements

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