public EndsWithPatternMatch(FileChangeCategory category, string match) { if (!match.StartsWith("*")) { throw new ArgumentOutOfRangeException("match", "Pattern must start with an '*'"); } _category = category; _match = match; _suffix = _match.TrimStart('*'); }
private bool matches(FileChangeCategory category, string file) { var matchers = _matchers[category]; return(matchers.Any(x => x.Matches(file))); }
public IEnumerable <IFileMatch> MatchersFor(FileChangeCategory category) { return(_matchers[category]); }
public ExactFileMatch(FileChangeCategory category, string file) { _category = category; _file = file; }
public ExtensionMatch(FileChangeCategory category, string extension) { _category = category; _extension = Path.GetExtension(extension); }
public IEnumerable<IFileMatch> MatchersFor(FileChangeCategory category) { return _matchers[category]; }
private bool matches(FileChangeCategory category, string file) { var matchers = _matchers[category]; return matchers.Any(x => x.Matches(file)); }