コード例 #1
0
ファイル: Matcher.cs プロジェクト: ermshiperete/machine
        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);
 }