Class MapReader
- Namespace
- DotTiled.Serialization
- Assembly
- DotTiled.dll
Reads a map from a string, regardless of format.
public class MapReader : IMapReader, IDisposable
- Inheritance
-
MapReader
- Implements
- Inherited Members
Constructors
MapReader(string, Func<string, Tileset>, Func<string, Template>, Func<string, ICustomTypeDefinition>)
Constructs a new MapReader, capable of reading a map from a string, regardless of format.
public MapReader(string map, Func<string, Tileset> externalTilesetResolver, Func<string, Template> externalTemplateResolver, Func<string, ICustomTypeDefinition> customTypeResolver)
Parameters
map
stringThe string containing the map 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
ReadMap()
Reads a map from the source.
public Map ReadMap()
Returns
- Map
The parsed map.