public IResourceMatch GetMatch(string resourcePath) { foreach (ResourceMatchElement element in this) { var match = element.GetMatch(resourcePath); if (match.IsMatch()) { return(match); } } return(ResourceMatches.False(resourcePath)); }
private IResourceMatch GetMatch(string resourceUrl) { if (Include.Count == 0) { return(Exclude.GetMatch(resourceUrl).Inverse()); } var includeMatch = Include.GetMatch(resourceUrl); var excludeMatch = Exclude.GetMatch(resourceUrl); if (includeMatch.IsMatch() && !excludeMatch.IsMatch()) { return(includeMatch); } return(ResourceMatches.False(resourceUrl)); }