private bool TryFilter(string path, out string searchPattern, out PathFilter filter) { searchPattern = null; filter = null; if (UseSimpleSearch(path)) { return(false); } filter = PathFilter.Create(_BasePath, path); var patternSeparator = path.LastIndexOfAny(PathSeparatorCharacters) + 1; searchPattern = path.Substring(patternSeparator, path.Length - patternSeparator); return(true); }
internal PathFilter Build() { return(PathFilter.Create(_BasePath, _Expressions.ToArray(), _MatchResult)); }