Skip to content

Remove trim attributes from AddEndpointFilter extensions #44738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Http/Routing/src/Builder/EndpointFilterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public static class EndpointFilterExtensions
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <param name="filter">The <see cref="IEndpointFilter"/> to register.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, IEndpointFilter filter) where TBuilder : IEndpointConventionBuilder =>
builder.AddEndpointFilterFactory((routeHandlerContext, next) => (context) => filter.InvokeAsync(context, next));

Expand All @@ -30,7 +29,6 @@ public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, IEndpo
/// <typeparam name="TFilterType">The type of the <see cref="IEndpointFilter"/> to register.</typeparam>
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static TBuilder AddEndpointFilter<TBuilder, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TFilterType>(this TBuilder builder)
where TBuilder : IEndpointConventionBuilder
where TFilterType : IEndpointFilter
Expand Down Expand Up @@ -65,7 +63,6 @@ public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, IEndpo
/// <typeparam name="TFilterType">The type of the <see cref="IEndpointFilter"/> to register.</typeparam>
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static RouteHandlerBuilder AddEndpointFilter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TFilterType>(this RouteHandlerBuilder builder)
where TFilterType : IEndpointFilter
{
Expand All @@ -79,7 +76,6 @@ public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, IEndpo
/// <typeparam name="TFilterType">The type of the <see cref="IEndpointFilter"/> to register.</typeparam>
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static RouteGroupBuilder AddEndpointFilter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TFilterType>(this RouteGroupBuilder builder)
where TFilterType : IEndpointFilter
{
Expand All @@ -93,7 +89,6 @@ public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, IEndpo
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <param name="routeHandlerFilter">A method representing the core logic of the filter.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, Func<EndpointFilterInvocationContext, EndpointFilterDelegate, ValueTask<object?>> routeHandlerFilter)
where TBuilder : IEndpointConventionBuilder
{
Expand All @@ -106,7 +101,6 @@ public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, Func<E
/// <param name="builder">The <see cref="RouteHandlerBuilder"/>.</param>
/// <param name="filterFactory">A method representing the logic for constructing the filter.</param>
/// <returns>A <see cref="RouteHandlerBuilder"/> that can be used to further customize the route handler.</returns>
[RequiresUnreferencedCode(EndpointRouteBuilderExtensions.MapEndpointTrimmerWarning)]
public static TBuilder AddEndpointFilterFactory<TBuilder>(this TBuilder builder, Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate> filterFactory)
where TBuilder : IEndpointConventionBuilder
{
Expand Down