示例#1
0
 public GlobRegexItem(string content, string plainText, GlobRegexItemType type, bool ignoreCase = true)
 {
     RegexContent = content;
     ItemType     = type;
     PlainText    = plainText;
     if (type == GlobRegexItemType.Regex)
     {
         var regexSegment = $"^{RegexContent}$";
         Regex = ignoreCase ? new Regex(regexSegment, RegexOptions.IgnoreCase) : new Regex(regexSegment);
     }
 }
示例#2
0
 private GlobRegexItem(GlobRegexItemType itemType)
 {
     ItemType = itemType;
 }
示例#3
0
 private GlobRegexItem(GlobRegexItemType itemType)
 {
     ItemType = itemType;
 }
示例#4
0
 public GlobRegexItem(string content, string plainText, GlobRegexItemType type, bool ignoreCase = true)
 {
     RegexContent = content;
     ItemType = type;
     PlainText = plainText;
     if (type == GlobRegexItemType.Regex)
     {
         var regexSegment = $"^{RegexContent}$";
         Regex = ignoreCase ? new Regex(regexSegment, RegexOptions.IgnoreCase) : new Regex(regexSegment);
     }
 }