PathMappings

References
public sealed class PathMappings
An ordered collection of PathMap instances.

Constructors

PathMappings

#
Create a new mapping collection.
public PathMappings(
params PathMap[]
maps
)

Properties

Count

#
Gets the number of mappings stored in this collection.
public int Count { get; }

Indexers

this[]

#
Gets the map at the given index.
public PathMap this[
index
] { get; }

Methods

Apply

#
Apply this collection of mappings to a path+item pair.
public bool Apply(
path,
Input path.
item,
Input item index.
out Path
pathOut,
Mapped output path is successful or the input path if not.
out int
itemOut
Mapped output item index if successful or the input item if not.
)
True if one of the mappings was successful.

Apply

#
Apply these mappings to a data tree.
public ITree Apply(
tree,
Tree to modify.
omitUnaffected,
If true, paths and sites which do not match against any of the mappings in this collection will be omitted from the output.
out Path[]
untouchedPaths,
List of all paths which could not be matched aginst any map.
out Site[]
untouchedSites
List of all sites which could not be matched aginst any map.
)
Mapped tree.

TryParse

#
Parse a sequence of lines into mappings. Empty lines and lines starting with pound symbols will be ignored.
public static Result<PathMappings> TryParse(
params string[]
lines
)