public override bool Execute()
        {
            var excludePaths = Exclude?.Select(exclude => exclude.ItemSpec);

            Output = Process(Input.ItemSpec, excludePaths, OutputPath);
            return(true);
        }
 private void InitializeFilters()
 {
     if (_exclude_filters != null)
     {
         return;
     }
     _exclude_filters = Exclude.Select(f => CreateFilter(f)).ToArray();
     _include_filters = Include.Select(f => CreateFilter(f)).ToArray();
 }
コード例 #3
0
        public void Init()
        {
            // Populate compiled matches.
            CompiledMatches = Match.Select((match) =>
                                           new Regex(match)).ToArray();

            // Populate compiled exclusions.
            CompiledExclusions = Exclude.Select((exclusion) =>
                                                new Regex(exclusion)).ToArray();
        }
コード例 #4
0
        public override XElement ToXml()
        {
            var element = new XElement("Directory",
                                       new XElement("Path", Path),
                                       new XElement("Include", Include.Select(include => include.ToXml())).ToNullIfEmpty(),
                                       new XElement("Exclude", Exclude.Select(exclude => exclude.ToXml())).ToNullIfEmpty(),
                                       Options.ToXml().ToNullIfEmpty());

            FillXml(element);

            return(element);
        }
コード例 #5
0
 public static string FormatExcludeString(Exclude[] _input)
 {
     return string.Join(",", _input.Select(i => Enum.GetName(typeof(Exclude), i)));
 }
コード例 #6
0
ファイル: NgModule.cs プロジェクト: yngvebn/NgAnalyze
 public bool IsExcluded(string dir)
 {
     return(Exclude.Select(RegexHelpers.ToRegex).Any(r => r.IsMatch(dir)));
 }