Class AssetRegistry
Owns typed asset definitions and advances every registered store through one load-time pipeline. Feature modules contribute stores during setup; all callbacks are discarded after preparation or failure.
public sealed class AssetRegistry
- Inheritance
-
AssetRegistry
- Inherited Members
Properties
IsFaulted
public bool IsFaulted { get; }
Property Value
IsPrepared
public bool IsPrepared { get; }
Property Value
IsResolved
public bool IsResolved { get; }
Property Value
RegisteredTypes
public ImmutableArray<AssetTypeInfo> RegisteredTypes { get; }
Property Value
TagIndices
The shared tag index populated during resolution and referenced by asset packets.
public IReadOnlyDictionary<string, int> TagIndices { get; }
Property Value
TotalAssets
public int TotalAssets { get; }
Property Value
Warnings
Gets the attributed diagnostics that did not fail preparation and were published with the asset snapshot.
public IReadOnlyList<AssetWarning> Warnings { get; }
Property Value
Remarks
The list remains empty until IsPrepared is true.
WarningsTruncated
Reports whether one or more codec operations omitted or shortened warning diagnostics.
public bool WarningsTruncated { get; }
Property Value
Methods
GetDependency<T>(AssetTypeDefinition<T>)
Reads an immutable dependency candidate from a typed lifecycle callback before final publication.
public AssetMap<T> GetDependency<T>(AssetTypeDefinition<T> definition) where T : notnull
Parameters
definitionAssetTypeDefinition<T>
Returns
- AssetMap<T>
Type Parameters
T
GetDependency<T>(AssetDefinitionBinding<T>)
Reads an immutable dependency candidate for an asset definition bound to a host.
public AssetMap<T> GetDependency<T>(AssetDefinitionBinding<T> binding) where T : notnull
Parameters
bindingAssetDefinitionBinding<T>
Returns
- AssetMap<T>
Type Parameters
T
GetOrCreateTagIndex(string)
Creates or returns a tag index during Resolve; every other pipeline phase is read-only.
public int GetOrCreateTagIndex(string tag)
Parameters
tagstring
Returns
GetTagIndex(string)
Gets an index established during Resolve without mutating the shared tag table.
public int GetTagIndex(string tag)
Parameters
tagstring
Returns
Get<T>(AssetTypeDefinition<T>)
Returns the frozen lookup snapshot published for an asset definition after preparation completes.
public AssetMap<T> Get<T>(AssetTypeDefinition<T> definition) where T : notnull
Parameters
definitionAssetTypeDefinition<T>
Returns
- AssetMap<T>
Type Parameters
T
Get<T>(AssetDefinitionBinding<T>)
Returns the frozen lookup snapshot published for an asset definition bound to a host.
public AssetMap<T> Get<T>(AssetDefinitionBinding<T> binding) where T : notnull
Parameters
bindingAssetDefinitionBinding<T>
Returns
- AssetMap<T>
Type Parameters
T
IndexIn(string, string?)
Resolve an asset name to its index in another store (0 = EMPTY when absent).
public int IndexIn(string storeType, string? assetName)
Parameters
Returns
Load(string)
public void Load(string serverRoot)
Parameters
serverRootstring
Load(string, IAssetSource)
public void Load(string serverRoot, IAssetSource assetSource)
Parameters
serverRootstringassetSourceIAssetSource
Materialize()
public void Materialize()
Prepare()
Builds contributed setup packets and permanently releases every callback target.
public IReadOnlyList<IToClientPacket> Prepare()
Returns
- IReadOnlyList<IToClientPacket>
Register(string, IReadOnlyList<AssetStoreRegistration>)
Registers exactly one atomic store batch for a diagnostic module owner before loading starts. The owner identifies failures; it is not a caller-authentication boundary.
public void Register(string ownerModuleId, IReadOnlyList<AssetStoreRegistration> registrations)
Parameters
ownerModuleIdstringregistrationsIReadOnlyList<AssetStoreRegistration>
Resolve()
Runs contributed resolvers once in the dependency order captured at load time.
public void Resolve()
TryGetDependency<T>(AssetTypeDefinition<T>, out AssetMap<T>?)
Tries to read an immutable dependency candidate from a typed lifecycle callback.
public bool TryGetDependency<T>(AssetTypeDefinition<T> definition, out AssetMap<T>? assets) where T : notnull
Parameters
definitionAssetTypeDefinition<T>assetsAssetMap<T>
Returns
Type Parameters
T
TryGetDependency<T>(AssetDefinitionBinding<T>, out AssetMap<T>?)
Tries to read an immutable dependency candidate for an asset definition bound to a host.
public bool TryGetDependency<T>(AssetDefinitionBinding<T> binding, out AssetMap<T>? assets) where T : notnull
Parameters
bindingAssetDefinitionBinding<T>assetsAssetMap<T>
Returns
Type Parameters
T
TryIndexIn(string, string?, out int)
Tries to resolve an asset name through a published typed index.
public bool TryIndexIn(string storeType, string? assetName, out int index)
Parameters
Returns
Validate(ICommonAssetStore)
public void Validate(ICommonAssetStore common)
Parameters
commonICommonAssetStore