Table of Contents

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

int

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

id string

Template identifier.

document StartupTemplateDocument

Resolved document when present.

Returns

bool

true when found; otherwise false.

Upsert(string, JsonElement)

Adds or replaces a startup template payload by identifier.

void Upsert(string id, JsonElement content)

Parameters

id string

Template identifier.

content JsonElement

Template JSON payload.