Class ItemTemplateService
public sealed class ItemTemplateService : IItemTemplateService
- Inheritance
-
ItemTemplateService
- Implements
- Inherited Members
Properties
Count
Gets the number of templates currently registered.
public int Count { get; }
Property Value
Methods
Clear()
Removes all registered templates.
public void Clear()
GetAll()
Returns all templates as a snapshot.
public IReadOnlyList<ItemTemplateDefinition> GetAll()
Returns
- IReadOnlyList<ItemTemplateDefinition>
List of currently registered templates.
TryGet(string, out ItemTemplateDefinition?)
Tries to get a template by id.
public 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.
public void Upsert(ItemTemplateDefinition definition)
Parameters
definitionItemTemplateDefinitionTemplate instance to register.
UpsertRange(IEnumerable<ItemTemplateDefinition>)
Adds or replaces multiple templates.
public void UpsertRange(IEnumerable<ItemTemplateDefinition> templates)
Parameters
templatesIEnumerable<ItemTemplateDefinition>Templates to register.