CellPatternMatch
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
Represents a successful pattern match containing all traversed cells and capture information.
public sealed class CellPatternMatchInheritance
Object → CellPatternMatch
Properties
Bounds
Bounding rectangle containing all matched cells.
Returns: Rect
public Rect Bounds { get; }CaptureNames
Names of all captures in this match.
Returns: IReadOnlySet<String>
public IReadOnlySet<string> CaptureNames { get; }Cells
All cells traversed in order.
Returns: IReadOnlyList<TraversedCell>
public IReadOnlyList<TraversedCell> Cells { get; }End
Ending position of the match (last traversed cell).
Returns: ValueTuple<Int32, Int32>
public (int X, int Y) End { get; }Start
Starting position of the match (first traversed cell).
Returns: ValueTuple<Int32, Int32>
public (int X, int Y) Start { get; }Text
Gets the text content of all matched cells.
Returns: String
public string Text { get; }Methods
GetCapture(string)
Gets cells belonging to a named capture. Returns empty list if capture doesn't exist.
Parameters:
name(String):
Returns: IReadOnlyList<TraversedCell>
public IReadOnlyList<TraversedCell> GetCapture(string name)GetCaptureBounds(string)
Gets the bounding rectangle of a named capture. Returns empty rect if capture doesn't exist.
Parameters:
name(String):
Returns: Rect
public Rect GetCaptureBounds(string name)GetCaptureText(string)
Gets the text content of a named capture. Returns empty string if capture doesn't exist.
Parameters:
name(String):
Returns: String
public string GetCaptureText(string name)HasCapture(string)
Checks if a capture with the given name exists.
Parameters:
name(String):
Returns: Boolean
public bool HasCapture(string name)