Skip to content

Expose entire EndpointBuilder to filter factories#43255

Closed
halter73 wants to merge 4 commits into
mainfrom
halter73/43000
Closed

Expose entire EndpointBuilder to filter factories#43255
halter73 wants to merge 4 commits into
mainfrom
halter73/43000

Conversation

@halter73
Copy link
Copy Markdown
Member

This flows the entire EndpointBuilder through to endpoint filter factories. This gives more context like the display name to filters, and reduces the number of properties in RequestDelegateFactoryOptions and EndpointFilterFactoryContext. And since the EndpointBuilder is usually a RouteEndpointBuilder, filters can observe the route pattern as well.

EndpointBuilder.RequestDelegate must be null if it is passed into the RequestDelegateFactory.Create(). The RequestDelegateFactory sets the RequestDelegate to the same instance returned via RequestDelegateResult.RequestDelegate. This is similar to how we were already mutating the passed-in metadata that was also then returned.

Fixes #43000

Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
Comment thread src/Http/Http.Extensions/src/RequestDelegateFactory.cs Outdated
@Pilchie Pilchie added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Aug 24, 2022
@halter73
Copy link
Copy Markdown
Member Author

Closing in favor of #43543.

@halter73 halter73 closed this Aug 25, 2022
@halter73 halter73 deleted the halter73/43000 branch August 25, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose entire EndpointBuilder to filter factories

3 participants