Junior.Route.Routing.MatchResult.RouteMatched C# (CSharp) Method

RouteMatched() public static method

public static RouteMatched ( IEnumerable matchedRestrictions, string cacheKey ) : MatchResult
matchedRestrictions IEnumerable
cacheKey string
return MatchResult
        public static MatchResult RouteMatched(IEnumerable<IRestriction> matchedRestrictions, string cacheKey)
        {
            matchedRestrictions.ThrowIfNull("matchedRestrictions");
            cacheKey.ThrowIfNull("cacheKey");

            return new MatchResult(MatchResultType.RouteMatched, matchedRestrictions, Enumerable.Empty<IRestriction>(), cacheKey);
        }

Usage Example

Exemplo n.º 1
0
        public MatchResult MatchesRequest(HttpRequestBase request)
        {
            request.ThrowIfNull("request");

            Restrictions.MatchResult matchResult = new AndRestriction(_restrictions).MatchesRequest(request);

            return(matchResult.ResultType == Restrictions.MatchResultType.RestrictionMatched
                                ? MatchResult.RouteMatched(matchResult.MatchedRestrictions, _id.ToString())
                                : MatchResult.RouteNotMatched(matchResult.MatchedRestrictions, matchResult.UnmatchedRestrictions));
        }
All Usage Examples Of Junior.Route.Routing.MatchResult::RouteMatched