Interface IStartupTemplateService
- Namespace
- Moongate.UO.Data.Interfaces.Templates
- Assembly
- Moongate.UO.Data.dll
Stores and resolves startup templates loaded from templates/startup.
public interface IStartupTemplateService
Properties
Count
Gets the number of startup template documents currently registered.
int Count { get; }
Property Value
Methods
Clear()
Removes all registered startup templates.
void Clear()
GetAll()
Returns all startup templates as a snapshot.
IReadOnlyList<StartupTemplateDocument> GetAll()
Returns
- IReadOnlyList<StartupTemplateDocument>
List of currently registered startup templates.
TryGet(string, out StartupTemplateDocument?)
Tries to get a startup template by identifier.
bool TryGet(string id, out StartupTemplateDocument? document)
Parameters
idstringTemplate identifier.
documentStartupTemplateDocumentResolved document when present.
Returns
- bool
truewhen found; otherwisefalse.
Upsert(string, JsonElement)
Adds or replaces a startup template payload by identifier.
void Upsert(string id, JsonElement content)
Parameters
idstringTemplate identifier.
contentJsonElementTemplate JSON payload.