public FileSourceHierarchicalPathMatcher(FileSourceMatchInfo matchInfo) { List <FileSourceEvaluablePathMatcher> evaluators = new List <FileSourceEvaluablePathMatcher>(); for (int i = matchInfo.Modifiers.Count - 1; i >= 0; i--) { evaluators.Add(new FileSourceEvaluablePathMatcher(matchInfo.Modifiers[i])); } evaluators.Add(new FileSourceEvaluablePathMatcher(matchInfo.TopLevelEvaluable)); _evaluators = evaluators; _cachedEvaluatedPath = string.Empty; _cachedStatesForFile = FileDispositionStates.None; }
public void SetupFileSource(FileSourceMatchInfo source) { FileSourceHierarchicalPathMatcher matcher = new FileSourceHierarchicalPathMatcher(source); Include = new List <IPathMatcher>() { new FileSourceStateMatcher(FileDispositionStates.Include, matcher) }; Exclude = new List <IPathMatcher>() { new FileSourceStateMatcher(FileDispositionStates.Exclude, matcher) }; CopyOnly = new List <IPathMatcher>() { new FileSourceStateMatcher(FileDispositionStates.CopyOnly, matcher) }; Rename = source.Renames ?? new Dictionary <string, string>(StringComparer.Ordinal); }