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

ContainsInclusion() public static method

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