Table of Contents

Class MobileTemplateService

Namespace
Moongate.UO.Data.Services.Templates
Assembly
Moongate.UO.Data.dll

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

int

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

id string

Template id.

definition MobileTemplateDefinition

Resolved template when present.

Returns

bool

true when found; otherwise false.

Upsert(MobileTemplateDefinition)

Adds or replaces a mobile template by identifier.

public void Upsert(MobileTemplateDefinition definition)

Parameters

definition MobileTemplateDefinition

Template to register.

UpsertRange(IEnumerable<MobileTemplateDefinition>)

Adds or replaces multiple mobile templates.

public void UpsertRange(IEnumerable<MobileTemplateDefinition> definitions)

Parameters

definitions IEnumerable<MobileTemplateDefinition>

Templates to register.