Remove public extension methods for registering endpoint routing (#697)
This commit is contained in:
parent
39c5700148
commit
dce72c9553
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -11,9 +11,6 @@ namespace Microsoft.AspNetCore.Internal
|
||||||
{
|
{
|
||||||
public static class EndpointRoutingApplicationBuilderExtensions
|
public static class EndpointRoutingApplicationBuilderExtensions
|
||||||
{
|
{
|
||||||
// TODO: Remove once MVC is updated
|
|
||||||
private const string GlobalRoutingRegisteredKey = "__GlobalRoutingMiddlewareRegistered";
|
|
||||||
|
|
||||||
private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered";
|
private const string EndpointRoutingRegisteredKey = "__EndpointRoutingMiddlewareRegistered";
|
||||||
|
|
||||||
public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder)
|
public static IApplicationBuilder UseEndpointRouting(this IApplicationBuilder builder)
|
||||||
|
|
@ -21,7 +18,6 @@ namespace Microsoft.AspNetCore.Internal
|
||||||
VerifyRoutingIsRegistered(builder);
|
VerifyRoutingIsRegistered(builder);
|
||||||
|
|
||||||
builder.Properties[EndpointRoutingRegisteredKey] = true;
|
builder.Properties[EndpointRoutingRegisteredKey] = true;
|
||||||
builder.Properties[GlobalRoutingRegisteredKey] = true;
|
|
||||||
|
|
||||||
return builder.UseMiddleware<EndpointRoutingMiddleware>();
|
return builder.UseMiddleware<EndpointRoutingMiddleware>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue