Class StartupTemplateService
Thread-safe startup template store keyed by template identifier.
public sealed class StartupTemplateService : IStartupTemplateService
- Inheritance
-
StartupTemplateService
- Implements
- Inherited Members
Properties
Count
Gets the number of startup template documents currently registered.
public int Count { get; }
Property Value
Methods
Clear()
Removes all registered startup templates.
public void Clear()
GetAll()
Returns all startup templates as a snapshot.
public IReadOnlyList<StartupTemplateDocument> GetAll()
Returns
- IReadOnlyList<StartupTemplateDocument>
List of currently registered startup templates.
TryGet(string, out StartupTemplateDocument?)
Tries to get a startup template by identifier.
public 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.
public void Upsert(string id, JsonElement content)
Parameters
idstringTemplate identifier.
contentJsonElementTemplate JSON payload.