private Regex PrepareExcludeRegex() { var attrs = CurrentAttributeContext.GetDirectlySetAttributes(); Regex excludePathRegex; if (!attrs.TryGetValue("excludePathRegex", out string excludePathRegexStr)) { excludePathRegex = new Regex("a^", RegexOptions.Compiled); // will match nothing } else { try { excludePathRegex = new Regex(excludePathRegexStr, RegexOptions.Compiled | RegexOptions.IgnoreCase); } catch (ArgumentException e) { throw new SwixSemanticException(CurrentLine, $"Invalid Regex pattern in excludePathRegex argument: {e}"); } } return(excludePathRegex); }
public HarvestSemanticContext(int line, string folder, IAttributeContext context, List <WixComponent> components) : base(line, AddFromFolder(context, folder), components) { _folder = folder; _directlySetAttributes = CurrentAttributeContext.GetDirectlySetAttributes(); }