示例#1
0
        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('*');
        }
示例#2
0
        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('*');
        }
示例#3
0
文件: FileMatcher.cs 项目: KevM/fubu
        private bool matches(FileChangeCategory category, string file)
        {
            var matchers = _matchers[category];

            return(matchers.Any(x => x.Matches(file)));
        }
示例#4
0
文件: FileMatcher.cs 项目: KevM/fubu
 public IEnumerable <IFileMatch> MatchersFor(FileChangeCategory category)
 {
     return(_matchers[category]);
 }
示例#5
0
 public ExactFileMatch(FileChangeCategory category, string file)
 {
     _category = category;
     _file     = file;
 }
示例#6
0
 public ExtensionMatch(FileChangeCategory category, string extension)
 {
     _category = category;
     _extension = Path.GetExtension(extension);
 }
示例#7
0
 public ExactFileMatch(FileChangeCategory category, string file)
 {
     _category = category;
     _file = file;
 }
示例#8
0
 public IEnumerable<IFileMatch> MatchersFor(FileChangeCategory category)
 {
     return _matchers[category];
 }
示例#9
0
 private bool matches(FileChangeCategory category, string file)
 {
     var matchers = _matchers[category];
     return matchers.Any(x => x.Matches(file));
 }
示例#10
0
 public ExtensionMatch(FileChangeCategory category, string extension)
 {
     _category  = category;
     _extension = Path.GetExtension(extension);
 }