React to aspnet/Configuration #195,#198

This commit is contained in:
Kirthi Krishnamraju 2015-05-20 19:34:27 -07:00
parent 99c7859608
commit 030459b8ba
7 changed files with 11 additions and 10 deletions

View File

@ -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.
}

View File

@ -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-*"

View File

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

View File

@ -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
{

View File

@ -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",

View File

@ -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<TestUser, TestRole>(o => { o.User.RequireUniqueEmail = false; o.Lockout.MaxFailedAccessAttempts++; });

View File

@ -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-*"