Table of Contents

Interface IItemTemplateService

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

Stores and resolves item template definitions loaded from template files.

public interface IItemTemplateService

Properties

Count

Gets the number of templates currently registered.

int Count { get; }

Property Value

int

Methods

Clear()

Removes all registered templates.

void Clear()

GetAll()

Returns all templates as a snapshot.

IReadOnlyList<ItemTemplateDefinition> GetAll()

Returns

IReadOnlyList<ItemTemplateDefinition>

List of currently registered templates.

TryGet(string, out ItemTemplateDefinition?)

Tries to get a template by id.

bool TryGet(string id, out ItemTemplateDefinition? definition)

Parameters

id string

Template id.

definition ItemTemplateDefinition

Resolved template when present.

Returns

bool

true when found; otherwise false.

Upsert(ItemTemplateDefinition)

Adds or replaces a template by identifier.

void Upsert(ItemTemplateDefinition definition)

Parameters

definition ItemTemplateDefinition

Template instance to register.

UpsertRange(IEnumerable<ItemTemplateDefinition>)

Adds or replaces multiple templates.

void UpsertRange(IEnumerable<ItemTemplateDefinition> templates)

Parameters

templates IEnumerable<ItemTemplateDefinition>

Templates to register.