Fix #198 : Find a better namespace name than ConfigurationModel

This commit is contained in:
Kirthi Krishnamraju 2015-05-20 14:37:12 -07:00
Родитель b5b318dcea
Коммит 59e8430ef5
93 изменённых файлов: 210 добавлений и 207 удалений

Просмотреть файл

@ -7,35 +7,35 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F141E2D0-F9B
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B54371FF-B920-46C8-8D55-6B19DBB43EBF}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Json", "src\Microsoft.Framework.ConfigurationModel.Json\Microsoft.Framework.ConfigurationModel.Json.xproj", "{4C4CD1BC-4411-4AFD-9D04-147053F0E259}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Json", "src\Microsoft.Framework.Configuration.Json\Microsoft.Framework.Configuration.Json.xproj", "{4C4CD1BC-4411-4AFD-9D04-147053F0E259}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Xml", "src\Microsoft.Framework.ConfigurationModel.Xml\Microsoft.Framework.ConfigurationModel.Xml.xproj", "{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Xml", "src\Microsoft.Framework.Configuration.Xml\Microsoft.Framework.Configuration.Xml.xproj", "{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Json.Test", "test\Microsoft.Framework.ConfigurationModel.Json.Test\Microsoft.Framework.ConfigurationModel.Json.Test.xproj", "{AE8F8C20-9ED9-4A16-9565-27DF77683789}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Json.Test", "test\Microsoft.Framework.Configuration.Json.Test\Microsoft.Framework.Configuration.Json.Test.xproj", "{AE8F8C20-9ED9-4A16-9565-27DF77683789}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Xml.Test", "test\Microsoft.Framework.ConfigurationModel.Xml.Test\Microsoft.Framework.ConfigurationModel.Xml.Test.xproj", "{0786C785-944A-4423-96A6-4E7BFDB4A1B0}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Xml.Test", "test\Microsoft.Framework.Configuration.Xml.Test\Microsoft.Framework.Configuration.Xml.Test.xproj", "{0786C785-944A-4423-96A6-4E7BFDB4A1B0}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Test", "test\Microsoft.Framework.ConfigurationModel.Test\Microsoft.Framework.ConfigurationModel.Test.xproj", "{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Test", "test\Microsoft.Framework.Configuration.Test\Microsoft.Framework.Configuration.Test.xproj", "{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel", "src\Microsoft.Framework.ConfigurationModel\Microsoft.Framework.ConfigurationModel.xproj", "{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration", "src\Microsoft.Framework.Configuration\Microsoft.Framework.Configuration.xproj", "{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.FunctionalTests", "test\Microsoft.Framework.ConfigurationModel.FunctionalTests\Microsoft.Framework.ConfigurationModel.FunctionalTests.xproj", "{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.FunctionalTests", "test\Microsoft.Framework.Configuration.FunctionalTests\Microsoft.Framework.Configuration.FunctionalTests.xproj", "{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Abstractions", "src\Microsoft.Framework.ConfigurationModel.Abstractions\Microsoft.Framework.ConfigurationModel.Abstractions.xproj", "{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Abstractions", "src\Microsoft.Framework.Configuration.Abstractions\Microsoft.Framework.Configuration.Abstractions.xproj", "{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Test.Common", "test\Microsoft.Framework.ConfigurationModel.Test.Common\Microsoft.Framework.ConfigurationModel.Test.Common.xproj", "{29C120E5-F682-4BFB-826B-040A594802CA}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Test.Common", "test\Microsoft.Framework.Configuration.Test.Common\Microsoft.Framework.Configuration.Test.Common.xproj", "{29C120E5-F682-4BFB-826B-040A594802CA}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.CommandLine", "src\Microsoft.Framework.ConfigurationModel.CommandLine\Microsoft.Framework.ConfigurationModel.CommandLine.xproj", "{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.CommandLine", "src\Microsoft.Framework.Configuration.CommandLine\Microsoft.Framework.Configuration.CommandLine.xproj", "{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Ini", "src\Microsoft.Framework.ConfigurationModel.Ini\Microsoft.Framework.ConfigurationModel.Ini.xproj", "{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Ini", "src\Microsoft.Framework.Configuration.Ini\Microsoft.Framework.Configuration.Ini.xproj", "{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.EnvironmentVariables", "src\Microsoft.Framework.ConfigurationModel.EnvironmentVariables\Microsoft.Framework.ConfigurationModel.EnvironmentVariables.xproj", "{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.EnvironmentVariables", "src\Microsoft.Framework.Configuration.EnvironmentVariables\Microsoft.Framework.Configuration.EnvironmentVariables.xproj", "{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.CommandLine.Test", "test\Microsoft.Framework.ConfigurationModel.CommandLine.Test\Microsoft.Framework.ConfigurationModel.CommandLine.Test.xproj", "{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.CommandLine.Test", "test\Microsoft.Framework.Configuration.CommandLine.Test\Microsoft.Framework.Configuration.CommandLine.Test.xproj", "{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.Ini.Test", "test\Microsoft.Framework.ConfigurationModel.Ini.Test\Microsoft.Framework.ConfigurationModel.Ini.Test.xproj", "{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.Ini.Test", "test\Microsoft.Framework.Configuration.Ini.Test\Microsoft.Framework.Configuration.Ini.Test.xproj", "{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.ConfigurationModel.EnvironmentVariables.Test", "test\Microsoft.Framework.ConfigurationModel.EnvironmentVariables.Test\Microsoft.Framework.ConfigurationModel.EnvironmentVariables.Test.xproj", "{7D0F805B-ADFF-4C47-A90C-24DD74416821}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Framework.Configuration.EnvironmentVariables.Test", "test\Microsoft.Framework.Configuration.EnvironmentVariables.Test\Microsoft.Framework.Configuration.EnvironmentVariables.Test.xproj", "{7D0F805B-ADFF-4C47-A90C-24DD74416821}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Просмотреть файл

@ -3,7 +3,7 @@
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public interface IConfiguration
{

Просмотреть файл

@ -3,7 +3,7 @@
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public interface IConfigurationBuilder : IConfiguration
{

Просмотреть файл

@ -3,7 +3,7 @@
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public interface IConfigurationSource
{

Просмотреть файл

@ -2,8 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.Framework.Configuration.CommandLine;
namespace Microsoft.Framework.ConfigurationModel.CommandLine
namespace Microsoft.Framework.Configuration
{
public static class CommandLineConfigurationExtension
{

Просмотреть файл

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel.CommandLine
namespace Microsoft.Framework.Configuration.CommandLine
{
public class CommandLineConfigurationSource : ConfigurationSource
{

Просмотреть файл

@ -4,5 +4,5 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.CommandLine.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.CommandLine.Test")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.Framework.ConfigurationModel.CommandLine
namespace Microsoft.Framework.Configuration.CommandLine
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.Framework.ConfigurationModel.CommandLine
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.Framework.ConfigurationModel.CommandLine.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.Framework.Configuration.CommandLine.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// Keys in switch mappings are case-insensitive. A duplicated key '{0}' was found.

Просмотреть файл

@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "Command line configuration source for the Configuration package.",
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Framework.ConfigurationModel.EnvironmentVariables
namespace Microsoft.Framework.Configuration.EnvironmentVariables
{
public class EnvironmentVariablesConfigurationSource : ConfigurationSource
{

Просмотреть файл

@ -1,7 +1,9 @@
// 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.
namespace Microsoft.Framework.ConfigurationModel.EnvironmentVariables
using Microsoft.Framework.Configuration.EnvironmentVariables;
namespace Microsoft.Framework.Configuration
{
public static class EnvironmentVariablesExtension
{

Просмотреть файл

@ -4,5 +4,5 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.EnvironmentVariables.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.EnvironmentVariables.Test")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "Environment variables configuration source for the Configuration package.",
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {

Просмотреть файл

@ -3,10 +3,11 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Helper;
using Microsoft.Framework.Configuration.Helper;
using Microsoft.Framework.Configuration.Ini;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.ConfigurationModel.Ini
namespace Microsoft.Framework.Configuration
{
public static class IniConfigurationExtension
{

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace Microsoft.Framework.ConfigurationModel.Ini
namespace Microsoft.Framework.Configuration.Ini
{
/// <summary>
/// An INI file based <see cref="ConfigurationSource"/>.

Просмотреть файл

@ -4,5 +4,5 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.Ini.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.Ini.Test")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.Framework.ConfigurationModel.Ini
namespace Microsoft.Framework.Configuration.Ini
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.Framework.ConfigurationModel.Ini
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.Framework.ConfigurationModel.Ini.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.Framework.Configuration.Ini.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// The configuration file '{0}' was not found and is not optional.

Просмотреть файл

@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "Ini configuration source for the Configuration package.",
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {

Просмотреть файл

@ -3,11 +3,11 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Helper;
using Microsoft.Framework.ConfigurationModel.Json;
using Microsoft.Framework.Configuration.Helper;
using Microsoft.Framework.Configuration.Json;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
/// <summary>
/// Extension methods for adding <see cref="JsonConfigurationSource"/>.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.Framework.ConfigurationModel.Json
namespace Microsoft.Framework.Configuration.Json
{
internal class JsonConfigurationFileParser
{

Просмотреть файл

@ -4,9 +4,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Json;
using Microsoft.Framework.Configuration.Json;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
/// <summary>
/// A JSON file based <see cref="ConfigurationSource"/>.

Просмотреть файл

@ -4,5 +4,5 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.Xml.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.Json.Test")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.Framework.ConfigurationModel.Json
namespace Microsoft.Framework.Configuration.Json
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.Framework.ConfigurationModel.Json.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.Framework.Configuration.Json.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// Unable to commit because the following keys are missing from the configuration file: {0}.

Просмотреть файл

@ -1,18 +1,18 @@
{
"version": "1.0.0-*",
"description": "JSON configuration source for the ConfigurationModel package.",
"dependencies": {
"Newtonsoft.Json": "6.0.6",
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {
"net45": { },
"dnx451": { },
"dnxcore50": {
"dependencies": {
"System.Dynamic.Runtime": "4.0.10-*"
}
}
}
}
{
"version": "1.0.0-*",
"description": "JSON configuration source for the Configuration package.",
"dependencies": {
"Newtonsoft.Json": "6.0.6",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {
"net45": { },
"dnx451": { },
"dnxcore50": {
"dependencies": {
"System.Dynamic.Runtime": "4.0.10-*"
}
}
}
}

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Security.Cryptography.Xml;
using System.Xml;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
/// <summary>
/// A decryptor that uses the EncryptedXml class in the desktop CLR.

Просмотреть файл

@ -4,5 +4,5 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.Json.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.Xml.Test")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.Framework.ConfigurationModel.Xml
namespace Microsoft.Framework.Configuration.Xml
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.Framework.ConfigurationModel.Xml
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.Framework.ConfigurationModel.Xml.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.Framework.Configuration.Xml.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// Unable to commit because the following keys are missing from the configuration file: {0}.

Просмотреть файл

@ -3,11 +3,11 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Helper;
using Microsoft.Framework.ConfigurationModel.Xml;
using Microsoft.Framework.Configuration.Helper;
using Microsoft.Framework.Configuration.Xml;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
/// <summary>
/// Extension methods for adding <see cref="XmlConfigurationSource"/>.

Просмотреть файл

@ -6,9 +6,9 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using Microsoft.Framework.ConfigurationModel.Xml;
using Microsoft.Framework.Configuration.Xml;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
/// <summary>
/// An XML file based <see cref="ConfigurationSource"/>.

Просмотреть файл

@ -4,9 +4,9 @@
using System;
using System.IO;
using System.Xml;
using Microsoft.Framework.ConfigurationModel.Xml;
using Microsoft.Framework.Configuration.Xml;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
internal class XmlDocumentDecryptor
{

Просмотреть файл

@ -1,8 +1,8 @@
{
"version": "1.0.0-*",
"description": "XML configuration source for the ConfigurationModel package.",
"description": "XML configuration source for the Configuration package.",
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {

Просмотреть файл

@ -7,7 +7,7 @@ using System.Linq;
using System.Reflection;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public static class ConfigurationBinder
{

Просмотреть файл

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public class ConfigurationKeyComparer : IComparer<string>
{

Просмотреть файл

@ -4,21 +4,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Framework.ConfigurationModel.Internal;
using Microsoft.Framework.Configuration.Internal;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public class Configuration : IConfiguration, IConfigurationBuilder
public class ConfigurationSection : IConfiguration, IConfigurationBuilder
{
private readonly IList<IConfigurationSource> _sources = new List<IConfigurationSource>();
public Configuration(params IConfigurationSource[] sources)
public ConfigurationSection(params IConfigurationSource[] sources)
: this(null, sources)
{
}
public Configuration(string basePath, params IConfigurationSource[] sources)
public ConfigurationSection(string basePath, params IConfigurationSource[] sources)
{
if (sources != null)
{

Просмотреть файл

@ -1,7 +1,7 @@
// 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.
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public static class Constants
{

Просмотреть файл

@ -4,7 +4,7 @@
using System;
using System.IO;
namespace Microsoft.Framework.ConfigurationModel.Helper
namespace Microsoft.Framework.Configuration.Helper
{
public static class ConfigurationHelper
{

Просмотреть файл

@ -3,7 +3,7 @@
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel.Internal
namespace Microsoft.Framework.Configuration.Internal
{
public class ConfigurationFocus : IConfiguration
{

Просмотреть файл

@ -38,6 +38,6 @@ using System.Runtime.InteropServices;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("Microsoft.Framework.ConfigurationModel.Test")]
[assembly: InternalsVisibleTo("Microsoft.Framework.Configuration.Test")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyMetadata("Serviceable", "True")]

Просмотреть файл

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.Framework.ConfigurationModel
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.Framework.ConfigurationModel.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.Framework.Configuration.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// Cannot create instance of type '{0}' because it is either abstract or an interface.

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public abstract class ConfigurationSource : IConfigurationSource
{

Просмотреть файл

@ -4,7 +4,7 @@
using System.Collections;
using System.Collections.Generic;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public class MemoryConfigurationSource :
ConfigurationSource,

Просмотреть файл

@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "Implementation of key-value pair based configuration. Includes configuration sources for INI, command line, and environment variables.",
"dependencies": {
"Microsoft.Framework.ConfigurationModel.Abstractions": "1.0.0-*",
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-*",
"Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
},
"frameworks": {

Просмотреть файл

@ -3,10 +3,10 @@
using System;
using System.Collections.Generic;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.CommandLine.Test
namespace Microsoft.Framework.Configuration.CommandLine.Test
{
public class CommandLineConfigurationSourceTest
{

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.Ini": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration.CommandLine": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {

Просмотреть файл

@ -3,10 +3,10 @@
using System;
using System.Collections;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.EnvironmentVariables.Test
namespace Microsoft.Framework.Configuration.EnvironmentVariables.Test
{
public class EnvironmentVariablesConfigurationSourceTest
{

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.CommandLine": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {

Просмотреть файл

@ -4,10 +4,10 @@
using System;
using System.IO;
using System.Linq;
using Microsoft.Framework.ConfigurationModel.Ini;
using Microsoft.Framework.Configuration.Ini;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.FunctionalTests
namespace Microsoft.Framework.Configuration.FunctionalTests
{
public class ArrayTests : IDisposable
{
@ -50,7 +50,7 @@ i=ini_i.i.i.i
[Fact]
public void DifferentConfigSources_Merged_KeysAreSorted()
{
var config = new Configuration();
var config = new ConfigurationSection();
config.AddJsonFile(_json1ConfigFilePath);
config.AddIniFile(_iniConfigFilePath);
@ -74,7 +74,7 @@ i=ini_i.i.i.i
[Fact]
public void DifferentConfigSources_Merged_WithOverwrites()
{
var config = new Configuration();
var config = new ConfigurationSection();
config.AddJsonFile(_json1ConfigFilePath);
config.AddIniFile(_iniConfigFilePath);

Просмотреть файл

@ -4,10 +4,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Ini;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationTests : IDisposable
{
@ -79,7 +78,7 @@ CommonKey3:CommonKey4=IniValue6";
public void LoadAndCombineKeyValuePairsFromDifferentConfigurationSources()
{
// Arrange
var config = new Configuration();
var config = new ConfigurationSection();
// Act
config.AddIniFile(_iniConfigFilePath);
@ -120,7 +119,7 @@ CommonKey3:CommonKey4=IniValue6";
public void CanOverrideValuesWithNewConfigurationSource()
{
// Arrange
var config = new Configuration();
var config = new ConfigurationSection();
// Act & Assert
config.AddIniFile(_iniConfigFilePath);
@ -141,7 +140,7 @@ CommonKey3:CommonKey4=IniValue6";
public void CanSetValuesAndReloadValues()
{
// Arrange
var config = new Configuration();
var config = new ConfigurationSection();
config.AddIniFile(_iniConfigFilePath);
config.AddJsonFile(_jsonConfigFilePath);
config.AddXmlFile(_xmlConfigFilePath);

Просмотреть файл

@ -0,0 +1,12 @@
{
"dependencies": {
"Microsoft.Framework.Configuration.Ini": "1.0.0-*",
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration.Xml": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"commands": {
"test": "xunit.runner.aspnet"
}
}

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.IO;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Ini.Test
namespace Microsoft.Framework.Configuration.Ini.Test
{
public class IniConfigurationExtensionTest
{
@ -15,7 +15,7 @@ namespace Microsoft.Framework.ConfigurationModel.Ini.Test
public void AddIniFile_ThrowsIfFilePathIsNullOrEmpty(string path)
{
// Arrange
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<ArgumentException>(
@ -29,7 +29,7 @@ namespace Microsoft.Framework.ConfigurationModel.Ini.Test
{
// Arrange
var path = Path.Combine(Directory.GetCurrentDirectory(), "file-does-not-exist.ini");
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<FileNotFoundException>(

Просмотреть файл

@ -3,10 +3,10 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Ini.Test
namespace Microsoft.Framework.Configuration.Ini.Test
{
public class IniFileConfigurationSourceTest
{

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.EnvironmentVariables": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration.Ini": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {

Просмотреть файл

@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Json.Test
namespace Microsoft.Framework.Configuration.Json.Test
{
public class ArrayTest
{
@ -101,7 +101,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json.Test
var jsonConfigSource2 = new JsonConfigurationSource(TestStreamHelpers.ArbitraryFilePath);
jsonConfigSource2.Load(TestStreamHelpers.StringToStream(json2));
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(jsonConfigSource1, load: false);
config.Add(jsonConfigSource2, load: false);
@ -134,7 +134,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json.Test
var jsonConfigSource2 = new JsonConfigurationSource(TestStreamHelpers.ArbitraryFilePath);
jsonConfigSource2.Load(TestStreamHelpers.StringToStream(json2));
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(jsonConfigSource1, load: false);
config.Add(jsonConfigSource2, load: false);
@ -167,7 +167,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json.Test
var jsonConfigSource2 = new JsonConfigurationSource(TestStreamHelpers.ArbitraryFilePath);
jsonConfigSource2.Load(TestStreamHelpers.StringToStream(json2));
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(jsonConfigSource1, load: false);
config.Add(jsonConfigSource2, load: false);
@ -192,7 +192,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json.Test
var jsonConfigSource = new JsonConfigurationSource(TestStreamHelpers.ArbitraryFilePath);
jsonConfigSource.Load(TestStreamHelpers.StringToStream(json));
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(jsonConfigSource, load: false);
var configurationSection = config.GetConfigurationSection("setting");
@ -221,7 +221,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json.Test
var jsonConfigSource = new JsonConfigurationSource(TestStreamHelpers.ArbitraryFilePath);
jsonConfigSource.Load(TestStreamHelpers.StringToStream(json));
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(jsonConfigSource, load: false);
var configurationSection = config.GetConfigurationSection("setting");

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.IO;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Json
namespace Microsoft.Framework.Configuration.Json
{
public class JsonConfigurationExtensionTest
{
@ -15,7 +15,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json
public void AddJsonFile_ThrowsIfFilePathIsNullOrEmpty(string path)
{
// Arrange
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<ArgumentException>(() => JsonConfigurationExtension.AddJsonFile(configurationSource, path));
@ -28,7 +28,7 @@ namespace Microsoft.Framework.ConfigurationModel.Json
{
// Arrange
var path = Path.Combine(Directory.GetCurrentDirectory(), "file-does-not-exist.json");
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<FileNotFoundException>(() => JsonConfigurationExtension.AddJsonFile(configurationSource, path));

Просмотреть файл

@ -3,12 +3,12 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Json;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Json;
using Microsoft.Framework.Configuration.Test;
using Newtonsoft.Json;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel
namespace Microsoft.Framework.Configuration
{
public class JsonConfigurationSourceTest
{

Просмотреть файл

@ -1,14 +1,14 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"commands": {
"test": "xunit.runner.aspnet"
}
}
{
"dependencies": {
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"commands": {
"test": "xunit.runner.aspnet"
}
}

Просмотреть файл

@ -3,7 +3,7 @@
using System;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public static class ConfigurationSourceExtensions
{

Просмотреть файл

@ -3,7 +3,7 @@
using System.IO;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public static class TestStreamHelpers
{

Просмотреть файл

@ -1,6 +1,6 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*"
"Microsoft.Framework.Configuration": "1.0.0-*"
},
"frameworks": {
"dnx451": {

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Reflection;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationBinderTests
{
@ -74,7 +74,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"Boolean", "TRUe"},
{"Nested:Integer", "11"}
};
var config = new Configuration(new MemoryConfigurationSource(dic));
var config = new ConfigurationSection(new MemoryConfigurationSource(dic));
var options = ConfigurationBinder.Bind<ComplexOptions>(config);
Assert.True(options.Boolean);
Assert.Equal(-2, options.Integer);
@ -91,7 +91,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"Nested:Integer", "11"},
{"Virtual","Sup"}
};
var config = new Configuration(new MemoryConfigurationSource(dic));
var config = new ConfigurationSection(new MemoryConfigurationSource(dic));
var options = ConfigurationBinder.Bind<DerivedOptions>(config);
Assert.True(options.Boolean);
Assert.Equal(-2, options.Integer);
@ -106,7 +106,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{
{"StaticProperty", "stuff"},
};
var config = new Configuration(new MemoryConfigurationSource(dic));
var config = new ConfigurationSection(new MemoryConfigurationSource(dic));
var options = ConfigurationBinder.Bind<ComplexOptions>(config);
Assert.Equal("stuff", ComplexOptions.StaticProperty);
}
@ -122,7 +122,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{
{property, "stuff"},
};
var config = new Configuration(new MemoryConfigurationSource(dic));
var config = new ConfigurationSection(new MemoryConfigurationSource(dic));
var options = ConfigurationBinder.Bind<ComplexOptions>(config);
Assert.Null(options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));
}
@ -135,7 +135,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ISomeInterfaceProperty:Subkey", "x"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var exception = Assert.Throws<InvalidOperationException>(
() => ConfigurationBinder.Bind<TestOptions>(config));
@ -152,7 +152,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ClassWithoutPublicConstructorProperty:Subkey", "x"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var exception = Assert.Throws<InvalidOperationException>(
() => ConfigurationBinder.Bind<TestOptions>(config));
@ -171,7 +171,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"IntProperty", IncorrectValue}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var exception = Assert.Throws<InvalidOperationException>(
() => ConfigurationBinder.Bind<TestOptions>(config));
@ -189,7 +189,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ThrowsWhenActivatedProperty:subkey", "x"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var exception = Assert.Throws<InvalidOperationException>(
() => ConfigurationBinder.Bind<TestOptions>(config));
@ -207,7 +207,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"NestedOptionsProperty:NestedOptions2Property:ISomeInterfaceProperty:subkey", "x"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var exception = Assert.Throws<InvalidOperationException>(
() => ConfigurationBinder.Bind<TestOptions>(config));

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationCollectionBinding
{
@ -20,7 +20,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"StringList:x", "valx"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -45,7 +45,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"IntList:x", "45"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -70,7 +70,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"AlreadyInitializedList:x", "valx"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -96,7 +96,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"CustomList:x", "valx"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -120,7 +120,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ObjectList:2:Integer", "32"},
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -143,7 +143,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"NestedLists:1:2", "val12"},
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -168,7 +168,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"StringDictionary:ghi", "val_3"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithDictionary>(config);
@ -189,7 +189,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"IntDictionary:ghi", "44"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithDictionary>(config);
@ -210,7 +210,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ObjectDictionary:ghi:Integer", "3"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithDictionary>(config);
@ -233,7 +233,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ListDictionary:def:2", "def_2"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithDictionary>(config);
@ -260,7 +260,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"ObjectList:1:ListInNestedOption:2", "12"},
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithLists>(config);
@ -285,7 +285,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
{"NonStringKeyDictionary:ghi", "val_3"}
};
var config = new Configuration(new MemoryConfigurationSource(input));
var config = new ConfigurationSection(new MemoryConfigurationSource(input));
var options = ConfigurationBinder.Bind<OptionsWithDictionary>(config);

Просмотреть файл

@ -4,10 +4,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Helper;
using Microsoft.Framework.Configuration.Helper;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationHelperTest
{

Просмотреть файл

@ -4,7 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationPathComparerTest
{

Просмотреть файл

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Test
namespace Microsoft.Framework.Configuration.Test
{
public class ConfigurationTest
{
@ -15,7 +15,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
public void SetBasePathThroughConstructor()
{
var expectedBasePath = @"C:\ExamplePath";
var config = new Configuration(basePath: expectedBasePath);
var config = new ConfigurationSection(basePath: expectedBasePath);
Assert.Equal(expectedBasePath, config.BasePath);
}
@ -23,7 +23,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
[Fact]
public void DefaultBasePathIsNull()
{
var config = new Configuration();
var config = new ConfigurationSection();
Assert.Null(config.BasePath);
}
@ -48,7 +48,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
var memConfigSrc2 = new MemoryConfigurationSource(dic2);
var memConfigSrc3 = new MemoryConfigurationSource(dic3);
var config = new Configuration();
var config = new ConfigurationSection();
string memVal1, memVal2, memVal3;
bool memRet1, memRet2, memRet3;
@ -101,7 +101,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
var memConfigSrc1 = new MemoryConfigurationSource(dic1);
var memConfigSrc2 = new MemoryConfigurationSource(dic2);
var config = new Configuration();
var config = new ConfigurationSection();
// Act
config.Add(memConfigSrc1, load: false);
@ -124,7 +124,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
var memConfigSrc2 = new MemoryConfigurationSource(dict);
var memConfigSrc3 = new MemoryConfigurationSource(dict);
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(memConfigSrc1, load: false);
config.Add(memConfigSrc2, load: false);
config.Add(memConfigSrc3, load: false);
@ -165,7 +165,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
var memConfigSrc2 = new MemoryConfigurationSource(dic2);
var memConfigSrc3 = new MemoryConfigurationSource(dic3);
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(memConfigSrc1, load: false);
config.Add(memConfigSrc2, load: false);
config.Add(memConfigSrc3, load: false);
@ -227,7 +227,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
var memConfigSrc2 = new MemoryConfigurationSource(dic2);
var memConfigSrc3 = new MemoryConfigurationSource(dic3);
var config = new Configuration();
var config = new ConfigurationSection();
config.Add(memConfigSrc1, load: false);
config.Add(memConfigSrc2, load: false);
config.Add(memConfigSrc3, load: false);
@ -264,7 +264,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
memConfigSrc3
};
var config = new Configuration();
var config = new ConfigurationSection();
// Act
config.Add(memConfigSrc1, load: false);
@ -302,7 +302,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
memConfigSrc3
};
var config = new Configuration();
var config = new ConfigurationSection();
// Act
config.Add(memConfigSrc1, load: false);
@ -327,7 +327,7 @@ namespace Microsoft.Framework.ConfigurationModel.Test
public void SetValueThrowsExceptionNoSourceRegistered()
{
// Arrange
var config = new Configuration();
var config = new ConfigurationSection();
var expectedMsg = Resources.Error_NoSources;
// Act

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"frameworks": {

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.IO;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Xml.Test
namespace Microsoft.Framework.Configuration.Xml.Test
{
public class XmlConfigurationExtensionTest
{
@ -15,7 +15,7 @@ namespace Microsoft.Framework.ConfigurationModel.Xml.Test
public void AddXmlFile_ThrowsIfFilePathIsNullOrEmpty(string path)
{
// Arrange
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<ArgumentException>(() => XmlConfigurationExtension.AddXmlFile(configurationSource, path));
@ -28,7 +28,7 @@ namespace Microsoft.Framework.ConfigurationModel.Xml.Test
{
// Arrange
var path = Path.Combine(Directory.GetCurrentDirectory(), "file-does-not-exist.xml");
var configurationSource = new Configuration();
var configurationSource = new ConfigurationSection();
// Act and Assert
var ex = Assert.Throws<FileNotFoundException>(() => XmlConfigurationExtension.AddXmlFile(configurationSource, path));

Просмотреть файл

@ -9,10 +9,10 @@ using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Xml;
using Microsoft.AspNet.Testing.xunit;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Xml.Test
namespace Microsoft.Framework.Configuration.Xml.Test
{
public partial class XmlConfigurationSourceTest
{

Просмотреть файл

@ -5,10 +5,10 @@
// These tests only run on Core CLR.
using System;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Xml.Test
namespace Microsoft.Framework.Configuration.Xml.Test
{
public partial class XmlConfigurationSourceTest
{

Просмотреть файл

@ -3,10 +3,10 @@
using System;
using System.IO;
using Microsoft.Framework.ConfigurationModel.Test;
using Microsoft.Framework.Configuration.Test;
using Xunit;
namespace Microsoft.Framework.ConfigurationModel.Xml.Test
namespace Microsoft.Framework.Configuration.Xml.Test
{
public partial class XmlConfigurationSourceTest
{

Просмотреть файл

@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.Configuration.Xml": "1.0.0-*",
"Microsoft.Framework.Configuration.Test.Common": "1.0.0-*",
"Microsoft.AspNet.Testing": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},

Просмотреть файл

@ -1,12 +0,0 @@
{
"dependencies": {
"Microsoft.Framework.ConfigurationModel.Ini": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Test.Common": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},
"commands": {
"test": "xunit.runner.aspnet"
}
}