Interface IItemTemplateService
- Namespace
- Moongate.UO.Data.Interfaces.Templates
- Assembly
- Moongate.UO.Data.dll
Stores and resolves item template definitions loaded from template files.
public interface IItemTemplateService
Properties
Count
Gets the number of templates currently registered.
int Count { get; }
Property Value
Methods
Clear()
Removes all registered templates.
void Clear()
GetAll()
Returns all templates as a snapshot.
IReadOnlyList<ItemTemplateDefinition> GetAll()
Returns
- IReadOnlyList<ItemTemplateDefinition>
List of currently registered templates.
TryGet(string, out ItemTemplateDefinition?)
Tries to get a template by id.
bool TryGet(string id, out ItemTemplateDefinition? definition)
Parameters
idstringTemplate id.
definitionItemTemplateDefinitionResolved template when present.
Returns
- bool
truewhen found; otherwisefalse.
Upsert(ItemTemplateDefinition)
Adds or replaces a template by identifier.
void Upsert(ItemTemplateDefinition definition)
Parameters
definitionItemTemplateDefinitionTemplate instance to register.
UpsertRange(IEnumerable<ItemTemplateDefinition>)
Adds or replaces multiple templates.
void UpsertRange(IEnumerable<ItemTemplateDefinition> templates)
Parameters
templatesIEnumerable<ItemTemplateDefinition>Templates to register.