From 979b75dda4ca93ac4bcb4ff86cba54cdbaaa9a47 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 4 Mar 2015 18:06:42 -0800 Subject: [PATCH] React to DI changes --- src/Microsoft.AspNet.Routing/RoutingServices.cs | 6 ++---- .../InlineRouteParameterParserTests.cs | 1 - test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs | 1 - .../Template/TemplateBinderTests.cs | 1 - .../Template/TemplateMatcherTests.cs | 1 - .../Template/TemplateParserTests.cs | 1 - .../TemplateParserDefaultValuesTests.cs | 1 - 7 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.AspNet.Routing/RoutingServices.cs b/src/Microsoft.AspNet.Routing/RoutingServices.cs index 956f97c177..52447f855d 100644 --- a/src/Microsoft.AspNet.Routing/RoutingServices.cs +++ b/src/Microsoft.AspNet.Routing/RoutingServices.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Routing { public static class RoutingServices { - public static IServiceCollection AddRouting(this IServiceCollection services, IConfiguration config = null) + public static IServiceCollection AddRouting(this IServiceCollection services) { - var describe = new ServiceDescriber(config); - services.TryAdd(describe.Transient()); + services.TryAdd(ServiceDescriptor.Transient()); return services; } } diff --git a/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs b/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs index c33278d4c1..2dfd02f891 100644 --- a/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/InlineRouteParameterParserTests.cs @@ -7,7 +7,6 @@ using System.Linq; using Microsoft.AspNet.Http; using Microsoft.AspNet.Routing.Template; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Xunit; diff --git a/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs b/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs index 1f32439ac2..bf3ded5011 100644 --- a/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using Microsoft.AspNet.Http; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Xunit; diff --git a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs index 4968e4672c..bf7575dcc4 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateBinderTests.cs @@ -6,7 +6,6 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateMatcherTests.cs b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateMatcherTests.cs index 047f4a44f8..72615e9cdb 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateMatcherTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateMatcherTests.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using Microsoft.AspNet.Routing.Constraints; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateParserTests.cs b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateParserTests.cs index 005a26b796..cd20a47192 100644 --- a/test/Microsoft.AspNet.Routing.Tests/Template/TemplateParserTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/Template/TemplateParserTests.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Testing; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Moq; using Xunit; diff --git a/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs b/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs index 933e9001d6..a2680297bb 100644 --- a/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/TemplateParserDefaultValuesTests.cs @@ -6,7 +6,6 @@ using System; using Microsoft.AspNet.Builder; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.OptionsModel; using Moq; using Xunit;