FindMyFiles
FindMyFiles.Highlighting
RegexHighlighter Class
Highlights a whole-query regex (regex mode) by re-matching the displayed
string. Emphasizes the name field for a name-scope pattern and the path
field for a path-scope one — the same field the engine matched, so
ResultRow's parent/name split applies unchanged. A match-timeout (or
any mismatch with the engine's rust regex) simply yields no ranges: a row
the engine returned is never hidden, only its emphasis is skipped.
public sealed class RegexHighlighter : FindMyFiles.Highlighting.IHighlighter
Inheritance System.Object → RegexHighlighter
Implements IHighlighter
Constructors
RegexHighlighter(Regex, RegexScope) Constructor
Highlights a whole-query regex (regex mode) by re-matching the displayed
string. Emphasizes the name field for a name-scope pattern and the path
field for a path-scope one — the same field the engine matched, so
ResultRow's parent/name split applies unchanged. A match-timeout (or
any mismatch with the engine's rust regex) simply yields no ranges: a row
the engine returned is never hidden, only its emphasis is skipped.
public RegexHighlighter(System.Text.RegularExpressions.Regex re, FindMyFiles.Engine.RegexScope scope);
Parameters
re System.Text.RegularExpressions.Regex
scope RegexScope
Properties
RegexHighlighter.IsEmpty Property
True when nothing will ever be highlighted — the caller can skip per-row work entirely.
public bool IsEmpty { get; }
Implements IsEmpty
Property Value
Methods
RegexHighlighter.Ranges(string, HighlightField) Method
The ranges of text to emphasize for field (UTF-16 units of text), sorted and merged; empty when nothing matches.
public System.Collections.Generic.IReadOnlyList<FindMyFiles.Highlighting.HighlightRange> Ranges(string text, FindMyFiles.Highlighting.HighlightField field);
Parameters
text System.String
The displayed string (a name, or a full path).
field HighlightField
Which displayed string the ranges target.
Implements Ranges(string, HighlightField)
Returns
System.Collections.Generic.IReadOnlyList<HighlightRange>
The sorted, merged highlight ranges; empty when nothing matches.