ChooserSAChoose(DeviceTypes, String, ILogger) Method

Static method to select a device without having to create a ChooserSA instance.

Definition

Namespace: ASCOM.Com
Assembly: ASCOM.Com.ChooserSA (in ASCOM.Com.ChooserSA.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static string Choose(
	DeviceTypes deviceType,
	string progId = "",
	ILogger logger = null
)

Parameters

deviceType  DeviceTypes
The type of device to be selected.
progId  String  (Optional)
An optional programmatic identifier (ProgID) used to refine the selection. Defaults to an empty string.
logger  ILogger  (Optional)
An optional logger instance for capturing diagnostic information during the selection process. Can be .

Return Value

String
The identifier of the selected device as a string.

Remarks

If a logger is provided, diagnostic information about the selection process will be logged. The method uses the specified deviceType to determine the device type and uses the progId to select a default driver if required.

Version Information

.NET

Supported in: .NET 8.0 and later

See Also