Rebel.Cms.Web.RouteMatchExtensions.ContainsExclusion C# (CSharp) Method

ContainsExclusion() public static method

Determines whether the collection contains a matching RouteMatchElement, marked as 'exclude', for the specified absolute path.
public static ContainsExclusion ( this routeMatches, string absolutePath ) : bool
routeMatches this
absolutePath string The absolute path.
return bool
        public static bool ContainsExclusion(this IEnumerable<RouteMatchElement> routeMatches, string absolutePath)
        {
            return routeMatches.Cast<RouteMatchElement>().Any(element => element.Type == RouteMatchTypes.Exclude && element.IsMatch(absolutePath));
        }
    }