diff --git a/src/Microsoft.AspNetCore.Routing/CompositeEndpointDataSource.cs b/src/Microsoft.AspNetCore.Routing/CompositeEndpointDataSource.cs index 36794aeacc..00a24ccfcd 100644 --- a/src/Microsoft.AspNetCore.Routing/CompositeEndpointDataSource.cs +++ b/src/Microsoft.AspNetCore.Routing/CompositeEndpointDataSource.cs @@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Routing foreach (var dataSource in _dataSources) { - Extensions.Primitives.ChangeToken.OnChange( + ChangeToken.OnChange( dataSource.GetChangeToken, HandleChange); } diff --git a/src/Microsoft.AspNetCore.Routing/Internal/EndpointRoutingApplicationBuilderExtensions.cs b/src/Microsoft.AspNetCore.Routing/Internal/EndpointRoutingApplicationBuilderExtensions.cs index 281607cfba..54a5d6a48f 100644 --- a/src/Microsoft.AspNetCore.Routing/Internal/EndpointRoutingApplicationBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Routing/Internal/EndpointRoutingApplicationBuilderExtensions.cs @@ -11,6 +11,7 @@ namespace Microsoft.AspNetCore.Internal { public static class EndpointRoutingApplicationBuilderExtensions { + // Property key is used by MVC package to check that routing is registered private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered"; public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder) diff --git a/src/Microsoft.AspNetCore.Routing/RouteValuesBasedEndpointFinder.cs b/src/Microsoft.AspNetCore.Routing/RouteValuesBasedEndpointFinder.cs index f7d6b77023..042cda60a6 100644 --- a/src/Microsoft.AspNetCore.Routing/RouteValuesBasedEndpointFinder.cs +++ b/src/Microsoft.AspNetCore.Routing/RouteValuesBasedEndpointFinder.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing.Internal; using Microsoft.AspNetCore.Routing.Template; using Microsoft.AspNetCore.Routing.Tree; +using Microsoft.Extensions.Primitives; namespace Microsoft.AspNetCore.Routing { @@ -25,7 +26,7 @@ namespace Microsoft.AspNetCore.Routing BuildOutboundMatches(); // Register for changes in endpoints - Extensions.Primitives.ChangeToken.OnChange( + ChangeToken.OnChange( _dataSource.GetChangeToken, HandleChange); } @@ -61,7 +62,7 @@ namespace Microsoft.AspNetCore.Routing // re-register the callback as the change token is one time use only and a new change token // is produced every time - Extensions.Primitives.ChangeToken.OnChange( + ChangeToken.OnChange( _dataSource.GetChangeToken, HandleChange); }