Remove public extension methods for registering endpoint routing (#697)

This commit is contained in:
James Newton-King 2018-08-07 17:49:31 +12:00 committed by GitHub
parent 39c5700148
commit dce72c9553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 23 deletions

View File

@ -1,19 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Builder
{
// TODO: Remove once MVC is updated
public static class EndpointRoutingApplicationBuilderExtensions
{
public static IApplicationBuilder UseGlobalRouting(this IApplicationBuilder builder)
{
return Internal.EndpointRoutingApplicationBuilderExtensions.UseEndpointRouting(builder);
}
public static IApplicationBuilder UseEndpoint(this IApplicationBuilder builder)
{
return Internal.EndpointRoutingApplicationBuilderExtensions.UseEndpoint(builder);
}
}
}

View File

@ -11,9 +11,6 @@ namespace Microsoft.AspNetCore.Internal
{
public static class EndpointRoutingApplicationBuilderExtensions
{
// TODO: Remove once MVC is updated
private const string GlobalRoutingRegisteredKey = "__GlobalRoutingMiddlewareRegistered";
private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered";
public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder)
@ -21,7 +18,6 @@ namespace Microsoft.AspNetCore.Internal
VerifyRoutingIsRegistered(builder);
builder.Properties[EndpointRoutingRegisteredKey] = true;
builder.Properties[GlobalRoutingRegisteredKey] = true;
return builder.UseMiddleware<EndpointRoutingMiddleware>();
}