Table of Contents

Class WorldCatalog

Namespace
TileWorld.Engine.Storage
Assembly
TileWorld.Engine.dll

Scans and creates persisted worlds inside a common worlds root directory.

public sealed class WorldCatalog
Inheritance
WorldCatalog
Inherited Members

Constructors

WorldCatalog()

Creates a world catalog rooted at the default application worlds directory.

public WorldCatalog()

WorldCatalog(string, WorldStorage)

Creates a world catalog with explicit root path and storage dependencies.

public WorldCatalog(string worldsRootPath, WorldStorage worldStorage)

Parameters

worldsRootPath string

The directory that contains all world folders.

worldStorage WorldStorage

The storage backend used to load and save world metadata.

Properties

WorldsRootPath

Gets the root directory that contains all persisted worlds.

public string WorldsRootPath { get; }

Property Value

string

Methods

CreateWorld(WorldCreationOptions)

Creates a new world folder with minimal metadata and returns the resulting catalog entry.

public WorldCatalogEntry CreateWorld(WorldCreationOptions options)

Parameters

options WorldCreationOptions

The creation parameters for the new world.

Returns

WorldCatalogEntry

The newly created world catalog entry.

EnumerateWorlds()

Enumerates all valid worlds currently persisted under the catalog root.

public IReadOnlyList<WorldCatalogEntry> EnumerateWorlds()

Returns

IReadOnlyList<WorldCatalogEntry>

The discovered world entries sorted by most recent activity.