Table of Contents

Interface IStoreDefinitionRegistry

Namespace
Shard.Stores
Assembly
Shard.Stores.dll

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

bool

Methods

Register(string, StoreDefinitionRecipe)

Registers synchronous Store definitions owned by the specified server module.

void Register(string moduleId, StoreDefinitionRecipe define)

Parameters

moduleId string

The stable, ordinally compared identifier of the server module that owns the definition.

define StoreDefinitionRecipe

The 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 moduleId is empty or contains only whitespace.

ArgumentNullException

Thrown when moduleId or define is 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

moduleId string

The 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 moduleId is empty or contains only whitespace.

ArgumentNullException

Thrown when moduleId is null.

InvalidOperationException

Thrown when the registry is frozen or the exact module identifier is already registered.