Merge pull request #652 from aspnet/release/2.2

automerge release/2.2 -> master
This commit is contained in:
Ryan Nowak 2018-07-23 08:25:28 -07:00 committed by GitHub
commit 4182b159b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 46 deletions

View File

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

View File

@ -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<EndpointOptions> configuration)
{
if (services == null)
{
throw new ArgumentNullException(nameof(services));
}
services.AddRouting();
if (configuration != null)
{
services.Configure<EndpointOptions>(configuration);
}
return services;
}
}
}