Table of Contents

Interface IResourceCache

Namespace
DotTiled.Serialization
Assembly
DotTiled.dll

Interface for a cache that stores Tiled resources for faster retrieval and reuse.

public interface IResourceCache

Methods

GetTemplate(string)

Retrieves a template from the cache with the given path.

Optional<Template> GetTemplate(string path)

Parameters

path string

The path to the template file.

Returns

Optional<Template>

The template if it exists in the cache; otherwise, Empty.

GetTileset(string)

Retrieves a tileset from the cache with the given path.

Optional<Tileset> GetTileset(string path)

Parameters

path string

The path to the tileset file.

Returns

Optional<Tileset>

The tileset if it exists in the cache; otherwise, Empty.

InsertTemplate(string, Template)

Inserts a template into the cache with the given path.

void InsertTemplate(string path, Template template)

Parameters

path string

The path to the template file.

template Template

The template to insert into the cache.

InsertTileset(string, Tileset)

Inserts a tileset into the cache with the given path.

void InsertTileset(string path, Tileset tileset)

Parameters

path string

The path to the tileset file.

tileset Tileset

The tileset to insert into the cache.