PlatformUtilitiesGetComMetadata Method

Creates a ComMetadata snapshot for the specified COM ProgID by inspecting the COM registration and DLL on disk.

Definition

Namespace: ASCOM.Com
Assembly: ASCOM.Com (in ASCOM.Com.dll) Version: 4.1.0+517b408ca408f7a19aace78c1509f524714a3a13
C#
public static ComMetadata GetComMetadata(
	string progId,
	ILogger logger
)

Parameters

progId  String
The COM ProgID to validate (e.g. "ASCOM.Simulator.Telescope").
logger  ILogger
A logger for diagnostic output that implements the ILogger interface. Use if logging is not required.

Return Value

ComMetadata
A ComMetadata instance containing all discovered properties.

Remarks

Note: This method is only available in projects targeting .NET 8 and later.

Exceptions

InvalidValueExceptionThrown if the progID parameter is null or Empty.
InvalidOperationExceptionThrown if this method is called in a project targeting a framework earlier than .NET 8.

Version Information

Supported in: .NET Standard 2.0, .NET 8 .NET 9. .NET 10

See Also