Click or drag to resize
DeviceIdAttribute Class
An attribute for declaratively associating an assembly, class or property with an ASCOM device ID (and optionally, a display name).
Inheritance Hierarchy

Namespace: ASCOM
Assembly: ASCOM.Attributes (in ASCOM.Attributes.dll) Version: 6.0.0.0 (6.2.0.2774)
Syntax
public sealed class DeviceIdAttribute : Attribute

The DeviceIdAttribute type exposes the following members.

Constructors
  NameDescription
Public methodDeviceIdAttribute
Initializes a new instance of the DeviceIdAttribute class.
Top
Properties
  NameDescription
Public propertyDeviceId
Gets the ASCOM DeviceID, also known as the COM ProgID.
Public propertyDeviceName
Gets or sets the display name of the device. This would be the short display name, as displayed in the ASCOM Chooser.
Public propertyTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.)
Top
Methods
  NameDescription
Public methodEquals
Returns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from Attribute.)
Public methodIsDefaultAttribute
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute.)
Public methodMatch
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute.)
Top
Remarks
This attribute is intended for use in two main situations:
  1. Settings management and integration with Visual Studio designers - When this attribute is placed on the driver's Properties.Settings class, it propagates down to each of the settings properties. When the setting is passed to the ASCOM.SettingsProvider class at runtime, the settings provider looks for this attribute to determine which settings hive to save the value in when it is passed to Profile.
  2. Deployment - The values in this attribute could be used by an installer custom action to perform ASCOM registration during setup. Historically this has been handled programmatically, but there are trends towards a more declarative approach to deployment (for example WiX, Windows Installer Xml). It is expected that such an installer may need to obtain registration data by reflecting on the assemblies being installed. Placing this attribute at the assembly level will assist in this situation.
See Also