PathMap

References
public sealed class PathMap
A single path mapping operation.

Properties

Cascade

#
Gets whether this mapping cascades from previous mappings.
public bool Cascade { get; }

HasItemIn

#
Gets whether this mapping has an ITEM identifier for the input.
public bool HasItemIn { get; }

HasItemOut

#
Gets whether this mapping has an ITEM expression for the output.
public bool HasItemOut { get; }

InputFormat

#
Gets the input format, including the item if defined.
public string InputFormat { get; }

MaximumLength

#
Gets the longest path that could possibly match this map. If the map contains sequence wildcards, the maximum length is always int.MaxValue.
public int MaximumLength { get; }

MinimumLength

#
Gets the shortest path that could possibly match this map.
public int MinimumLength { get; }

OutputFormat

#
Gets the output format, including the item if defined.
public string OutputFormat { get; }

PathInCount

#
Gets the number of PATH input identifiers.
public int PathInCount { get; }

PathOutCount

#
Gets the number of PATH output identifiers.
public int PathOutCount { get; }

Methods

Apply

#
Apply this mapping to a path+item pair.
public bool Apply(
path,
Path to map.
item,
Item to map.
out Path
pathOut,
Mapped path.
out int
itemOut,
Mapped item. If there is no defined item mapping, -1 will be returned here, indicating no preferred location for the item.
out string
error
Error in case of failure.
)
True on success, false on failure.

ItemInConstant

#
Gets whether the input item is a constant.
public bool ItemInConstant(
out int
constant
)

ItemInIdentifier

#
Gets the identifier of the input item.
public string ItemInIdentifier()

ItemOutExpression

#
Gets the expression for the output index.
public string ItemOutExpression()

Matches

#
Test whether this mapping applies to a given path and item index.
public bool Matches(
path,
item
)

Matches

#
Test whether this mapping applies to a given path.
public bool Matches(
path
)

PathInConstant

#
Gets whether the i-th input element is a constant.
public bool PathInConstant(
index,
out int
constant
)

PathInIdentifier

#
Gets the identifier associated with the i-th element in the input.
public string PathInIdentifier(
index
)

PathOutConstant

#
Gets whether the i-th input element is a constant.
public bool PathOutConstant(
index,
out int
constant
)

PathOutExpression

#
Gets the expression assigned to the i-th element in the output.
public string PathOutExpression(
index
)

ToString

#
public override string ToString()
Object.ToString

TryParse

#
Parse a mapping notation.
public static Result<PathMap> TryParse(
notation
)