diff --git a/src/Http/HttpAbstractions.slnf b/src/Http/HttpAbstractions.slnf
index 70fc8b56f6a8..29d4f41c4e69 100644
--- a/src/Http/HttpAbstractions.slnf
+++ b/src/Http/HttpAbstractions.slnf
@@ -2,6 +2,10 @@
"solution": {
"path": "..\\..\\AspNetCore.sln",
"projects": [
+ "src\\DataProtection\\Abstractions\\src\\Microsoft.AspNetCore.DataProtection.Abstractions.csproj",
+ "src\\DataProtection\\Cryptography.Internal\\src\\Microsoft.AspNetCore.Cryptography.Internal.csproj",
+ "src\\DataProtection\\DataProtection\\src\\Microsoft.AspNetCore.DataProtection.csproj",
+ "src\\DefaultBuilder\\src\\Microsoft.AspNetCore.csproj",
"src\\Extensions\\Features\\src\\Microsoft.Extensions.Features.csproj",
"src\\Extensions\\Features\\test\\Microsoft.Extensions.Features.Tests.csproj",
"src\\Hosting\\Abstractions\\src\\Microsoft.AspNetCore.Hosting.Abstractions.csproj",
@@ -43,15 +47,25 @@
"src\\Http\\samples\\MinimalSample\\MinimalSample.csproj",
"src\\Http\\samples\\SampleApp\\HttpAbstractions.SampleApp.csproj",
"src\\Middleware\\CORS\\src\\Microsoft.AspNetCore.Cors.csproj",
+ "src\\Middleware\\Diagnostics.Abstractions\\src\\Microsoft.AspNetCore.Diagnostics.Abstractions.csproj",
+ "src\\Middleware\\Diagnostics\\src\\Microsoft.AspNetCore.Diagnostics.csproj",
+ "src\\Middleware\\HostFiltering\\src\\Microsoft.AspNetCore.HostFiltering.csproj",
"src\\Middleware\\HttpOverrides\\src\\Microsoft.AspNetCore.HttpOverrides.csproj",
+ "src\\Middleware\\OutputCaching\\src\\Microsoft.AspNetCore.OutputCaching.csproj",
+ "src\\Middleware\\ResponseCaching.Abstractions\\src\\Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj",
"src\\Middleware\\StaticFiles\\src\\Microsoft.AspNetCore.StaticFiles.csproj",
+ "src\\Mvc\\Mvc.Abstractions\\src\\Microsoft.AspNetCore.Mvc.Abstractions.csproj",
+ "src\\Mvc\\Mvc.Core\\src\\Microsoft.AspNetCore.Mvc.Core.csproj",
"src\\ObjectPool\\src\\Microsoft.Extensions.ObjectPool.csproj",
+ "src\\Security\\Authentication\\Core\\src\\Microsoft.AspNetCore.Authentication.csproj",
"src\\Security\\Authorization\\Core\\src\\Microsoft.AspNetCore.Authorization.csproj",
"src\\Security\\Authorization\\Policy\\src\\Microsoft.AspNetCore.Authorization.Policy.csproj",
"src\\Servers\\Connections.Abstractions\\src\\Microsoft.AspNetCore.Connections.Abstractions.csproj",
"src\\Servers\\IIS\\IISIntegration\\src\\Microsoft.AspNetCore.Server.IISIntegration.csproj",
+ "src\\Servers\\IIS\\IIS\\src\\Microsoft.AspNetCore.Server.IIS.csproj",
"src\\Servers\\Kestrel\\Core\\src\\Microsoft.AspNetCore.Server.Kestrel.Core.csproj",
"src\\Servers\\Kestrel\\Kestrel\\src\\Microsoft.AspNetCore.Server.Kestrel.csproj",
+ "src\\Servers\\Kestrel\\Transport.Quic\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj",
"src\\Servers\\Kestrel\\Transport.Sockets\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj",
"src\\Testing\\src\\Microsoft.AspNetCore.Testing.csproj",
"src\\WebEncoders\\src\\Microsoft.Extensions.WebEncoders.csproj"
diff --git a/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs b/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs
index 250028ea951b..bcbe36c63524 100644
--- a/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs
+++ b/src/Http/Routing/src/Builder/EndpointRouteBuilderExtensions.cs
@@ -63,7 +63,6 @@ public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints, R
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapGet(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -80,7 +79,6 @@ public static IEndpointConventionBuilder MapGet(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapPost(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -97,7 +95,6 @@ public static IEndpointConventionBuilder MapPost(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapPut(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -114,7 +111,6 @@ public static IEndpointConventionBuilder MapPut(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapDelete(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -131,7 +127,6 @@ public static IEndpointConventionBuilder MapDelete(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapPatch(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -149,7 +144,6 @@ public static IEndpointConventionBuilder MapPatch(
/// The delegate executed when the endpoint is matched.
/// HTTP methods that the endpoint will match.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder MapMethods(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -172,7 +166,6 @@ public static IEndpointConventionBuilder MapMethods(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder Map(
this IEndpointRouteBuilder endpoints,
[StringSyntax("Route")] string pattern,
@@ -189,7 +182,6 @@ public static IEndpointConventionBuilder Map(
/// The route pattern.
/// The delegate executed when the endpoint is matched.
/// A that can be used to further customize the endpoint.
- [RequiresUnreferencedCode(MapEndpointTrimmerWarning)]
public static IEndpointConventionBuilder Map(
this IEndpointRouteBuilder endpoints,
RoutePattern pattern,
@@ -199,12 +191,6 @@ public static IEndpointConventionBuilder Map(
ArgumentNullException.ThrowIfNull(pattern);
ArgumentNullException.ThrowIfNull(requestDelegate);
- var returnType = requestDelegate.Method.ReturnType;
- if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Task<>))
- {
- return Map(endpoints, pattern, requestDelegate as Delegate);
- }
-
const int defaultOrder = 0;
var builder = new RouteEndpointBuilder(
diff --git a/src/Http/Routing/test/UnitTests/Builder/RequestDelegateEndpointRouteBuilderExtensionsTest.cs b/src/Http/Routing/test/UnitTests/Builder/RequestDelegateEndpointRouteBuilderExtensionsTest.cs
index 292a8b6ff575..42d69cd96c52 100644
--- a/src/Http/Routing/test/UnitTests/Builder/RequestDelegateEndpointRouteBuilderExtensionsTest.cs
+++ b/src/Http/Routing/test/UnitTests/Builder/RequestDelegateEndpointRouteBuilderExtensionsTest.cs
@@ -35,28 +35,28 @@ public static object[][] MapMethods
{
get
{
- IEndpointConventionBuilder MapGet(IEndpointRouteBuilder routes, string template, RequestDelegate action) =>
+ IEndpointConventionBuilder MapGet(IEndpointRouteBuilder routes, string template, Delegate action) =>
routes.MapGet(template, action);
- IEndpointConventionBuilder MapPost(IEndpointRouteBuilder routes, string template, RequestDelegate action) =>
+ IEndpointConventionBuilder MapPost(IEndpointRouteBuilder routes, string template, Delegate action) =>
routes.MapPost(template, action);
- IEndpointConventionBuilder MapPut(IEndpointRouteBuilder routes, string template, RequestDelegate action) =>
+ IEndpointConventionBuilder MapPut(IEndpointRouteBuilder routes, string template, Delegate action) =>
routes.MapPut(template, action);
- IEndpointConventionBuilder MapDelete(IEndpointRouteBuilder routes, string template, RequestDelegate action) =>
+ IEndpointConventionBuilder MapDelete(IEndpointRouteBuilder routes, string template, Delegate action) =>
routes.MapDelete(template, action);
- IEndpointConventionBuilder Map(IEndpointRouteBuilder routes, string template, RequestDelegate action) =>
+ IEndpointConventionBuilder Map(IEndpointRouteBuilder routes, string template, Delegate action) =>
routes.Map(template, action);
return new object[][]
{
- new object[] { (Func)MapGet },
- new object[] { (Func)MapPost },
- new object[] { (Func)MapPut },
- new object[] { (Func)MapDelete },
- new object[] { (Func)Map },
+ new object[] { (Func)MapGet },
+ new object[] { (Func)MapPost },
+ new object[] { (Func)MapPut },
+ new object[] { (Func)MapDelete },
+ new object[] { (Func)Map },
};
}
}
@@ -81,7 +81,7 @@ public void MapEndpoint_StringPattern_BuildsEndpoint()
[Theory]
[MemberData(nameof(MapMethods))]
- public async Task MapEndpoint_ReturnGenericTypeTask_GeneratedDelegate(Func map)
+ public async Task MapEndpoint_ReturnGenericTypeTask_GeneratedDelegate(Func map)
{
var httpContext = new DefaultHttpContext();
var responseBodyStream = new MemoryStream();