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); }
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));