@@ -63,7 +63,6 @@ public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints, R
63
63
/// <param name="pattern">The route pattern.</param>
64
64
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
65
65
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
66
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
67
66
public static IEndpointConventionBuilder MapGet (
68
67
this IEndpointRouteBuilder endpoints ,
69
68
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -80,7 +79,6 @@ public static IEndpointConventionBuilder MapGet(
80
79
/// <param name="pattern">The route pattern.</param>
81
80
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
82
81
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
83
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
84
82
public static IEndpointConventionBuilder MapPost (
85
83
this IEndpointRouteBuilder endpoints ,
86
84
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -97,7 +95,6 @@ public static IEndpointConventionBuilder MapPost(
97
95
/// <param name="pattern">The route pattern.</param>
98
96
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
99
97
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
100
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
101
98
public static IEndpointConventionBuilder MapPut (
102
99
this IEndpointRouteBuilder endpoints ,
103
100
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -114,7 +111,6 @@ public static IEndpointConventionBuilder MapPut(
114
111
/// <param name="pattern">The route pattern.</param>
115
112
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
116
113
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
117
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
118
114
public static IEndpointConventionBuilder MapDelete (
119
115
this IEndpointRouteBuilder endpoints ,
120
116
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -131,7 +127,6 @@ public static IEndpointConventionBuilder MapDelete(
131
127
/// <param name="pattern">The route pattern.</param>
132
128
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
133
129
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
134
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
135
130
public static IEndpointConventionBuilder MapPatch (
136
131
this IEndpointRouteBuilder endpoints ,
137
132
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -149,7 +144,6 @@ public static IEndpointConventionBuilder MapPatch(
149
144
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
150
145
/// <param name="httpMethods">HTTP methods that the endpoint will match.</param>
151
146
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
152
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
153
147
public static IEndpointConventionBuilder MapMethods (
154
148
this IEndpointRouteBuilder endpoints ,
155
149
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -172,7 +166,6 @@ public static IEndpointConventionBuilder MapMethods(
172
166
/// <param name="pattern">The route pattern.</param>
173
167
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
174
168
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
175
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
176
169
public static IEndpointConventionBuilder Map (
177
170
this IEndpointRouteBuilder endpoints ,
178
171
[ StringSyntax ( "Route" ) ] string pattern ,
@@ -189,7 +182,6 @@ public static IEndpointConventionBuilder Map(
189
182
/// <param name="pattern">The route pattern.</param>
190
183
/// <param name="requestDelegate">The delegate executed when the endpoint is matched.</param>
191
184
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
192
- [ RequiresUnreferencedCode ( MapEndpointTrimmerWarning ) ]
193
185
public static IEndpointConventionBuilder Map (
194
186
this IEndpointRouteBuilder endpoints ,
195
187
RoutePattern pattern ,
@@ -199,12 +191,6 @@ public static IEndpointConventionBuilder Map(
199
191
ArgumentNullException . ThrowIfNull ( pattern ) ;
200
192
ArgumentNullException . ThrowIfNull ( requestDelegate ) ;
201
193
202
- var returnType = requestDelegate . Method . ReturnType ;
203
- if ( returnType . IsGenericType && returnType . GetGenericTypeDefinition ( ) == typeof ( Task < > ) )
204
- {
205
- return Map ( endpoints , pattern , requestDelegate as Delegate ) ;
206
- }
207
-
208
194
const int defaultOrder = 0 ;
209
195
210
196
var builder = new RouteEndpointBuilder (
0 commit comments