Пример #1
0
        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);
        }
Пример #2
0
 public HarvestSemanticContext(int line, string folder, IAttributeContext context, List <WixComponent> components)
     : base(line, AddFromFolder(context, folder), components)
 {
     _folder = folder;
     _directlySetAttributes = CurrentAttributeContext.GetDirectlySetAttributes();
 }