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.0.0+77e18c564bf9ecdb0ef30166e894390d1b7d077c
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