diff --git a/src/Microsoft.AspNetCore.Routing/Builder/GlobalRoutingApplicationBuilderExtensions.cs b/src/Microsoft.AspNetCore.Routing/Builder/GlobalRoutingApplicationBuilderExtensions.cs index e240a75211..1e231c2255 100644 --- a/src/Microsoft.AspNetCore.Routing/Builder/GlobalRoutingApplicationBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Routing/Builder/GlobalRoutingApplicationBuilderExtensions.cs @@ -12,12 +12,6 @@ namespace Microsoft.AspNetCore.Builder { private const string GlobalRoutingRegisteredKey = "__GlobalRoutingMiddlewareRegistered"; - // This is provided temporarily until we can remove usages of it from MVC. - public static IApplicationBuilder UseDispatcher(this IApplicationBuilder builder) - { - return UseGlobalRouting(builder); - } - public static IApplicationBuilder UseGlobalRouting(this IApplicationBuilder builder) { VerifyRoutingIsRegistered(builder); diff --git a/src/Microsoft.AspNetCore.Routing/DependencyInjection/DispatcherServiceCollectionExtensions.cs b/src/Microsoft.AspNetCore.Routing/DependencyInjection/DispatcherServiceCollectionExtensions.cs deleted file mode 100644 index 6500f02986..0000000000 --- a/src/Microsoft.AspNetCore.Routing/DependencyInjection/DispatcherServiceCollectionExtensions.cs +++ /dev/null @@ -1,40 +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. - -using System; -using Microsoft.AspNetCore.Routing; - -namespace Microsoft.Extensions.DependencyInjection -{ - // This whole class is temporary until we can remove its usage from MVC - public static class DispatcherServiceCollectionExtensions - { - // This whole class is temporary until we can remove its usage from MVC - public static IServiceCollection AddDispatcher(this IServiceCollection services) - { - if (services == null) - { - throw new ArgumentNullException(nameof(services)); - } - - return services.AddRouting(); - } - - // This whole class is temporary until we can remove its usage from MVC - public static IServiceCollection AddDispatcher(this IServiceCollection services, Action configuration) - { - if (services == null) - { - throw new ArgumentNullException(nameof(services)); - } - - services.AddRouting(); - if (configuration != null) - { - services.Configure(configuration); - } - - return services; - } - } -}