diff --git a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs index 71a66855d2..feeba2cc12 100644 --- a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs +++ b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs @@ -2914,7 +2914,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing public abstract partial class DynamicRouteValueTransformer { protected DynamicRouteValueTransformer() { } - public abstract System.Threading.Tasks.Task TransformAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values); + public abstract System.Threading.Tasks.ValueTask TransformAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values); } [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)] public abstract partial class HttpMethodAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider diff --git a/src/Mvc/Mvc.Core/src/Routing/DynamicRouteValueTransformer.cs b/src/Mvc/Mvc.Core/src/Routing/DynamicRouteValueTransformer.cs index 24a989e77c..b858a9f62f 100644 --- a/src/Mvc/Mvc.Core/src/Routing/DynamicRouteValueTransformer.cs +++ b/src/Mvc/Mvc.Core/src/Routing/DynamicRouteValueTransformer.cs @@ -9,22 +9,22 @@ using Microsoft.AspNetCore.Routing.Matching; namespace Microsoft.AspNetCore.Mvc.Routing { /// - /// Provides an abstraction for dynamically manipulating route value to select a controller action or page. + /// Provides an abstraction for dynamically manipulating route value to select a controller action or page. /// /// /// - /// can be used with + /// can be used with /// /// or MapDynamicPageRoute to implement custom logic that selects a controller action or page. /// /// - /// The route values returned from a implementation + /// The route values returned from a implementation /// will be used to select an action based on matching of the route values. All actions that match the route values - /// will be considered as candidates, and may be further disambiguated by + /// will be considered as candidates, and may be further disambiguated by /// implementations such as . /// /// - /// Implementations should be registered with the service + /// Implementations should be registered with the service /// collection as type . Implementations can use any service /// lifetime. /// @@ -37,6 +37,6 @@ namespace Microsoft.AspNetCore.Mvc.Routing /// The associated with the current request. /// The route values associated with the current match. Implementations should not modify . /// A task which asynchronously returns a set of route values. - public abstract Task TransformAsync(HttpContext httpContext, RouteValueDictionary values); + public abstract ValueTask TransformAsync(HttpContext httpContext, RouteValueDictionary values); } } diff --git a/src/Mvc/test/WebSites/RoutingWebSite/StartupForDynamic.cs b/src/Mvc/test/WebSites/RoutingWebSite/StartupForDynamic.cs index ba8385fd5c..21d44d447d 100644 --- a/src/Mvc/test/WebSites/RoutingWebSite/StartupForDynamic.cs +++ b/src/Mvc/test/WebSites/RoutingWebSite/StartupForDynamic.cs @@ -48,7 +48,7 @@ namespace RoutingWebSite private class Transformer : DynamicRouteValueTransformer { // Turns a format like `controller=Home,action=Index` into an RVD - public override Task TransformAsync(HttpContext httpContext, RouteValueDictionary values) + public override ValueTask TransformAsync(HttpContext httpContext, RouteValueDictionary values) { var kvps = ((string)values["slug"]).Split(","); @@ -59,7 +59,7 @@ namespace RoutingWebSite results[split[0]] = split[1]; } - return Task.FromResult(results); + return new ValueTask(results); } } }