Exemple #1
0
        public static bool IsMatch(string pattern, string text, WildMatchFlags flags, out bool matched)
        {
            if (pattern == null)
            {
                throw new ArgumentNullException(nameof(pattern));
            }
            if (text == null)
            {
                throw new ArgumentNullException(nameof(text));
            }

            var result = GitWildMatch.dowild(pattern, text, flags);

            matched = result == GitWildMatch.WM_MATCH;
            return(matched || result == GitWildMatch.WM_NOMATCH);
        }
Exemple #2
0
 public static bool IsMatch(string pattern, string text, WildMatchFlags flags)
 => IsMatch(pattern, text, flags, out var matched) ? matched
      : throw new ArgumentException("Pattern is malformed.", nameof(pattern));