Table of Contents

Class TemplateReader

Namespace
DotTiled.Serialization
Assembly
DotTiled.dll

Reads a template from a string, regardless of format.

public class TemplateReader : ITemplateReader, IDisposable
Inheritance
TemplateReader
Implements
Inherited Members

Constructors

TemplateReader(string, Func<string, Tileset>, Func<string, Template>, Func<string, ICustomTypeDefinition>)

Constructs a new TemplateReader, capable of reading a template from a string, regardless of format.

public TemplateReader(string template, Func<string, Tileset> externalTilesetResolver, Func<string, Template> externalTemplateResolver, Func<string, ICustomTypeDefinition> customTypeResolver)

Parameters

template string

The string containing the template data.

externalTilesetResolver Func<string, Tileset>

A function that resolves external tilesets given their source.

externalTemplateResolver Func<string, Template>

A function that resolves external templates given their source.

customTypeResolver Func<string, ICustomTypeDefinition>

A function that resolves custom types given their source.

Exceptions

ArgumentNullException

Thrown when any of the arguments are null.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

ReadTemplate()

Reads a template from the source.

public Template ReadTemplate()

Returns

Template

The parsed template.