Comment registered key (#816)
This commit is contained in:
parent
49c2317c14
commit
95753825ef
|
|
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Routing
|
||||||
|
|
||||||
foreach (var dataSource in _dataSources)
|
foreach (var dataSource in _dataSources)
|
||||||
{
|
{
|
||||||
Extensions.Primitives.ChangeToken.OnChange(
|
ChangeToken.OnChange(
|
||||||
dataSource.GetChangeToken,
|
dataSource.GetChangeToken,
|
||||||
HandleChange);
|
HandleChange);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ namespace Microsoft.AspNetCore.Internal
|
||||||
{
|
{
|
||||||
public static class EndpointRoutingApplicationBuilderExtensions
|
public static class EndpointRoutingApplicationBuilderExtensions
|
||||||
{
|
{
|
||||||
|
// Property key is used by MVC package to check that routing is registered
|
||||||
private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered";
|
private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered";
|
||||||
|
|
||||||
public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder)
|
public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Routing.Internal;
|
using Microsoft.AspNetCore.Routing.Internal;
|
||||||
using Microsoft.AspNetCore.Routing.Template;
|
using Microsoft.AspNetCore.Routing.Template;
|
||||||
using Microsoft.AspNetCore.Routing.Tree;
|
using Microsoft.AspNetCore.Routing.Tree;
|
||||||
|
using Microsoft.Extensions.Primitives;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Routing
|
namespace Microsoft.AspNetCore.Routing
|
||||||
{
|
{
|
||||||
|
|
@ -25,7 +26,7 @@ namespace Microsoft.AspNetCore.Routing
|
||||||
BuildOutboundMatches();
|
BuildOutboundMatches();
|
||||||
|
|
||||||
// Register for changes in endpoints
|
// Register for changes in endpoints
|
||||||
Extensions.Primitives.ChangeToken.OnChange(
|
ChangeToken.OnChange(
|
||||||
_dataSource.GetChangeToken,
|
_dataSource.GetChangeToken,
|
||||||
HandleChange);
|
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
|
// re-register the callback as the change token is one time use only and a new change token
|
||||||
// is produced every time
|
// is produced every time
|
||||||
Extensions.Primitives.ChangeToken.OnChange(
|
ChangeToken.OnChange(
|
||||||
_dataSource.GetChangeToken,
|
_dataSource.GetChangeToken,
|
||||||
HandleChange);
|
HandleChange);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue