Class ProductKindMetadataRegistry
Provides process-lifetime lookup access to registered product-kind metadata.
public static class ProductKindMetadataRegistry
- Inheritance
-
ProductKindMetadataRegistry
- Inherited Members
Properties
All
Gets a read-only snapshot ordered by custom-section order, display name, and identifier.
public static IReadOnlyCollection<ProductKindMetadata> All { get; }
Property Value
Methods
Get(ProductKind)
Gets registered metadata for a logical product kind.
public static ProductKindMetadata? Get(ProductKind productKind)
Parameters
productKindProductKindThe logical product kind.
Returns
- ProductKindMetadata
The metadata, or null when none is registered.
Exceptions
- ArgumentNullException
Thrown when
productKindis null.
Get(string)
Gets registered metadata by product-kind identifier.
public static ProductKindMetadata? Get(string productKindId)
Parameters
productKindIdstringThe stable, namespaced product-kind identifier.
Returns
- ProductKindMetadata
The metadata, or null when none is registered.
Exceptions
- ArgumentNullException
Thrown when
productKindIdis null.- ArgumentException
Thrown when
productKindIdis not a valid namespaced identifier.
TryGet(ProductKind, out ProductKindMetadata?)
Attempts to get registered metadata for a logical product kind.
public static bool TryGet(ProductKind productKind, out ProductKindMetadata? metadata)
Parameters
productKindProductKindThe logical product kind.
metadataProductKindMetadataThe metadata when found; otherwise null.
Returns
Exceptions
- ArgumentNullException
Thrown when
productKindis null.
TryGet(string, out ProductKindMetadata?)
Attempts to get registered metadata by product-kind identifier.
public static bool TryGet(string productKindId, out ProductKindMetadata? metadata)
Parameters
productKindIdstringThe stable, namespaced product-kind identifier.
metadataProductKindMetadataThe metadata when found; otherwise null.
Returns
Exceptions
- ArgumentNullException
Thrown when
productKindIdis null.- ArgumentException
Thrown when
productKindIdis not a valid namespaced identifier.