Table of Contents

Class SingletonConfiguredDeviceEnumerator

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

A IConfiguredDeviceEnumerator for a single device.

public class SingletonConfiguredDeviceEnumerator : ConfiguredDeviceEnumeratorBase, IConfiguredDeviceEnumerator
Inheritance
SingletonConfiguredDeviceEnumerator
Implements
Inherited Members

Remarks

For this configured devices enumerator:

  • The optional device type configuration section contains the settings for a single device.
  • If the optional configuration section contains a setting named Name, then the single device will be given that name.
  • Concrete device types are resolved via an optionally supplied IConfiguredDeviceTypeResolver.

Constructors

SingletonConfiguredDeviceEnumerator()

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

public SingletonConfiguredDeviceEnumerator()

Remarks

Default can be used to get a singleton instance created with this constructor.

SingletonConfiguredDeviceEnumerator(IConfiguredDeviceTypeResolver)

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

public SingletonConfiguredDeviceEnumerator(IConfiguredDeviceTypeResolver typeResolver)

Parameters

typeResolver IConfiguredDeviceTypeResolver

The IConfiguredDeviceTypeResolver to use.

Exceptions

ArgumentNullException

typeResolver is null.

SingletonConfiguredDeviceEnumerator(Type)

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

public SingletonConfiguredDeviceEnumerator(Type concreteDeviceType)

Parameters

concreteDeviceType Type

The concrete device Type.

Exceptions

ArgumentNullException

concreteDeviceType is null.

Properties

Default

Gets a default SingletonConfiguredDeviceEnumerator instance that uses the registered device type as the concrete Type of the device (any setting named Type will be ignored).

public static SingletonConfiguredDeviceEnumerator Default { get; }

Property Value

SingletonConfiguredDeviceEnumerator

Methods

EnumerateConfiguredDevices(Type, IConfigurationSection)

Enumerates configured devices.

public override 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.