Class ConfiguredDeviceDefinition
A definition for a configured device.
public class ConfiguredDeviceDefinition
- Inheritance
-
ConfiguredDeviceDefinition
- Inherited Members
Constructors
ConfiguredDeviceDefinition(string, IConfigurationSection, Exception)
Initializes a new instance of the ConfiguredDeviceDefinition class.
public ConfiguredDeviceDefinition(string name, IConfigurationSection configurationSection, Exception deviceTypeError)
Parameters
name
stringThe device name. When there is more than one instance of a device type with Addressable set to true, this is required and must be unique.
configurationSection
IConfigurationSectionThe optional configuration section containing settings for this device.
deviceTypeError
ExceptionThe error that occurred when trying to determine the concrete Type for this device.
Exceptions
- ArgumentNullException
deviceTypeError
is null.
ConfiguredDeviceDefinition(string, IConfigurationSection, Type)
Initializes a new instance of the ConfiguredDeviceDefinition class.
public ConfiguredDeviceDefinition(string name, IConfigurationSection configurationSection, Type deviceType)
Parameters
name
stringThe device name. When there is more than one instance of a device type with Addressable set to true, this is required and must be unique.
configurationSection
IConfigurationSectionThe optional configuration section containing settings for this device.
deviceType
TypeThe concrete Type for this device.
Exceptions
- ArgumentNullException
deviceType
is null.
Properties
ConfigurationSection
Gets the optional configuration section containing settings for this device.
public IConfigurationSection ConfigurationSection { get; }
Property Value
DeviceType
Gets the concrete Type for this device, or null if it could not be determined (in which case, DeviceTypeError will be set).
public Type DeviceType { get; }
Property Value
DeviceTypeError
Gets the error if one occurred when trying to determine the concrete Type for this device, or null if no such error occurred (in which case, DeviceType will be set).
public Exception DeviceTypeError { get; }
Property Value
Name
Gets the device name from the configuration (which might not be set).
public string Name { get; }