Table of Contents

Class ProductKindRegistry

Namespace
S1API.Products
Assembly
S1API.dll

Provides process-lifetime lookup access to logical product kinds.

public static class ProductKindRegistry
Inheritance
ProductKindRegistry
Inherited Members

Properties

All

Gets a read-only snapshot of all registered product kinds, ordered by identifier.

public static IReadOnlyCollection<ProductKind> All { get; }

Property Value

IReadOnlyCollection<ProductKind>

Methods

Get(string)

Gets a registered product kind by identifier.

public static ProductKind? Get(string id)

Parameters

id string

The stable, namespaced product-kind identifier.

Returns

ProductKind

The registered product kind, or null when the identifier is not registered.

Exceptions

ArgumentNullException

Thrown when id is null.

ArgumentException

Thrown when id is empty or does not use the supported namespaced format.

TryGet(string, out ProductKind?)

Attempts to get a registered product kind by identifier.

public static bool TryGet(string id, out ProductKind? productKind)

Parameters

id string

The stable, namespaced product-kind identifier.

productKind ProductKind

The registered product kind when found; otherwise null.

Returns

bool

true when the identifier is registered; otherwise false.

Exceptions

ArgumentNullException

Thrown when id is null.

ArgumentException

Thrown when id is empty or does not use the supported namespaced format.