Table of Contents

Class ConfiguredDeviceEnumeratorBase

Namespace
Acuit.Pinpoint.IO
Assembly
Acuit.Pinpoint.IO.Abstractions.dll

A base class for implementing IConfiguredDeviceEnumerator.

public abstract class ConfiguredDeviceEnumeratorBase : IConfiguredDeviceEnumerator
Inheritance
ConfiguredDeviceEnumeratorBase
Implements
Derived
Inherited Members

Constructors

ConfiguredDeviceEnumeratorBase()

Initializes a new instance of the ConfiguredDeviceEnumeratorBase class that uses the registered device type as the concrete Type of the device (any setting named Type will be ignored).

protected ConfiguredDeviceEnumeratorBase()

ConfiguredDeviceEnumeratorBase(IConfiguredDeviceTypeResolver)

Initializes a new instance of the ConfiguredDeviceEnumeratorBase class using a supplied IConfiguredDeviceTypeResolver.

protected ConfiguredDeviceEnumeratorBase(IConfiguredDeviceTypeResolver typeResolver)

Parameters

typeResolver IConfiguredDeviceTypeResolver

The IConfiguredDeviceTypeResolver to use.

Exceptions

ArgumentNullException

typeResolver is null.

ConfiguredDeviceEnumeratorBase(Type)

Initializes a new instance of the ConfiguredDeviceEnumeratorBase class that uses a specified concrete device Type (any setting named Type will be ignored).

protected ConfiguredDeviceEnumeratorBase(Type concreteDeviceType)

Parameters

concreteDeviceType Type

The concrete device Type.

Exceptions

ArgumentNullException

concreteDeviceType is null.

Methods

CreateConfiguredDeviceDefinition(Type, IConfigurationSection)

protected ConfiguredDeviceDefinition CreateConfiguredDeviceDefinition(Type baseDeviceType, IConfigurationSection configurationSection)

Parameters

baseDeviceType Type

The base Type for the registered device type.

configurationSection IConfigurationSection

The optional configuration section for the device.

Returns

ConfiguredDeviceDefinition

A ConfiguredDeviceDefinition instance for the type

Remarks

If configurationSection is supplied and there is a Name setting, then Name in the returned ConfiguredDeviceDefinition will reflect the setting value. If a IConfiguredDeviceTypeResolver was supplied when creating this instance of ConfiguredDeviceEnumeratorBase, then it will be used to determine the concrete device base class. Otherwise, baseDeviceType will be assumed.

EnumerateConfiguredDevices(Type, IConfigurationSection)

Enumerates configured devices.

public abstract IEnumerable<ConfiguredDeviceDefinition> EnumerateConfiguredDevices(Type baseDeviceType, IConfigurationSection configurationSection)

Parameters

baseDeviceType Type

The base Type for the registered device type.

configurationSection IConfigurationSection

The configuration section that contains the settings for the device type, which comes from ConfigurationSection in the device type registration options.

Returns

IEnumerable<ConfiguredDeviceDefinition>

An enumeration of ConfiguredDeviceDefinition objects representing the configured devices.

Exceptions

ArgumentNullException

configurationSection is null, but this implementation requires a configuration section to operate.