Esempio n. 1
0
 public DependencyPattern(string pattern, bool ignoreCase)
 {
     string[] patternParts = pattern.Split('\'');
     _evals =
         patternParts[0].Split('&')
         .Select(element => CreateEval(element, COUNT_FIELD_NAME_PATTERN, s => s))
         .ToArray();
     _markerPattern = new MarkerMatch(patternParts.Length > 1 ? patternParts[1] : "", ignoreCase);
 }
Esempio n. 2
0
 public ItemMatch([CanBeNull] ItemType itemTypeOrNull, [NotNull] string pattern, int upperBoundOfGroupCount, bool ignoreCase, bool anyWhereMatcherOk)
 {
     if (pattern.StartsWith("~"))
     {
         _inverse = true;
         pattern  = pattern.Substring(1);
     }
     else
     {
         _inverse = false;
     }
     string[] patternParts = pattern.Split('\'');
     _itemPattern   = new ItemPattern(itemTypeOrNull, patternParts[0], upperBoundOfGroupCount, ignoreCase, anyWhereMatcherOk);
     _markerPattern = new MarkerMatch(patternParts.Length > 1 ? patternParts[1] : "", ignoreCase);
     Representation = pattern;
 }