Class ProductPackagingContentProfileRegistry
Registers process-lifetime packaging-content profiles by product and packaging ID.
public static class ProductPackagingContentProfileRegistry
- Inheritance
-
ProductPackagingContentProfileRegistry
- Inherited Members
Remarks
Keys are case-insensitive. Registration does not transmit assets; every participating peer must register matching product definitions and profiles locally.
Methods
Register(string, string, string, ProductPackagingContentProfile)
Registers content for one stable product and packaging pair.
public static ProductPackagingContentProfile Register(string ownerId, string productId, string packagingId, ProductPackagingContentProfile profile)
Parameters
ownerIdstringThe stable ID of the owning mod.
productIdstringThe stable, namespaced custom product ID.
packagingIdstringThe packaging definition ID, such as
baggie.profileProductPackagingContentProfileThe immutable packaging-content profile.
Returns
- ProductPackagingContentProfile
The retained profile.
Exceptions
- ArgumentNullException
Thrown when an argument is null.
- ArgumentException
Thrown when an ID is empty or
productIdis not namespaced.- InvalidOperationException
Thrown when the product/packaging pair has a conflicting owner or profile.
RegisterForProductKind(string, string, string, ProductPackagingContentProfile)
Registers packaging content as a fallback for every custom product of one logical kind.
public static ProductPackagingContentProfile RegisterForProductKind(string ownerId, string productKindId, string packagingId, ProductPackagingContentProfile profile)
Parameters
ownerIdstringproductKindIdstringpackagingIdstringprofileProductPackagingContentProfile
Returns
Remarks
A product-specific registration still wins. This fallback is useful for generated mixes, whose stable product IDs are allocated by the native mixing lifecycle.