Table of Contents

Class ProductKindMetadataRegistry

Namespace
S1API.Products
Assembly
S1API.dll

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

IReadOnlyCollection<ProductKindMetadata>

Methods

Get(ProductKind)

Gets registered metadata for a logical product kind.

public static ProductKindMetadata? Get(ProductKind productKind)

Parameters

productKind ProductKind

The logical product kind.

Returns

ProductKindMetadata

The metadata, or null when none is registered.

Exceptions

ArgumentNullException

Thrown when productKind is null.

Get(string)

Gets registered metadata by product-kind identifier.

public static ProductKindMetadata? Get(string productKindId)

Parameters

productKindId string

The stable, namespaced product-kind identifier.

Returns

ProductKindMetadata

The metadata, or null when none is registered.

Exceptions

ArgumentNullException

Thrown when productKindId is null.

ArgumentException

Thrown when productKindId is 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

productKind ProductKind

The logical product kind.

metadata ProductKindMetadata

The metadata when found; otherwise null.

Returns

bool

true when metadata is registered.

Exceptions

ArgumentNullException

Thrown when productKind is null.

TryGet(string, out ProductKindMetadata?)

Attempts to get registered metadata by product-kind identifier.

public static bool TryGet(string productKindId, out ProductKindMetadata? metadata)

Parameters

productKindId string

The stable, namespaced product-kind identifier.

metadata ProductKindMetadata

The metadata when found; otherwise null.

Returns

bool

true when metadata is registered.

Exceptions

ArgumentNullException

Thrown when productKindId is null.

ArgumentException

Thrown when productKindId is not a valid namespaced identifier.