Class ProductPresentationProfileRegistry
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
ownerIdstringThe stable ID of the owning mod.
productIdstringThe stable product ID.
profileProductPresentationProfileThe 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
productIdis 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
ownerIdstringThe stable ID of the owning mod.
productKindProductKindThe immutable product kind.
profileProductPresentationProfileThe immutable presentation profile.
Returns
- ProductPresentationProfile
The registered profile, or the same retained profile on an idempotent call.
Exceptions
- ArgumentNullException
Thrown when
productKindorprofileis null.- InvalidOperationException
Thrown when the key has a conflicting owner or profile, or a required context cannot be applied to an existing product.