Class MobileTemplateService
In-memory registry for mobile templates keyed by template id.
public sealed class MobileTemplateService : IMobileTemplateService
- Inheritance
-
MobileTemplateService
- Implements
- Inherited Members
Properties
Count
Gets the number of registered mobile templates.
public int Count { get; }
Property Value
Methods
Clear()
Removes all registered templates.
public void Clear()
GetAll()
Gets all templates as a snapshot list.
public IReadOnlyList<MobileTemplateDefinition> GetAll()
Returns
- IReadOnlyList<MobileTemplateDefinition>
All registered templates.
TryGet(string, out MobileTemplateDefinition?)
Tries to resolve a template by id.
public 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.
public void Upsert(MobileTemplateDefinition definition)
Parameters
definitionMobileTemplateDefinitionTemplate to register.
UpsertRange(IEnumerable<MobileTemplateDefinition>)
Adds or replaces multiple mobile templates.
public void UpsertRange(IEnumerable<MobileTemplateDefinition> definitions)
Parameters
definitionsIEnumerable<MobileTemplateDefinition>Templates to register.