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