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); } }
private GlobRegexItem(GlobRegexItemType itemType) { ItemType = itemType; }