Class AssetMap<T>
Provides immutable lookups and effective tags for one published asset family.
public sealed class AssetMap<T> where T : notnull
Type Parameters
T
- Inheritance
-
AssetMap<T>
- Inherited Members
Properties
Count
public int Count { get; }
Property Value
IndexTable
public IReadOnlyDictionary<string, int> IndexTable { get; }
Property Value
Indexed
public bool Indexed { get; }
Property Value
this[string]
public T this[string key] { get; }
Parameters
keystring
Property Value
- T
Keys
public ImmutableArray<string> Keys { get; }
Property Value
MaxId
Returns the size of the stable index space, including reserved values.
public int MaxId { get; }
Property Value
Methods
Contains(string)
public bool Contains(string key)
Parameters
keystring
Returns
IndexOf(string?)
Resolves an indexed asset key and returns the entry at index zero when the key is absent.
public int IndexOf(string? key)
Parameters
keystring
Returns
TagsOf(string)
public IReadOnlySet<string> TagsOf(string key)
Parameters
keystring
Returns
TryGet(string, out T)
public bool TryGet(string key, out T value)
Parameters
keystringvalueT
Returns
TryGetEntry(string, out string, out T)
Resolves an asset together with the key spelling it is published under.
public bool TryGetEntry(string key, out string normalizedKey, out T value)
Parameters
Returns
TryGetIndex(string?, out int)
Tries to resolve a key without treating a missing entry as index zero.
public bool TryGetIndex(string? key, out int index)