public override async Task MatchAsync(HttpContext httpContext) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } var routeContext = new RouteContext(httpContext); await _inner.RouteAsync(routeContext); if (routeContext.Handler != null) { httpContext.Request.RouteValues = routeContext.RouteData.Values; await routeContext.Handler(httpContext); } }
public async override Task MatchAsync(HttpContext httpContext, EndpointSelectorContext context) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } var routeContext = new RouteContext(httpContext); await _inner.RouteAsync(routeContext); if (routeContext.Handler != null) { context.RouteValues = routeContext.RouteData.Values; await routeContext.Handler(httpContext); } }
public async override Task MatchAsync(HttpContext httpContext, IEndpointFeature feature) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } if (feature == null) { throw new ArgumentNullException(nameof(feature)); } var context = new RouteContext(httpContext); await _inner.RouteAsync(context); if (context.Handler != null) { feature.Values = context.RouteData.Values; await context.Handler(httpContext); } }