Table of Contents

Class ProductPresentationProfileRegistry

Namespace
S1API.Products
Assembly
S1API.dll

Registers process-lifetime presentation profiles for generic custom products.

public static class ProductPresentationProfileRegistry
Inheritance
ProductPresentationProfileRegistry
Inherited Members

Remarks

Product IDs and product-kind IDs are case-insensitive. A product-specific profile takes deterministic precedence over a kind profile. Registration does not transmit assets; every participating peer must register matching product definitions and profiles locally.

Methods

RegisterForProduct(string, string, ProductPresentationProfile)

Registers a profile for one stable custom product ID.

public static ProductPresentationProfile RegisterForProduct(string ownerId, string productId, ProductPresentationProfile profile)

Parameters

ownerId string

The stable ID of the owning mod.

productId string

The stable product ID.

profile ProductPresentationProfile

The immutable presentation profile.

Returns

ProductPresentationProfile

The registered profile, or the same retained profile on an idempotent call.

Exceptions

ArgumentException

Thrown when an ID is empty or productId is not namespaced.

InvalidOperationException

Thrown when the key has a conflicting owner or profile, or a required context cannot be applied to an existing product.

RegisterForProductKind(string, ProductKind, ProductPresentationProfile)

Registers a profile for every generic custom product of one product kind.

public static ProductPresentationProfile RegisterForProductKind(string ownerId, ProductKind productKind, ProductPresentationProfile profile)

Parameters

ownerId string

The stable ID of the owning mod.

productKind ProductKind

The immutable product kind.

profile ProductPresentationProfile

The immutable presentation profile.

Returns

ProductPresentationProfile

The registered profile, or the same retained profile on an idempotent call.

Exceptions

ArgumentNullException

Thrown when productKind or profile is null.

InvalidOperationException

Thrown when the key has a conflicting owner or profile, or a required context cannot be applied to an existing product.