public static RouteMatched ( IEnumerable |
||
matchedRestrictions | IEnumerable |
|
cacheKey | string | |
리턴 |
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);
}
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)); }