Comment registered key (#816)

This commit is contained in:
James Newton-King 2018-09-27 07:06:30 -07:00 committed by GitHub
parent 49c2317c14
commit 95753825ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Routing
foreach (var dataSource in _dataSources)
{
Extensions.Primitives.ChangeToken.OnChange(
ChangeToken.OnChange(
dataSource.GetChangeToken,
HandleChange);
}

View File

@ -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)

View File

@ -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);
}