예제 #1
0
        public Matcher(Pattern <TData, TOffset> pattern, MatcherSettings <TOffset> settings)
        {
            _settings = settings;
            _settings.Freeze();

            _matchComparer = AnonymousEqualityComparer.Create <Match <TData, TOffset> >(MatchEquals, MatchGetHashCode);

            Compile(pattern);
        }
예제 #2
0
        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);
        }
예제 #3
0
 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;
 }
예제 #4
0
 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);
 }