public Matcher(Pattern <TData, TOffset> pattern, MatcherSettings <TOffset> settings) { _settings = settings; _settings.Freeze(); _matchComparer = AnonymousEqualityComparer.Create <Match <TData, TOffset> >(MatchEquals, MatchGetHashCode); Compile(pattern); }
public Matcher(SpanFactory <TOffset> spanFactory, Pattern <TData, TOffset> pattern, MatcherSettings <TOffset> settings) { _spanFactory = spanFactory; _settings = settings; _settings.ReadOnly = true; _matchComparer = AnonymousEqualityComparer.Create <Match <TData, TOffset> >(MatchEquals, MatchGetHashCode); Compile(pattern); }
private MatcherSettings(MatcherSettings <TOffset> other) { _dir = other._dir; _filter = other._filter; _useDefaults = other._useDefaults; _nondeterministic = other._nondeterministic; _anchoredToStart = other._anchoredToStart; _anchoredToEnd = other._anchoredToEnd; _allSubmatches = other._allSubmatches; _matchingMethod = other._matchingMethod; }
public override bool ValueEquals(MatcherSettings <TOffset> other) { return(other != null && _dir == other._dir && _filter == other._filter && _useDefaults == other._useDefaults && _nondeterministic == other._nondeterministic && _anchoredToStart == other._anchoredToStart && _anchoredToEnd == other._anchoredToEnd && _allSubmatches == other._allSubmatches && _matchingMethod == other._matchingMethod); }