From 030459b8ba4ca08adef74dc8a70ecf304bd56e89 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Wed, 20 May 2015 19:34:27 -0700 Subject: [PATCH] React to aspnet/Configuration #195,#198 --- samples/IdentitySample.Mvc/Startup.cs | 4 ++-- samples/IdentitySample.Mvc/project.json | 3 ++- .../IdentityEntityFrameworkServices.cs | 2 +- .../IdentityServiceCollectionExtensions.cs | 2 +- test/Microsoft.AspNet.Identity.InMemory.Test/project.json | 2 +- test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs | 6 +++--- test/Microsoft.AspNet.Identity.Test/project.json | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/samples/IdentitySample.Mvc/Startup.cs b/samples/IdentitySample.Mvc/Startup.cs index c30c2f15f7..07201b617d 100644 --- a/samples/IdentitySample.Mvc/Startup.cs +++ b/samples/IdentitySample.Mvc/Startup.cs @@ -4,7 +4,7 @@ using Microsoft.AspNet.Diagnostics; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.Data.Entity; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; @@ -23,7 +23,7 @@ namespace IdentitySamples * Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, * then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. */ - Configuration = new Configuration(env.ApplicationBasePath) + Configuration = new ConfigurationSection(env.ApplicationBasePath) .AddJsonFile("LocalConfig.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. } diff --git a/samples/IdentitySample.Mvc/project.json b/samples/IdentitySample.Mvc/project.json index 55497b4aca..4d8d73ba4b 100644 --- a/samples/IdentitySample.Mvc/project.json +++ b/samples/IdentitySample.Mvc/project.json @@ -18,7 +18,8 @@ "Microsoft.AspNet.Authorization": "1.0.0-*", "Microsoft.AspNet.StaticFiles": "1.0.0-*", "EntityFramework.SqlServer": "7.0.0-*", - "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*", + "Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-*", + "Microsoft.Framework.Configuration.Json": "1.0.0-*", "Microsoft.Framework.OptionsModel": "1.0.0-*", "Microsoft.Framework.Logging.Console": "1.0.0-*", "Microsoft.Framework.Logging.NLog": "1.0.0-*" diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs index 3845b250b6..47f45870f8 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs @@ -3,7 +3,7 @@ using System; using Microsoft.AspNet.Identity.EntityFramework; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Identity diff --git a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs index dba057b008..a78b6fd253 100644 --- a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs @@ -7,7 +7,7 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Authentication; using Microsoft.AspNet.Authentication.Cookies; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; namespace Microsoft.Framework.DependencyInjection { diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json index d677c59046..bc3662ab4a 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json @@ -7,7 +7,7 @@ "Microsoft.AspNet.Identity" : "3.0.0-*", "Microsoft.AspNet.TestHost": "1.0.0-*", "Microsoft.AspNet.Testing" : "1.0.0-*", - "Microsoft.Framework.ConfigurationModel": "1.0.0-*", + "Microsoft.Framework.Configuration": "1.0.0-*", "Microsoft.Framework.DependencyInjection" : "1.0.0-*", "Microsoft.Framework.OptionsModel" : "1.0.0-*", "Moq": "4.2.1312.1622", diff --git a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs index 7546b0aa2b..51212b5b31 100644 --- a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs +++ b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Security.Claims; using Microsoft.AspNet.Builder; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.OptionsModel; using Microsoft.Framework.Runtime.Infrastructure; @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Identity.Test {"identity:lockout:EnabledByDefault", "TRUe"}, {"identity:lockout:MaxFailedAccessAttempts", "1000"} }; - var config = new Configuration(new MemoryConfigurationSource(dic)); + var config = new ConfigurationSection(new MemoryConfigurationSource(dic)); Assert.Equal(roleClaimType, config.Get("identity:claimsidentity:roleclaimtype")); var services = new ServiceCollection(); @@ -93,7 +93,7 @@ namespace Microsoft.AspNet.Identity.Test {"identity:user:requireUniqueEmail", "true"}, {"identity:lockout:MaxFailedAccessAttempts", "1000"} }; - var config = new Configuration(new MemoryConfigurationSource(dic)); + var config = new ConfigurationSection(new MemoryConfigurationSource(dic)); var services = new ServiceCollection(); services.ConfigureIdentity(config.GetConfigurationSection("identity")); services.AddIdentity(o => { o.User.RequireUniqueEmail = false; o.Lockout.MaxFailedAccessAttempts++; }); diff --git a/test/Microsoft.AspNet.Identity.Test/project.json b/test/Microsoft.AspNet.Identity.Test/project.json index ef3bbc3d83..bda24abe2b 100644 --- a/test/Microsoft.AspNet.Identity.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Test/project.json @@ -4,7 +4,7 @@ "Microsoft.AspNet.Http" : "1.0.0-*", "Microsoft.AspNet.Identity" : "3.0.0-*", "Microsoft.AspNet.Testing" : "1.0.0-*", - "Microsoft.Framework.ConfigurationModel" : "1.0.0-*", + "Microsoft.Framework.Configuration" : "1.0.0-*", "Microsoft.Framework.DependencyInjection" : "1.0.0-*", "Microsoft.Framework.OptionsModel" : "1.0.0-*", "xunit.runner.aspnet": "2.0.0-aspnet-*"