-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Description
Background and Motivation
In .NET 7 preview 6 we made it possible to run RouteHandlerFilter (name TBD) on all endpoints. That implementation always wraps the RequestDelegate
so that all RouteEndpoint(s) will execute filters. We need to make it possible for custom EndpointDataSource to get access to the filter list on the RouteEndpointBuilder.
Proposed API
namespace Microsoft.AspNetCore.Routing;
public static class RouteEndpointBuilder
{
+ public List<Func<RouteHandlerContext, RouteHandlerFilterDelegate, RouteHandlerFilterDelegate>>? RouteHandlerFilterFactories { get; set; }
}
Usage Examples
It's non-trivial to show real usage. Generally these filters need to be composed around a delegate. For that, they need to be exposed.
Risks
None
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels