Interface IStoreDefinitionRegistry
Collects in-process server Store definitions before any gameplay world is created.
public interface IStoreDefinitionRegistry
Remarks
Registrations are applied to every created Store in registration order after the registry is frozen. Registration records definitions without invoking them; a definition failure is reported when a Store is composed and aborts that candidate Store.
This interface is not an external-mod ABI. Native mods use generated ABI-safe contracts.
Properties
IsFrozen
Gets whether registration has closed and the immutable definition set has been captured.
bool IsFrozen { get; }
Property Value
Methods
Register(string, StoreDefinitionRecipe)
Registers synchronous Store definitions owned by the specified server module.
void Register(string moduleId, StoreDefinitionRecipe define)
Parameters
moduleIdstringThe stable, ordinally compared identifier of the server module that owns the definition.
defineStoreDefinitionRecipeThe synchronous definition recipe applied to each created Store after freezing.
Remarks
Recipes run in registration order. Registration does not invoke
define or validate its Store effects.
Exceptions
- ArgumentException
Thrown when
moduleIdis empty or contains only whitespace.- ArgumentNullException
Thrown when
moduleIdordefineis null.- InvalidOperationException
Thrown when the registry is frozen or the exact module identifier is already registered.
Register<TModule>(string)
Registers one root Flecs module owned by the specified server module.
void Register<TModule>(string moduleId) where TModule : IFlecsModule, new()
Parameters
moduleIdstringThe stable, ordinally compared identifier of the server module that owns the definition.
Type Parameters
TModule
Remarks
The Flecs module is imported into each created Store after the registry freezes.
Exceptions
- ArgumentException
Thrown when
moduleIdis empty or contains only whitespace.- ArgumentNullException
Thrown when
moduleIdis null.- InvalidOperationException
Thrown when the registry is frozen or the exact module identifier is already registered.