TerminalRegionCellPatternExtensions
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
Extension methods for searching terminal regions with cell patterns.
public static class TerminalRegionCellPatternExtensionsInheritance
Object → TerminalRegionCellPatternExtensions
Methods
CreateSnapshot(IHex1bTerminalRegion, CellPatternMatch, string)
Creates a snapshot region from a named capture within a match.
Parameters:
region(IHex1bTerminalRegion): The terminal region.match(CellPatternMatch): The pattern match containing the capture.captureName(String): The name of the capture to create a snapshot from.
Returns: Hex1bTerminalSnapshotRegion
A snapshot region covering the capture bounds.
public static Hex1bTerminalSnapshotRegion CreateSnapshot(this IHex1bTerminalRegion region, CellPatternMatch match, string captureName)CreateSnapshot(IHex1bTerminalRegion, CellPatternMatch)
Creates a snapshot region from a pattern match. Uses the match's bounding rectangle.
Parameters:
region(IHex1bTerminalRegion): The terminal region.match(CellPatternMatch): The pattern match to create a snapshot from.
Returns: Hex1bTerminalSnapshotRegion
A snapshot region covering the match bounds.
public static Hex1bTerminalSnapshotRegion CreateSnapshot(this IHex1bTerminalRegion region, CellPatternMatch match)SearchFirstPattern(IHex1bTerminalRegion, CellPatternSearcher)
Searches for the first occurrence of the pattern in this region.
Parameters:
region(IHex1bTerminalRegion): The terminal region to search.pattern(CellPatternSearcher): The pattern to search for.
Returns: CellPatternMatch
The first match found, or null if no match.
public static CellPatternMatch? SearchFirstPattern(this IHex1bTerminalRegion region, CellPatternSearcher pattern)SearchPattern(IHex1bTerminalRegion, CellPatternSearcher)
Searches for all occurrences of the pattern in this region.
Parameters:
region(IHex1bTerminalRegion): The terminal region to search.pattern(CellPatternSearcher): The pattern to search for.
Returns: CellPatternSearchResult
A result containing all matches found.
public static CellPatternSearchResult SearchPattern(this IHex1bTerminalRegion region, CellPatternSearcher pattern)