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

Validates a SsdpDevice object's properties meet the UPnP 1.0 specification.

Inheritance
System.Object
Upnp10DeviceValidator
Implements
IUpnpDeviceValidator
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.Infrastructure
Assembly: cs.temp.dll.dll
Syntax
public class Upnp10DeviceValidator : IUpnpDeviceValidator
Remarks

This is a best effort validation for known rules, it doesn't guarantee 100% compatibility with the specification. Reading the specification yourself is the best way to ensure compatibility.

Methods

GetValidationErrors(SsdpDevice)

Returns an enumerable set of strings, each one being a description of an invalid property on the specified device.

Declaration
public IEnumerable<string> GetValidationErrors(SsdpDevice device)
Parameters
Type Name Description
SsdpDevice device

The SsdpDevice to validate.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

A non-null enumerable set of strings, empty if there are no validation errors, otherwise each string represents a discrete problem.

Remarks

If no errors are found, an empty (but non-null) enumerable is returned.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the device argument is null.

GetValidationErrors(SsdpRootDevice)

Returns an enumerable set of strings, each one being a description of an invalid property on the specified root device.

Declaration
public IEnumerable<string> GetValidationErrors(SsdpRootDevice device)
Parameters
Type Name Description
SsdpRootDevice device

The SsdpRootDevice to validate.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

A non-null enumerable set of strings, empty if there are no validation errors, otherwise each string represents a discrete problem.

Remarks

If no errors are found, an empty (but non-null) enumerable is returned.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the device argument is null.

ThrowIfDeviceInvalid(SsdpDevice)

Validates the specified device and throws an System.InvalidOperationException if there are any validation errors.

Declaration
public void ThrowIfDeviceInvalid(SsdpDevice device)
Parameters
Type Name Description
SsdpDevice device

The SsdpDevice to validate.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if the device argument is null.

System.InvalidOperationException

Thrown if the device object does not pass validation.

Implements

IUpnpDeviceValidator
In This Article
Back to top Copyright (c) 2015 Troy Willmot