[
  {
    "path": ".appveyor.yml",
    "content": "init:\n- git config --global core.autocrlf true\nbranches:\n  only:\n  - master\n  - /^release\\/.*$/\n  - /^(.*\\/)?ci-.*$/\nbuild_script:\n- ps: .\\run.ps1 default-build\nclone_depth: 1\nenvironment:\n  global:\n    DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true\n    DOTNET_CLI_TELEMETRY_OPTOUT: 1\ntest: 'off'\ndeploy: 'off'\nos: Visual Studio 2017\n"
  },
  {
    "path": ".gitattributes",
    "content": "*.doc  diff=astextplain\n*.DOC\tdiff=astextplain\n*.docx\tdiff=astextplain\n*.DOCX\tdiff=astextplain\n*.dot\tdiff=astextplain\n*.DOT\tdiff=astextplain\n*.pdf\tdiff=astextplain\n*.PDF\tdiff=astextplain\n*.rtf\tdiff=astextplain\n*.RTF\tdiff=astextplain\n\n*.jpg  \tbinary\n*.png \tbinary\n*.gif \tbinary\n\n*.cs text=auto diff=csharp \n*.vb text=auto\n*.resx text=auto\n*.c text=auto\n*.cpp text=auto\n*.cxx text=auto\n*.h text=auto\n*.hxx text=auto\n*.py text=auto\n*.rb text=auto\n*.java text=auto\n*.html text=auto\n*.htm text=auto\n*.css text=auto\n*.scss text=auto\n*.sass text=auto\n*.less text=auto\n*.js text=auto\n*.lisp text=auto\n*.clj text=auto\n*.sql text=auto\n*.php text=auto\n*.lua text=auto\n*.m text=auto\n*.asm text=auto\n*.erl text=auto\n*.fs text=auto\n*.fsx text=auto\n*.hs text=auto\n\n*.csproj text=auto\n*.vbproj text=auto\n*.fsproj text=auto\n*.dbproj text=auto\n*.sln text=auto eol=crlf\n*.sh eol=lf\n"
  },
  {
    "path": ".gitignore",
    "content": "[Oo]bj/\n[Bb]in/\nTestResults/\n.nuget/\n_ReSharper.*/\npackages/\nartifacts/\nPublishProfiles/\n*.user\n*.suo\n*.cache\n*.docstates\n_ReSharper.*\nnuget.exe\n*net45.csproj\n*net451.csproj\n*k10.csproj\n*.psess\n*.vsp\n*.pidb\n*.userprefs\n*DS_Store\n*.ncrunchsolution\n*.*sdf\n*.ipch\n*.sln.ide\nproject.lock.json\n.vs\n.vscode/\n.build/\n.testPublish/\n*.nuget.props\n*.nuget.targets\nglobal.json\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: csharp\nsudo: false\ndist: trusty\nenv:\n  global:\n  - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true\n  - DOTNET_CLI_TELEMETRY_OPTOUT: 1\nmono: none\nos:\n- linux\n- osx\nosx_image: xcode8.2\naddons:\n  apt:\n    packages:\n    - libunwind8\nbranches:\n  only:\n  - master\n  - /^release\\/.*$/\n  - /^(.*\\/)?ci-.*$/\nbefore_install:\n- if test \"$TRAVIS_OS_NAME\" == \"osx\"; then brew update; brew install openssl; ln -s\n  /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib\n  /usr/local/lib/; fi\nscript:\n- ./build.sh\n"
  },
  {
    "path": ".vsts-pipelines/builds/ci-internal.yml",
    "content": "trigger:\n- master\n- release/*\n\nresources:\n  repositories:\n  - repository: buildtools\n    type: git\n    name: aspnet-BuildTools\n    ref: refs/heads/master\n\nphases:\n- template: .vsts-pipelines/templates/project-ci.yml@buildtools\n"
  },
  {
    "path": ".vsts-pipelines/builds/ci-public.yml",
    "content": "trigger:\n- master\n- release/*\n\n# See https://github.com/aspnet/BuildTools\nresources:\n  repositories:\n  - repository: buildtools\n    type: github\n    endpoint: DotNet-Bot GitHub Connection\n    name: aspnet/BuildTools\n    ref: refs/heads/master\n\nphases:\n- template: .vsts-pipelines/templates/project-ci.yml@buildtools\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing\n======\n\nInformation on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo.\n"
  },
  {
    "path": "Configuration.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26424.2\r\nMinimumVisualStudioVersion = 15.0.26730.03\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"src\", \"src\", \"{F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\tsrc\\Directory.Build.props = src\\Directory.Build.props\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"test\", \"test\", \"{B54371FF-B920-46C8-8D55-6B19DBB43EBF}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\ttest\\Directory.Build.props = test\\Directory.Build.props\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Json\", \"src\\Config.Json\\Config.Json.csproj\", \"{4C4CD1BC-4411-4AFD-9D04-147053F0E259}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Xml\", \"src\\Config.Xml\\Config.Xml.csproj\", \"{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Json.Test\", \"test\\Config.Json.Test\\Config.Json.Test.csproj\", \"{AE8F8C20-9ED9-4A16-9565-27DF77683789}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Xml.Test\", \"test\\Config.Xml.Test\\Config.Xml.Test.csproj\", \"{0786C785-944A-4423-96A6-4E7BFDB4A1B0}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Test\", \"test\\Config.Test\\Config.Test.csproj\", \"{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration\", \"src\\Config\\Config.csproj\", \"{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.FunctionalTests\", \"test\\Config.FunctionalTests\\Config.FunctionalTests.csproj\", \"{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Abstractions\", \"src\\Config.Abstractions\\Config.Abstractions.csproj\", \"{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Test.Common\", \"test\\Config.Test.Common\\Config.Test.Common.csproj\", \"{29C120E5-F682-4BFB-826B-040A594802CA}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.CommandLine\", \"src\\Config.CommandLine\\Config.CommandLine.csproj\", \"{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Ini\", \"src\\Config.Ini\\Config.Ini.csproj\", \"{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.EnvironmentVariables\", \"src\\Config.EnvironmentVariables\\Config.EnvironmentVariables.csproj\", \"{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.CommandLine.Test\", \"test\\Config.CommandLine.Test\\Config.CommandLine.Test.csproj\", \"{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Ini.Test\", \"test\\Config.Ini.Test\\Config.Ini.Test.csproj\", \"{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.EnvironmentVariables.Test\", \"test\\Config.EnvironmentVariables.Test\\Config.EnvironmentVariables.Test.csproj\", \"{7D0F805B-ADFF-4C47-A90C-24DD74416821}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Binder\", \"src\\Config.Binder\\Config.Binder.csproj\", \"{D506FD2F-59A0-4A26-AA6D-E81998B58B34}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.Binder.Test\", \"test\\Config.Binder.Test\\Config.Binder.Test.csproj\", \"{AE6FFE9B-6378-4D57-AA24-7D257F18B235}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.FileExtensions\", \"src\\Config.FileExtensions\\Config.FileExtensions.csproj\", \"{881E7CBC-492C-47C5-98A6-61DD1C753EE6}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.FileExtensions.Test\", \"test\\Config.FileExtensions.Test\\Config.FileExtensions.Test.csproj\", \"{F7932F19-EB68-4C52-9CD1-3B51E48C2337}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.AzureKeyVault\", \"src\\Config.AzureKeyVault\\Config.AzureKeyVault.csproj\", \"{A538F609-E902-40CE-8459-4248F9F63558}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.AzureKeyVault.Test\", \"test\\Config.AzureKeyVault.Test\\Config.AzureKeyVault.Test.csproj\", \"{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"samples\", \"samples\", \"{AB015580-541D-4E2D-B904-E71F8582CC68}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"KeyVaultSample\", \"samples\\KeyVaultSample\\KeyVaultSample.csproj\", \"{7AAC49A7-939A-40B1-A86A-705464B4667D}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.UserSecrets\", \"src\\Config.UserSecrets\\Config.UserSecrets.csproj\", \"{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.UserSecrets.Test\", \"test\\Config.UserSecrets.Test\\Config.UserSecrets.Test.csproj\", \"{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.KeyPerFile\", \"src\\Config.KeyPerFile\\Config.KeyPerFile.csproj\", \"{69AB0230-D82E-438B-AFE5-85BFF414F1B8}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Microsoft.Extensions.Configuration.KeyPerFile.Test\", \"test\\Config.KeyPerFile.Test\\Config.KeyPerFile.Test.csproj\", \"{82A403ED-F827-4FED-BE38-7F87925A07E1}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Solution Items\", \"Solution Items\", \"{B926267F-98A3-41F0-90F5-0B1ADF78CA65}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t.appveyor.yml = .appveyor.yml\r\n\t\t.travis.yml = .travis.yml\r\n\t\tbuild.cmd = build.cmd\r\n\t\tbuild.ps1 = build.ps1\r\n\t\tbuild.sh = build.sh\r\n\t\tCONTRIBUTING.md = CONTRIBUTING.md\r\n\t\tDirectory.Build.props = Directory.Build.props\r\n\t\tDirectory.Build.targets = Directory.Build.targets\r\n\t\tLICENSE.txt = LICENSE.txt\r\n\t\tNuGet.config = NuGet.config\r\n\t\tNuGetPackageVerifier.json = NuGetPackageVerifier.json\r\n\t\tREADME.md = README.md\r\n\t\tversion.xml = version.xml\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"build\", \"build\", \"{F786716B-DE4D-4C4D-8D5B-38182329E5B5}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\tbuild\\dependencies.props = build\\dependencies.props\r\n\t\tbuild\\repo.props = build\\repo.props\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{4C4CD1BC-4411-4AFD-9D04-147053F0E259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{4C4CD1BC-4411-4AFD-9D04-147053F0E259}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{4C4CD1BC-4411-4AFD-9D04-147053F0E259}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{4C4CD1BC-4411-4AFD-9D04-147053F0E259}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{AE8F8C20-9ED9-4A16-9565-27DF77683789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{AE8F8C20-9ED9-4A16-9565-27DF77683789}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{AE8F8C20-9ED9-4A16-9565-27DF77683789}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{AE8F8C20-9ED9-4A16-9565-27DF77683789}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{0786C785-944A-4423-96A6-4E7BFDB4A1B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{0786C785-944A-4423-96A6-4E7BFDB4A1B0}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{0786C785-944A-4423-96A6-4E7BFDB4A1B0}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{0786C785-944A-4423-96A6-4E7BFDB4A1B0}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{8777C77E-CA2A-42C1-90CD-2EA9CBF28937}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{EAC77F15-F12E-496B-9184-1B1DA89BFFE9}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{29C120E5-F682-4BFB-826B-040A594802CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{29C120E5-F682-4BFB-826B-040A594802CA}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{29C120E5-F682-4BFB-826B-040A594802CA}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{29C120E5-F682-4BFB-826B-040A594802CA}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{D4B7CF9B-4229-44DC-800F-CC39150CEAB2}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{80A8F10C-E9A6-4677-919D-FE5DB320FEDF}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{7D0F805B-ADFF-4C47-A90C-24DD74416821}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{7D0F805B-ADFF-4C47-A90C-24DD74416821}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{7D0F805B-ADFF-4C47-A90C-24DD74416821}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{7D0F805B-ADFF-4C47-A90C-24DD74416821}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{D506FD2F-59A0-4A26-AA6D-E81998B58B34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{D506FD2F-59A0-4A26-AA6D-E81998B58B34}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{D506FD2F-59A0-4A26-AA6D-E81998B58B34}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{D506FD2F-59A0-4A26-AA6D-E81998B58B34}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{AE6FFE9B-6378-4D57-AA24-7D257F18B235}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{AE6FFE9B-6378-4D57-AA24-7D257F18B235}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{AE6FFE9B-6378-4D57-AA24-7D257F18B235}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{AE6FFE9B-6378-4D57-AA24-7D257F18B235}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{881E7CBC-492C-47C5-98A6-61DD1C753EE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{881E7CBC-492C-47C5-98A6-61DD1C753EE6}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{881E7CBC-492C-47C5-98A6-61DD1C753EE6}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{881E7CBC-492C-47C5-98A6-61DD1C753EE6}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{F7932F19-EB68-4C52-9CD1-3B51E48C2337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{F7932F19-EB68-4C52-9CD1-3B51E48C2337}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{F7932F19-EB68-4C52-9CD1-3B51E48C2337}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{F7932F19-EB68-4C52-9CD1-3B51E48C2337}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{A538F609-E902-40CE-8459-4248F9F63558}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{A538F609-E902-40CE-8459-4248F9F63558}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{A538F609-E902-40CE-8459-4248F9F63558}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{A538F609-E902-40CE-8459-4248F9F63558}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{7AAC49A7-939A-40B1-A86A-705464B4667D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{7AAC49A7-939A-40B1-A86A-705464B4667D}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{7AAC49A7-939A-40B1-A86A-705464B4667D}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{7AAC49A7-939A-40B1-A86A-705464B4667D}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{69AB0230-D82E-438B-AFE5-85BFF414F1B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{69AB0230-D82E-438B-AFE5-85BFF414F1B8}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{69AB0230-D82E-438B-AFE5-85BFF414F1B8}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{69AB0230-D82E-438B-AFE5-85BFF414F1B8}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{82A403ED-F827-4FED-BE38-7F87925A07E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{82A403ED-F827-4FED-BE38-7F87925A07E1}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{82A403ED-F827-4FED-BE38-7F87925A07E1}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{82A403ED-F827-4FED-BE38-7F87925A07E1}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(NestedProjects) = preSolution\r\n\t\t{4C4CD1BC-4411-4AFD-9D04-147053F0E259} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{1BEC97C1-56B9-4B2B-A95A-C0DF72F1E96A} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{AE8F8C20-9ED9-4A16-9565-27DF77683789} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{0786C785-944A-4423-96A6-4E7BFDB4A1B0} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{8777C77E-CA2A-42C1-90CD-2EA9CBF28937} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{62BD48B5-BB0C-4C2C-9C4B-04CF75CDCCF1} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{EAC77F15-F12E-496B-9184-1B1DA89BFFE9} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{3F1CB08E-9FBD-4CAE-A78A-4AC43F24FC49} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{29C120E5-F682-4BFB-826B-040A594802CA} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{D4B7CF9B-4229-44DC-800F-CC39150CEAB2} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{C555C5D5-BF4A-451E-AB43-EBF4DE885EC7} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{A6A2C665-E5A4-4FD3-AD0C-E33E6CFFCB88} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{CE9C8903-AA8A-40E6-B03D-32A08A4A39AF} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{80A8F10C-E9A6-4677-919D-FE5DB320FEDF} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{7D0F805B-ADFF-4C47-A90C-24DD74416821} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{D506FD2F-59A0-4A26-AA6D-E81998B58B34} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{AE6FFE9B-6378-4D57-AA24-7D257F18B235} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{881E7CBC-492C-47C5-98A6-61DD1C753EE6} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{F7932F19-EB68-4C52-9CD1-3B51E48C2337} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{A538F609-E902-40CE-8459-4248F9F63558} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{DA9C1F35-3F92-4F3A-B3B1-A62CCE626D48} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{7AAC49A7-939A-40B1-A86A-705464B4667D} = {AB015580-541D-4E2D-B904-E71F8582CC68}\r\n\t\t{58B6443B-1278-4DF9-B7BB-DDF3BFFCF868} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{AC7FAD2A-5763-404D-B0FC-3CCA81A16B0A} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{69AB0230-D82E-438B-AFE5-85BFF414F1B8} = {F141E2D0-F9B8-4ADB-A19A-7B6FF4CA19A1}\r\n\t\t{82A403ED-F827-4FED-BE38-7F87925A07E1} = {B54371FF-B920-46C8-8D55-6B19DBB43EBF}\r\n\t\t{F786716B-DE4D-4C4D-8D5B-38182329E5B5} = {B926267F-98A3-41F0-90F5-0B1ADF78CA65}\r\n\tEndGlobalSection\r\nEndGlobal"
  },
  {
    "path": "Directory.Build.props",
    "content": "﻿<Project>\n  <Import\n    Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\\AspNetCoreSettings.props\"\n    Condition=\" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' \" />\n\n  <Import Project=\"version.props\" />\n  <Import Project=\"build\\dependencies.props\" />\n  <Import Project=\"build\\sources.props\" />\n\n  <PropertyGroup>\n    <Product>Microsoft .NET Extensions</Product>\n    <RepositoryUrl>https://github.com/aspnet/Configuration</RepositoryUrl>\n    <RepositoryType>git</RepositoryType>\n    <RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>\n    <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)build\\Key.snk</AssemblyOriginatorKeyFile>\n    <SignAssembly>true</SignAssembly>\n    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\n  </PropertyGroup>\n</Project>\n"
  },
  {
    "path": "Directory.Build.targets",
    "content": "<Project>\n  <PropertyGroup>\n    <RuntimeFrameworkVersion Condition=\" '$(TargetFramework)' == 'netcoreapp2.0' \">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>\n    <RuntimeFrameworkVersion Condition=\" '$(TargetFramework)' == 'netcoreapp2.1' \">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>\n    <RuntimeFrameworkVersion Condition=\" '$(TargetFramework)' == 'netcoreapp2.2' \">$(MicrosoftNETCoreApp22PackageVersion)</RuntimeFrameworkVersion>\n    <NETStandardImplicitPackageVersion Condition=\" '$(TargetFramework)' == 'netstandard2.0' \">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>\n    <!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->\n    <NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>\n  </PropertyGroup>\n</Project>\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright (c) .NET Foundation and Contributors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "NuGet.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <packageSources>\n    <clear />\n    <!-- Restore sources should be defined in build/sources.props. -->\n  </packageSources>\n</configuration>\n"
  },
  {
    "path": "NuGetPackageVerifier.json",
    "content": "{\n    \"Default\": {\n        \"rules\": [\n            \"DefaultCompositeRule\"\n        ]\n    }\n}"
  },
  {
    "path": "README.md",
    "content": "Configuration [Archived]\n========================\n\n**This GitHub project has been archived.** Ongoing development on this project can be found in <https://github.com/aspnet/Extensions>.\n\nConfiguration is a framework for accessing Key/Value based configuration settings in an application. Includes configuration providers for command line arguments, environment variables, INI files, JSON files, and XML files.\n\nThis project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/aspnet/AspNetCore) repo.\n"
  },
  {
    "path": "build/dependencies.props",
    "content": "﻿<Project>\n  <PropertyGroup>\n    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Package Versions\">\n    <InternalAspNetCoreSdkPackageVersion>3.0.0-alpha1-20181004.7</InternalAspNetCoreSdkPackageVersion>\n    <MicrosoftAspNetCoreTestingPackageVersion>3.0.0-alpha1-10584</MicrosoftAspNetCoreTestingPackageVersion>\n    <MicrosoftAzureKeyVaultPackageVersion>2.3.2</MicrosoftAzureKeyVaultPackageVersion>\n    <MicrosoftAzureServicesAppAuthenticationPackageVersion>1.0.1</MicrosoftAzureServicesAppAuthenticationPackageVersion>\n    <MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.0.0-alpha1-10584</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>\n    <MicrosoftExtensionsPrimitivesPackageVersion>3.0.0-alpha1-10584</MicrosoftExtensionsPrimitivesPackageVersion>\n    <MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>\n    <MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>\n    <MicrosoftNETCoreApp22PackageVersion>2.2.0-preview2-26905-02</MicrosoftNETCoreApp22PackageVersion>\n    <MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>\n    <MoqPackageVersion>4.9.0</MoqPackageVersion>\n    <NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>\n    <NewtonsoftJsonPackageVersion>11.0.2</NewtonsoftJsonPackageVersion>\n    <SystemSecurityCryptographyXmlPackageVersion>4.6.0-preview1-26907-04</SystemSecurityCryptographyXmlPackageVersion>\n    <XunitPackageVersion>2.3.1</XunitPackageVersion>\n    <XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>\n  </PropertyGroup>\n  <PropertyGroup Label=\"Package Versions: Pinned\" />\n  <Import Project=\"$(DotNetPackageVersionPropsPath)\" Condition=\" '$(DotNetPackageVersionPropsPath)' != '' \" />\n</Project>\n"
  },
  {
    "path": "build/repo.props",
    "content": "<Project>\n  <Import Project=\"dependencies.props\" />\n\n  <ItemGroup>\n    <ExcludeFromTest Include=\"$(RepositoryRoot)test\\Config.AzureKeyVault.Test\\Config.AzureKeyVault.Test.csproj\" Condition=\"'$(OS)' != 'Windows_NT'\" />\n    <ExcludeFromTest Include=\"$(RepositoryRoot)test\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n  <PropertyGroup>\n    <!-- These properties are use by the automation that updates dependencies.props -->\n    <LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>\n    <LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <DotNetCoreRuntime Include=\"$(MicrosoftNETCoreApp20PackageVersion)\" />\n    <DotNetCoreRuntime Include=\"$(MicrosoftNETCoreApp21PackageVersion)\" />\n    <DotNetCoreRuntime Include=\"$(MicrosoftNETCoreApp22PackageVersion)\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "build/sources.props",
    "content": "<Project>\n  <Import Project=\"$(DotNetRestoreSourcePropsPath)\" Condition=\"'$(DotNetRestoreSourcePropsPath)' != ''\"/>\n\n  <PropertyGroup Label=\"RestoreSources\">\n    <RestoreSources>$(DotNetRestoreSources)</RestoreSources>\n    <RestoreSources Condition=\"'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' \">\n      $(RestoreSources);\n      https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;\n      https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;\n      https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;\n    </RestoreSources>\n    <RestoreSources Condition=\"'$(DotNetBuildOffline)' != 'true'\">\n      $(RestoreSources);\n      https://api.nuget.org/v3/index.json;\n    </RestoreSources>\n  </PropertyGroup>\n</Project>\n"
  },
  {
    "path": "build.cmd",
    "content": "@ECHO OFF\nPowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE\"\n"
  },
  {
    "path": "build.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n# Call \"sync\" between \"chmod\" and execution to prevent \"text file busy\" error in Docker (aufs)\nchmod +x \"$DIR/run.sh\"; sync\n\"$DIR/run.sh\" default-build \"$@\"\n"
  },
  {
    "path": "korebuild-lock.txt",
    "content": "version:3.0.0-alpha1-20181004.7\ncommithash:27fabdaf2b1d4753c3d2749581694ca65d78f7f2\n"
  },
  {
    "path": "korebuild.json",
    "content": "{\n  \"$schema\": \"https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json\",\n  \"channel\": \"master\"\n}\n"
  },
  {
    "path": "run.cmd",
    "content": "@ECHO OFF\nPowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE\"\n"
  },
  {
    "path": "run.ps1",
    "content": "#!/usr/bin/env powershell\n#requires -version 4\n\n<#\n.SYNOPSIS\nExecutes KoreBuild commands.\n\n.DESCRIPTION\nDownloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`.\n\n.PARAMETER Command\nThe KoreBuild command to run.\n\n.PARAMETER Path\nThe folder to build. Defaults to the folder containing this script.\n\n.PARAMETER Channel\nThe channel of KoreBuild to download. Overrides the value from the config file.\n\n.PARAMETER DotNetHome\nThe directory where .NET Core tools will be stored.\n\n.PARAMETER ToolsSource\nThe base url where build tools can be downloaded. Overrides the value from the config file.\n\n.PARAMETER Update\nUpdates KoreBuild to the latest version even if a lock file is present.\n\n.PARAMETER Reinstall\nRe-installs KoreBuild\n\n.PARAMETER ConfigFile\nThe path to the configuration file that stores values. Defaults to korebuild.json.\n\n.PARAMETER ToolsSourceSuffix\nThe Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores.\n\n.PARAMETER CI\nSets up CI specific settings and variables.\n\n.PARAMETER Arguments\nArguments to be passed to the command\n\n.NOTES\nThis function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.\nWhen the lockfile is not present, KoreBuild will create one using latest available version from $Channel.\n\nThe $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set\nin the file are overridden by command line parameters.\n\n.EXAMPLE\nExample config file:\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json\",\n  \"channel\": \"master\",\n  \"toolsSource\": \"https://aspnetcore.blob.core.windows.net/buildtools\"\n}\n```\n#>\n[CmdletBinding(PositionalBinding = $false)]\nparam(\n    [Parameter(Mandatory = $true, Position = 0)]\n    [string]$Command,\n    [string]$Path = $PSScriptRoot,\n    [Alias('c')]\n    [string]$Channel,\n    [Alias('d')]\n    [string]$DotNetHome,\n    [Alias('s')]\n    [string]$ToolsSource,\n    [Alias('u')]\n    [switch]$Update,\n    [switch]$Reinstall,\n    [string]$ToolsSourceSuffix,\n    [string]$ConfigFile = $null,\n    [switch]$CI,\n    [Parameter(ValueFromRemainingArguments = $true)]\n    [string[]]$Arguments\n)\n\nSet-StrictMode -Version 2\n$ErrorActionPreference = 'Stop'\n\n#\n# Functions\n#\n\nfunction Get-KoreBuild {\n\n    $lockFile = Join-Path $Path 'korebuild-lock.txt'\n\n    if (!(Test-Path $lockFile) -or $Update) {\n        Get-RemoteFile \"$ToolsSource/korebuild/channels/$Channel/latest.txt\" $lockFile $ToolsSourceSuffix\n    }\n\n    $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1\n    if (!$version) {\n        Write-Error \"Failed to parse version from $lockFile. Expected a line that begins with 'version:'\"\n    }\n    $version = $version.TrimStart('version:').Trim()\n    $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version)\n\n    if ($Reinstall -and (Test-Path $korebuildPath)) {\n        Remove-Item -Force -Recurse $korebuildPath\n    }\n\n    if (!(Test-Path $korebuildPath)) {\n        Write-Host -ForegroundColor Magenta \"Downloading KoreBuild $version\"\n        New-Item -ItemType Directory -Path $korebuildPath | Out-Null\n        $remotePath = \"$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip\"\n\n        try {\n            $tmpfile = Join-Path ([IO.Path]::GetTempPath()) \"KoreBuild-$([guid]::NewGuid()).zip\"\n            Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix\n            if (Get-Command -Name 'Microsoft.PowerShell.Archive\\Expand-Archive' -ErrorAction Ignore) {\n                # Use built-in commands where possible as they are cross-plat compatible\n                Microsoft.PowerShell.Archive\\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath\n            }\n            else {\n                # Fallback to old approach for old installations of PowerShell\n                Add-Type -AssemblyName System.IO.Compression.FileSystem\n                [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath)\n            }\n        }\n        catch {\n            Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore\n            throw\n        }\n        finally {\n            Remove-Item $tmpfile -ErrorAction Ignore\n        }\n    }\n\n    return $korebuildPath\n}\n\nfunction Join-Paths([string]$path, [string[]]$childPaths) {\n    $childPaths | ForEach-Object { $path = Join-Path $path $_ }\n    return $path\n}\n\nfunction Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) {\n    if ($RemotePath -notlike 'http*') {\n        Copy-Item $RemotePath $LocalPath\n        return\n    }\n\n    $retries = 10\n    while ($retries -gt 0) {\n        $retries -= 1\n        try {\n            Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath\n            return\n        }\n        catch {\n            Write-Verbose \"Request failed. $retries retries remaining\"\n        }\n    }\n\n    Write-Error \"Download failed: '$RemotePath'.\"\n}\n\n#\n# Main\n#\n\n# Load configuration or set defaults\n\n$Path = Resolve-Path $Path\nif (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' }\n\nif (Test-Path $ConfigFile) {\n    try {\n        $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json\n        if ($config) {\n            if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel }\n            if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource}\n        }\n    }\n    catch {\n        Write-Host -ForegroundColor Red $Error[0]\n        Write-Error \"$ConfigFile contains invalid JSON.\"\n        exit 1\n    }\n}\n\nif (!$DotNetHome) {\n    $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } `\n        elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} `\n        elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}`\n        else { Join-Path $PSScriptRoot '.dotnet'}\n}\n\nif (!$Channel) { $Channel = 'master' }\nif (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }\n\n# Execute\n\n$korebuildPath = Get-KoreBuild\nImport-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')\n\ntry {\n    Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI\n    Invoke-KoreBuildCommand $Command @Arguments\n}\nfinally {\n    Remove-Module 'KoreBuild' -ErrorAction Ignore\n}\n"
  },
  {
    "path": "run.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\n#\n# variables\n#\n\nRESET=\"\\033[0m\"\nRED=\"\\033[0;31m\"\nYELLOW=\"\\033[0;33m\"\nMAGENTA=\"\\033[0;95m\"\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n[ -z \"${DOTNET_HOME:-}\" ] && DOTNET_HOME=\"$HOME/.dotnet\"\nverbose=false\nupdate=false\nreinstall=false\nrepo_path=\"$DIR\"\nchannel=''\ntools_source=''\ntools_source_suffix=''\nci=false\n\n#\n# Functions\n#\n__usage() {\n    echo \"Usage: $(basename \"${BASH_SOURCE[0]}\") command [options] [[--] <Arguments>...]\"\n    echo \"\"\n    echo \"Arguments:\"\n    echo \"    command                The command to be run.\"\n    echo \"    <Arguments>...         Arguments passed to the command. Variable number of arguments allowed.\"\n    echo \"\"\n    echo \"Options:\"\n    echo \"    --verbose                                             Show verbose output.\"\n    echo \"    -c|--channel <CHANNEL>                                The channel of KoreBuild to download. Overrides the value from the config file..\"\n    echo \"    --config-file <FILE>                                  The path to the configuration file that stores values. Defaults to korebuild.json.\"\n    echo \"    -d|--dotnet-home <DIR>                                The directory where .NET Core tools will be stored. Defaults to '\\$DOTNET_HOME' or '\\$HOME/.dotnet.\"\n    echo \"    --path <PATH>                                         The directory to build. Defaults to the directory containing the script.\"\n    echo \"    -s|--tools-source|-ToolsSource <URL>                  The base url where build tools can be downloaded. Overrides the value from the config file.\"\n    echo \"    --tools-source-suffix|-ToolsSourceSuffix <SUFFIX>     The suffix to append to tools-source. Useful for query strings.\"\n    echo \"    -u|--update                                           Update to the latest KoreBuild even if the lock file is present.\"\n    echo \"    --reinstall                                           Reinstall KoreBuild.\"\n    echo \"    --ci                                                  Apply CI specific settings and environment variables.\"\n    echo \"\"\n    echo \"Description:\"\n    echo \"    This function will create a file \\$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.\"\n    echo \"    When the lockfile is not present, KoreBuild will create one using latest available version from \\$channel.\"\n\n    if [[ \"${1:-}\" != '--no-exit' ]]; then\n        exit 2\n    fi\n}\n\nget_korebuild() {\n    local version\n    local lock_file=\"$repo_path/korebuild-lock.txt\"\n    if [ ! -f \"$lock_file\" ] || [ \"$update\" = true ]; then\n        __get_remote_file \"$tools_source/korebuild/channels/$channel/latest.txt\" \"$lock_file\" \"$tools_source_suffix\"\n    fi\n    version=\"$(grep 'version:*' -m 1 \"$lock_file\")\"\n    if [[ \"$version\" == '' ]]; then\n        __error \"Failed to parse version from $lock_file. Expected a line that begins with 'version:'\"\n        return 1\n    fi\n    version=\"$(echo \"${version#version:}\" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')\"\n    local korebuild_path=\"$DOTNET_HOME/buildtools/korebuild/$version\"\n\n    if [ \"$reinstall\" = true ] && [ -d \"$korebuild_path\" ]; then\n        rm -rf \"$korebuild_path\"\n    fi\n\n    {\n        if [ ! -d \"$korebuild_path\" ]; then\n            mkdir -p \"$korebuild_path\"\n            local remote_path=\"$tools_source/korebuild/artifacts/$version/korebuild.$version.zip\"\n            tmpfile=\"$(mktemp)\"\n            echo -e \"${MAGENTA}Downloading KoreBuild ${version}${RESET}\"\n            if __get_remote_file \"$remote_path\" \"$tmpfile\" \"$tools_source_suffix\"; then\n                unzip -q -d \"$korebuild_path\" \"$tmpfile\"\n            fi\n            rm \"$tmpfile\" || true\n        fi\n\n        source \"$korebuild_path/KoreBuild.sh\"\n    } || {\n        if [ -d \"$korebuild_path\" ]; then\n            echo \"Cleaning up after failed installation\"\n            rm -rf \"$korebuild_path\" || true\n        fi\n        return 1\n    }\n}\n\n__error() {\n    echo -e \"${RED}error: $*${RESET}\" 1>&2\n}\n\n__warn() {\n    echo -e \"${YELLOW}warning: $*${RESET}\"\n}\n\n__machine_has() {\n    hash \"$1\" > /dev/null 2>&1\n    return $?\n}\n\n__get_remote_file() {\n    local remote_path=$1\n    local local_path=$2\n    local remote_path_suffix=$3\n\n    if [[ \"$remote_path\" != 'http'* ]]; then\n        cp \"$remote_path\" \"$local_path\"\n        return 0\n    fi\n\n    local failed=false\n    if __machine_has wget; then\n        wget --tries 10 --quiet -O \"$local_path\" \"${remote_path}${remote_path_suffix}\" || failed=true\n    else\n        failed=true\n    fi\n\n    if [ \"$failed\" = true ] && __machine_has curl; then\n        failed=false\n        curl --retry 10 -sSL -f --create-dirs -o \"$local_path\" \"${remote_path}${remote_path_suffix}\" || failed=true\n    fi\n\n    if [ \"$failed\" = true ]; then\n        __error \"Download failed: $remote_path\" 1>&2\n        return 1\n    fi\n}\n\n#\n# main\n#\n\ncommand=\"${1:-}\"\nshift\n\nwhile [[ $# -gt 0 ]]; do\n    case $1 in\n        -\\?|-h|--help)\n            __usage --no-exit\n            exit 0\n            ;;\n        -c|--channel|-Channel)\n            shift\n            channel=\"${1:-}\"\n            [ -z \"$channel\" ] && __usage\n            ;;\n        --config-file|-ConfigFile)\n            shift\n            config_file=\"${1:-}\"\n            [ -z \"$config_file\" ] && __usage\n            if [ ! -f \"$config_file\" ]; then\n                __error \"Invalid value for --config-file. $config_file does not exist.\"\n                exit 1\n            fi\n            ;;\n        -d|--dotnet-home|-DotNetHome)\n            shift\n            DOTNET_HOME=\"${1:-}\"\n            [ -z \"$DOTNET_HOME\" ] && __usage\n            ;;\n        --path|-Path)\n            shift\n            repo_path=\"${1:-}\"\n            [ -z \"$repo_path\" ] && __usage\n            ;;\n        -s|--tools-source|-ToolsSource)\n            shift\n            tools_source=\"${1:-}\"\n            [ -z \"$tools_source\" ] && __usage\n            ;;\n        --tools-source-suffix|-ToolsSourceSuffix)\n            shift\n            tools_source_suffix=\"${1:-}\"\n            [ -z \"$tools_source_suffix\" ] && __usage\n            ;;\n        -u|--update|-Update)\n            update=true\n            ;;\n        --reinstall|-[Rr]einstall)\n            reinstall=true\n            ;;\n        --ci|-[Cc][Ii])\n            ci=true\n            ;;\n        --verbose|-Verbose)\n            verbose=true\n            ;;\n        --)\n            shift\n            break\n            ;;\n        *)\n            break\n            ;;\n    esac\n    shift\ndone\n\nif ! __machine_has unzip; then\n    __error 'Missing required command: unzip'\n    exit 1\nfi\n\nif ! __machine_has curl && ! __machine_has wget; then\n    __error 'Missing required command. Either wget or curl is required.'\n    exit 1\nfi\n\n[ -z \"${config_file:-}\" ] && config_file=\"$repo_path/korebuild.json\"\nif [ -f \"$config_file\" ]; then\n    if __machine_has jq ; then\n        if jq '.' \"$config_file\" >/dev/null ; then\n            config_channel=\"$(jq -r 'select(.channel!=null) | .channel' \"$config_file\")\"\n            config_tools_source=\"$(jq -r 'select(.toolsSource!=null) | .toolsSource' \"$config_file\")\"\n        else\n            __error \"$config_file contains invalid JSON.\"\n            exit 1\n        fi\n    elif __machine_has python ; then\n        if python -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))\" >/dev/null ; then\n            config_channel=\"$(python -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')\")\"\n            config_tools_source=\"$(python -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')\")\"\n        else\n            __error \"$config_file contains invalid JSON.\"\n            exit 1\n        fi\n    elif __machine_has python3 ; then\n        if python3 -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))\" >/dev/null ; then\n            config_channel=\"$(python3 -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')\")\"\n            config_tools_source=\"$(python3 -c \"import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')\")\"\n        else\n            __error \"$config_file contains invalid JSON.\"\n            exit 1\n        fi\n    else\n        __error 'Missing required command: jq or python. Could not parse the JSON file.'\n        exit 1\n    fi\n\n    [ ! -z \"${config_channel:-}\" ] && channel=\"$config_channel\"\n    [ ! -z \"${config_tools_source:-}\" ] && tools_source=\"$config_tools_source\"\nfi\n\n[ -z \"$channel\" ] && channel='master'\n[ -z \"$tools_source\" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'\n\nget_korebuild\nset_korebuildsettings \"$tools_source\" \"$DOTNET_HOME\" \"$repo_path\" \"$config_file\" \"$ci\"\ninvoke_korebuild_command \"$command\" \"$@\"\n"
  },
  {
    "path": "samples/KeyVaultSample/EnvironmentSecretManager.cs",
    "content": "using Microsoft.Azure.KeyVault.Models;\nusing Microsoft.Extensions.Configuration.AzureKeyVault;\n\nnamespace ConsoleApplication\n{\n    public class EnvironmentSecretManager : DefaultKeyVaultSecretManager\n    {\n        private readonly string _environmentPrefix;\n\n        public EnvironmentSecretManager(string environment)\n        {\n            _environmentPrefix = environment + \"-\";\n        }\n\n        public override bool Load(SecretItem secret)\n        {\n            return HasEnvironmentPrefix(secret.Identifier.Name);\n        }\n\n        public override string GetKey(SecretBundle secret)\n        {\n            var keyName = base.GetKey(secret);\n\n            return HasEnvironmentPrefix(keyName)\n                ? keyName.Substring(_environmentPrefix.Length)\n                : keyName;\n        }\n\n        private bool HasEnvironmentPrefix(string name)\n        {\n            return name.StartsWith(_environmentPrefix);\n        }\n    }\n}\n"
  },
  {
    "path": "samples/KeyVaultSample/KeyVaultSample.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>\n    <DebugType>portable</DebugType>\n    <OutputType>Exe</OutputType>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <Content Include=\"settings.json\" CopyToOutputDirectory=\"PreserveNewest\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.AzureKeyVault\\Config.AzureKeyVault.csproj\" />\n    <ProjectReference Include=\"..\\..\\src\\Config.Json\\Config.Json.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "samples/KeyVaultSample/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Cryptography.X509Certificates;\nusing Microsoft.Extensions.Configuration;\n\nnamespace ConsoleApplication\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            var builder = new ConfigurationBuilder();\n            builder.AddJsonFile(\"settings.json\");\n\n            var config = builder.Build();\n\n            var store = new X509Store(StoreLocation.CurrentUser);\n            store.Open(OpenFlags.ReadOnly);\n            var cert = store.Certificates.Find(X509FindType.FindByThumbprint, config[\"CertificateThumbprint\"], false);\n\n            builder.AddAzureKeyVault(\n                config[\"Vault\"],\n                config[\"ClientId\"],\n                cert.OfType<X509Certificate2>().Single(),\n                new EnvironmentSecretManager(\"Development\"));\n            store.Close();\n\n            config = builder.Build();\n\n            Console.WriteLine(config[\"ConnectionString\"]);\n        }\n    }\n}\n"
  },
  {
    "path": "samples/KeyVaultSample/settings.json",
    "content": "﻿{\n  \"CertificateThumbprint\": \"\",\n  \"Vault\": \"\",\n  \"ClientId\": \"\"\n}\n"
  },
  {
    "path": "src/Config/ChainedBuilderExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// IConfigurationBuilder extension methods for the chaind configuration provider.\n    /// </summary>\n    public static class ChainedBuilderExtensions\n    {\n        /// <summary>\n        /// Adds an existing configuration to <paramref name=\"configurationBuilder\"/>.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"config\">The <see cref=\"IConfiguration\"/> to add.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddConfiguration(this IConfigurationBuilder configurationBuilder, IConfiguration config)\n        {\n            if (configurationBuilder == null)\n            {\n                throw new ArgumentNullException(nameof(configurationBuilder));\n            }\n            if (config == null)\n            {\n                throw new ArgumentNullException(nameof(config));\n            }\n\n            configurationBuilder.Add(new ChainedConfigurationSource { Configuration = config });\n            return configurationBuilder;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ChainedConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Chained implementation of <see cref=\"IConfigurationProvider\"/>\n    /// </summary>\n    public class ChainedConfigurationProvider : IConfigurationProvider\n    {\n        private readonly IConfiguration _config;\n\n        /// <summary>\n        /// Initialize a new instance from the source configuration.\n        /// </summary>\n        /// <param name=\"source\">The source configuration.</param>\n        public ChainedConfigurationProvider(ChainedConfigurationSource source)\n        {\n            if (source == null)\n            {\n                throw new ArgumentNullException(nameof(source));\n            }\n            if (source.Configuration == null)\n            {\n                throw new ArgumentNullException(nameof(source.Configuration));\n            }\n\n            _config = source.Configuration;\n        }\n\n        /// <summary>\n        /// Tries to get a configuration value for the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key.</param>\n        /// <param name=\"value\">The value.</param>\n        /// <returns><c>True</c> if a value for the specified key was found, otherwise <c>false</c>.</returns>\n        public bool TryGet(string key, out string value)\n        {\n            value = _config[key];\n            return !string.IsNullOrEmpty(value);\n        }\n\n        /// <summary>\n        /// Sets a configuration value for the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key.</param>\n        /// <param name=\"value\">The value.</param>\n        public void Set(string key, string value) => _config[key] = value;\n\n        /// <summary>\n        /// Returns a change token if this provider supports change tracking, null otherwise.\n        /// </summary>\n        /// <returns></returns>\n        public IChangeToken GetReloadToken() => _config.GetReloadToken();\n\n        /// <summary>\n        /// Loads configuration values from the source represented by this <see cref=\"IConfigurationProvider\"/>.\n        /// </summary>\n        public void Load() { }\n\n        /// <summary>\n        /// Returns the immediate descendant configuration keys for a given parent path based on this\n        /// <see cref=\"IConfigurationProvider\"/>'s data and the set of keys returned by all the preceding\n        /// <see cref=\"IConfigurationProvider\"/>s.\n        /// </summary>\n        /// <param name=\"earlierKeys\">The child keys returned by the preceding providers for the same parent path.</param>\n        /// <param name=\"parentPath\">The parent path.</param>\n        /// <returns>The child keys.</returns>\n        public IEnumerable<string> GetChildKeys(\n            IEnumerable<string> earlierKeys,\n            string parentPath)\n        {\n            var section = parentPath == null ? _config : _config.GetSection(parentPath);\n            var children = section.GetChildren();\n            var keys = new List<string>();\n            keys.AddRange(children.Select(c => c.Key));\n            return keys.Concat(earlierKeys)\n                .OrderBy(k => k, ConfigurationKeyComparer.Instance);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ChainedConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a chained IConfiguration as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class ChainedConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// The chained configuration.\n        /// </summary>\n        public IConfiguration Configuration { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"ChainedConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"ChainedConfigurationProvider\"/></returns>\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n            => new ChainedConfigurationProvider(this);\n    }\n}\n"
  },
  {
    "path": "src/Config/Config.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration</RootNamespace>\n    <Description>Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config.Abstractions\\Config.Abstractions.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config/ConfigurationBuilder.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Used to build key/value based configuration settings for use in an application.\n    /// </summary>\n    public class ConfigurationBuilder : IConfigurationBuilder\n    {\n        /// <summary>\n        /// Returns the sources used to obtain configuration values.\n        /// </summary>\n        public IList<IConfigurationSource> Sources { get; } = new List<IConfigurationSource>();\n\n        /// <summary>\n        /// Gets a key/value collection that can be used to share data between the <see cref=\"IConfigurationBuilder\"/>\n        /// and the registered <see cref=\"IConfigurationProvider\"/>s.\n        /// </summary>\n        public IDictionary<string, object> Properties { get; } = new Dictionary<string, object>();\n\n        /// <summary>\n        /// Adds a new configuration source.\n        /// </summary>\n        /// <param name=\"source\">The configuration source to add.</param>\n        /// <returns>The same <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public IConfigurationBuilder Add(IConfigurationSource source)\n        {\n            if (source == null)\n            {\n                throw new ArgumentNullException(nameof(source));\n            }\n\n            Sources.Add(source);\n            return this;\n        }\n\n        /// <summary>\n        /// Builds an <see cref=\"IConfiguration\"/> with keys and values from the set of providers registered in\n        /// <see cref=\"Sources\"/>.\n        /// </summary>\n        /// <returns>An <see cref=\"IConfigurationRoot\"/> with keys and values from the registered providers.</returns>\n        public IConfigurationRoot Build()\n        {\n            var providers = new List<IConfigurationProvider>();\n            foreach (var source in Sources)\n            {\n                var provider = source.Build(this);\n                providers.Add(provider);\n            }\n            return new ConfigurationRoot(providers);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ConfigurationKeyComparer.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// IComparer implementation used to order configuration keys.\n    /// </summary>\n    public class ConfigurationKeyComparer : IComparer<string>\n    {\n        private static readonly string[] _keyDelimiterArray = new[] { ConfigurationPath.KeyDelimiter };\n        \n        /// <summary>\n        /// The default instance.\n        /// </summary>\n        public static ConfigurationKeyComparer Instance { get; } = new ConfigurationKeyComparer();\n\n        /// <summary>\n        /// Compares two strings.\n        /// </summary>\n        /// <param name=\"x\">First string.</param>\n        /// <param name=\"y\">Second string.</param>\n        /// <returns></returns>\n        public int Compare(string x, string y)\n        {\n            var xParts = x?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? new string[0];\n            var yParts = y?.Split(_keyDelimiterArray, StringSplitOptions.RemoveEmptyEntries) ?? new string[0];\n\n            // Compare each part until we get two parts that are not equal\n            for (int i = 0; i < Math.Min(xParts.Length, yParts.Length); i++)\n            {\n                x = xParts[i];\n                y = yParts[i];\n\n                var value1 = 0;\n                var value2 = 0;\n\n                var xIsInt = x != null && int.TryParse(x, out value1);\n                var yIsInt = y != null && int.TryParse(y, out value2);\n\n                int result = 0;\n\n                if (!xIsInt && !yIsInt)\n                {\n                    // Both are strings\n                    result = string.Compare(x, y, StringComparison.OrdinalIgnoreCase);\n                }\n                else if (xIsInt && yIsInt)\n                {\n                    // Both are int \n                    result = value1 - value2;\n                }\n                else\n                {\n                    // Only one of them is int\n                    result = xIsInt ? -1 : 1;\n                }\n\n                if (result != 0)\n                {\n                    // One of them is different\n                    return result;\n                }\n            }\n\n            // If we get here, the common parts are equal.\n            // If they are of the same length, then they are totally identical\n            return xParts.Length - yParts.Length;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Base helper class for implementing an <see cref=\"IConfigurationProvider\"/>\n    /// </summary>\n    public abstract class ConfigurationProvider : IConfigurationProvider\n    {\n        private ConfigurationReloadToken _reloadToken = new ConfigurationReloadToken();\n\n        /// <summary>\n        /// Initializes a new <see cref=\"IConfigurationProvider\"/>\n        /// </summary>\n        protected ConfigurationProvider()\n        {\n            Data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n        }\n\n        /// <summary>\n        /// The configuration key value pairs for this provider.\n        /// </summary>\n        protected IDictionary<string, string> Data { get; set; }\n\n        /// <summary>\n        /// Attempts to find a value with the given key, returns true if one is found, false otherwise.\n        /// </summary>\n        /// <param name=\"key\">The key to lookup.</param>\n        /// <param name=\"value\">The value found at key if one is found.</param>\n        /// <returns>True if key has a value, false otherwise.</returns>\n        public virtual bool TryGet(string key, out string value)\n            => Data.TryGetValue(key, out value);\n\n        /// <summary>\n        /// Sets a value for a given key.\n        /// </summary>\n        /// <param name=\"key\">The configuration key to set.</param>\n        /// <param name=\"value\">The value to set.</param>\n        public virtual void Set(string key, string value)\n            => Data[key] = value;\n\n        /// <summary>\n        /// Loads (or reloads) the data for this provider.\n        /// </summary>\n        public virtual void Load()\n        { }\n       \n        /// <summary>\n        /// Returns the list of keys that this provider has.\n        /// </summary>\n        /// <param name=\"earlierKeys\">The earlier keys that other providers contain.</param>\n        /// <param name=\"parentPath\">The path for the parent IConfiguration.</param>\n        /// <returns>The list of keys for this provider.</returns>\n        public virtual IEnumerable<string> GetChildKeys(\n            IEnumerable<string> earlierKeys,\n            string parentPath)\n        {\n            var prefix = parentPath == null ? string.Empty : parentPath + ConfigurationPath.KeyDelimiter;\n\n            return Data\n                .Where(kv => kv.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))\n                .Select(kv => Segment(kv.Key, prefix.Length))\n                .Concat(earlierKeys)\n                .OrderBy(k => k, ConfigurationKeyComparer.Instance);\n        }\n\n        private static string Segment(string key, int prefixLength)\n        {\n            var indexOf = key.IndexOf(ConfigurationPath.KeyDelimiter, prefixLength, StringComparison.OrdinalIgnoreCase);\n            return indexOf < 0 ? key.Substring(prefixLength) : key.Substring(prefixLength, indexOf - prefixLength);\n        }\n\n        /// <summary>\n        /// Returns a <see cref=\"IChangeToken\"/> that can be used to listen when this provider is reloaded.\n        /// </summary>\n        /// <returns></returns>\n        public IChangeToken GetReloadToken()\n        {\n            return _reloadToken;\n        }\n\n        /// <summary>\n        /// Triggers the reload change token and creates a new one.\n        /// </summary>\n        protected void OnReload()\n        {\n            var previousToken = Interlocked.Exchange(ref _reloadToken, new ConfigurationReloadToken());\n            previousToken.OnReload();\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ConfigurationReloadToken.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Implements <see cref=\"IChangeToken\"/>\n    /// </summary>\n    public class ConfigurationReloadToken : IChangeToken\n    {\n        private CancellationTokenSource _cts = new CancellationTokenSource();\n\n        /// <summary>\n        /// Indicates if this token will proactively raise callbacks. Callbacks are still guaranteed to be invoked, eventually.\n        /// </summary>\n        public bool ActiveChangeCallbacks => true;\n\n        /// <summary>\n        /// Gets a value that indicates if a change has occurred.\n        /// </summary>\n        public bool HasChanged => _cts.IsCancellationRequested;\n\n        /// <summary>\n        /// Registers for a callback that will be invoked when the entry has changed. <see cref=\"Microsoft.Extensions.Primitives.IChangeToken.HasChanged\"/>\n        /// MUST be set before the callback is invoked.\n        /// </summary>\n        /// <param name=\"callback\">The callback to invoke.</param>\n        /// <param name=\"state\">State to be passed into the callback.</param>\n        /// <returns></returns>\n        public IDisposable RegisterChangeCallback(Action<object> callback, object state) => _cts.Token.Register(callback, state);\n\n        /// <summary>\n        /// Used to trigger the change token when a reload occurs.\n        /// </summary>\n        public void OnReload() => _cts.Cancel();\n    }\n}\n"
  },
  {
    "path": "src/Config/ConfigurationRoot.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// The root node for a configuration.\n    /// </summary>\n    public class ConfigurationRoot : IConfigurationRoot\n    {\n        private IList<IConfigurationProvider> _providers;\n        private ConfigurationReloadToken _changeToken = new ConfigurationReloadToken();\n\n        /// <summary>\n        /// Initializes a Configuration root with a list of providers.\n        /// </summary>\n        /// <param name=\"providers\">The <see cref=\"IConfigurationProvider\"/>s for this configuration.</param>\n        public ConfigurationRoot(IList<IConfigurationProvider> providers)\n        {\n            if (providers == null)\n            {\n                throw new ArgumentNullException(nameof(providers));\n            }\n\n            _providers = providers;\n            foreach (var p in providers)\n            {\n                p.Load();\n                ChangeToken.OnChange(() => p.GetReloadToken(), () => RaiseChanged());\n            }\n        }\n\n        /// <summary>\n        /// The <see cref=\"IConfigurationProvider\"/>s for this configuration.\n        /// </summary>\n        public IEnumerable<IConfigurationProvider> Providers => _providers;\n\n        /// <summary>\n        /// Gets or sets the value corresponding to a configuration key.\n        /// </summary>\n        /// <param name=\"key\">The configuration key.</param>\n        /// <returns>The configuration value.</returns>\n        public string this[string key]\n        {\n            get\n            {\n                foreach (var provider in _providers.Reverse())\n                {\n                    string value;\n\n                    if (provider.TryGet(key, out value))\n                    {\n                        return value;\n                    }\n                }\n\n                return null;\n            }\n\n            set\n            {\n                if (!_providers.Any())\n                {\n                    throw new InvalidOperationException(Resources.Error_NoSources);\n                }\n\n                foreach (var provider in _providers)\n                {\n                    provider.Set(key, value);\n                }\n            }\n        }\n\n        /// <summary>\n        /// Gets the immediate children sub-sections.\n        /// </summary>\n        /// <returns></returns>\n        public IEnumerable<IConfigurationSection> GetChildren() => GetChildrenImplementation(null);\n\n        internal IEnumerable<IConfigurationSection> GetChildrenImplementation(string path)\n        {\n            return _providers\n                .Aggregate(Enumerable.Empty<string>(),\n                    (seed, source) => source.GetChildKeys(seed, path))\n                .Distinct()\n                .Select(key => GetSection(path == null ? key : ConfigurationPath.Combine(path, key)));\n        }\n\n        /// <summary>\n        /// Returns a <see cref=\"IChangeToken\"/> that can be used to observe when this configuration is reloaded.\n        /// </summary>\n        /// <returns></returns>\n        public IChangeToken GetReloadToken() => _changeToken;\n\n        /// <summary>\n        /// Gets a configuration sub-section with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key of the configuration section.</param>\n        /// <returns>The <see cref=\"IConfigurationSection\"/>.</returns>\n        /// <remarks>\n        ///     This method will never return <c>null</c>. If no matching sub-section is found with the specified key,\n        ///     an empty <see cref=\"IConfigurationSection\"/> will be returned.\n        /// </remarks>\n        public IConfigurationSection GetSection(string key) \n            => new ConfigurationSection(this, key);\n\n        /// <summary>\n        /// Force the configuration values to be reloaded from the underlying sources.\n        /// </summary>\n        public void Reload()\n        {\n            foreach (var provider in _providers)\n            {\n                provider.Load();\n            }\n            RaiseChanged();\n        }\n\n        private void RaiseChanged()\n        {\n            var previousToken = Interlocked.Exchange(ref _changeToken, new ConfigurationReloadToken());\n            previousToken.OnReload();\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/ConfigurationSection.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a section of application configuration values.\n    /// </summary>\n    public class ConfigurationSection : IConfigurationSection\n    {\n        private readonly ConfigurationRoot _root;\n        private readonly string _path;\n        private string _key;\n\n        /// <summary>\n        /// Initializes a new instance.\n        /// </summary>\n        /// <param name=\"root\">The configuration root.</param>\n        /// <param name=\"path\">The path to this section.</param>\n        public ConfigurationSection(ConfigurationRoot root, string path)\n        {\n            if (root == null)\n            {\n                throw new ArgumentNullException(nameof(root));\n            }\n\n            if (path == null)\n            {\n                throw new ArgumentNullException(nameof(path));\n            }\n\n            _root = root;\n            _path = path;\n        }\n\n        /// <summary>\n        /// Gets the full path to this section from the <see cref=\"IConfigurationRoot\"/>.\n        /// </summary>\n        public string Path => _path;\n\n        /// <summary>\n        /// Gets the key this section occupies in its parent.\n        /// </summary>\n        public string Key\n        {\n            get\n            {\n                if (_key == null)\n                {\n                    // Key is calculated lazily as last portion of Path\n                    _key = ConfigurationPath.GetSectionKey(_path);\n                }\n                return _key;\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the section value.\n        /// </summary>\n        public string Value\n        {\n            get\n            {\n                return _root[Path];\n            }\n            set\n            {\n                _root[Path] = value;\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the value corresponding to a configuration key.\n        /// </summary>\n        /// <param name=\"key\">The configuration key.</param>\n        /// <returns>The configuration value.</returns>\n        public string this[string key]\n        {\n            get\n            {\n                return _root[ConfigurationPath.Combine(Path, key)];\n            }\n\n            set\n            {\n                _root[ConfigurationPath.Combine(Path, key)] = value;\n            }\n        }\n\n        /// <summary>\n        /// Gets a configuration sub-section with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key of the configuration section.</param>\n        /// <returns>The <see cref=\"IConfigurationSection\"/>.</returns>\n        /// <remarks>\n        ///     This method will never return <c>null</c>. If no matching sub-section is found with the specified key,\n        ///     an empty <see cref=\"IConfigurationSection\"/> will be returned.\n        /// </remarks>\n        public IConfigurationSection GetSection(string key) => _root.GetSection(ConfigurationPath.Combine(Path, key));\n\n        /// <summary>\n        /// Gets the immediate descendant configuration sub-sections.\n        /// </summary>\n        /// <returns>The configuration sub-sections.</returns>\n        public IEnumerable<IConfigurationSection> GetChildren() => _root.GetChildrenImplementation(Path);\n\n        /// <summary>\n        /// Returns a <see cref=\"IChangeToken\"/> that can be used to observe when this configuration is reloaded.\n        /// </summary>\n        /// <returns></returns>\n        public IChangeToken GetReloadToken() => _root.GetReloadToken();\n    }\n}\n"
  },
  {
    "path": "src/Config/MemoryConfigurationBuilderExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing Microsoft.Extensions.Configuration.Memory;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// IConfigurationBuilder extension methods for the MemoryConfigurationProvider.\n    /// </summary>\n    public static class MemoryConfigurationBuilderExtensions\n    {\n        /// <summary>\n        /// Adds the memory configuration provider to <paramref name=\"configurationBuilder\"/>.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddInMemoryCollection(this IConfigurationBuilder configurationBuilder)\n        {\n            if (configurationBuilder == null)\n            {\n                throw new ArgumentNullException(nameof(configurationBuilder));\n            }\n\n            configurationBuilder.Add(new MemoryConfigurationSource());\n            return configurationBuilder;\n        }\n\n        /// <summary>\n        /// Adds the memory configuration provider to <paramref name=\"configurationBuilder\"/>.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"initialData\">The data to add to memory configuration provider.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddInMemoryCollection(\n            this IConfigurationBuilder configurationBuilder,\n            IEnumerable<KeyValuePair<string, string>> initialData)\n        {\n            if (configurationBuilder == null)\n            {\n                throw new ArgumentNullException(nameof(configurationBuilder));\n            }\n\n            configurationBuilder.Add(new MemoryConfigurationSource { InitialData = initialData });\n            return configurationBuilder;\n        }\n    }\n}"
  },
  {
    "path": "src/Config/MemoryConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration.Memory\n{\n    /// <summary>\n    /// In-memory implementation of <see cref=\"IConfigurationProvider\"/>\n    /// </summary>\n    public class MemoryConfigurationProvider : ConfigurationProvider, IEnumerable<KeyValuePair<string, string>>\n    {\n        private readonly MemoryConfigurationSource _source;\n\n        /// <summary>\n        /// Initialize a new instance from the source.\n        /// </summary>\n        /// <param name=\"source\">The source settings.</param>\n        public MemoryConfigurationProvider(MemoryConfigurationSource source)\n        {\n            if (source == null)\n            {\n                throw new ArgumentNullException(nameof(source));\n            }\n\n            _source = source;\n\n            if (_source.InitialData != null)\n            {\n                foreach (var pair in _source.InitialData)\n                {\n                    Data.Add(pair.Key, pair.Value);\n                }\n            }\n        }\n\n        /// <summary>\n        /// Add a new key and value pair.\n        /// </summary>\n        /// <param name=\"key\">The configuration key.</param>\n        /// <param name=\"value\">The configuration value.</param>\n        public void Add(string key, string value)\n        {\n            Data.Add(key, value);\n        }\n\n        /// <summary>\n        /// Returns an enumerator that iterates through the collection.\n        /// </summary>\n        /// <returns>An enumerator that can be used to iterate through the collection.</returns>\n        public IEnumerator<KeyValuePair<string, string>> GetEnumerator()\n        {\n            return Data.GetEnumerator();\n        }\n\n        /// <summary>\n        /// Returns an enumerator that iterates through the collection.\n        /// </summary>\n        /// <returns>An enumerator that can be used to iterate through the collection.</returns>\n        IEnumerator IEnumerable.GetEnumerator()\n        {\n            return GetEnumerator();\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/MemoryConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration.Memory\n{\n    /// <summary>\n    /// Represents in-memory data as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class MemoryConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// The initial key value configuration pairs.\n        /// </summary>\n        public IEnumerable<KeyValuePair<string, string>> InitialData { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"MemoryConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"MemoryConfigurationProvider\"/></returns>\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            return new MemoryConfigurationProvider(this);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// A configuration source is not registered. Please register one before setting a value.\n        /// </summary>\n        internal static string Error_NoSources\n        {\n            get => GetString(\"Error_NoSources\");\n        }\n\n        /// <summary>\n        /// A configuration source is not registered. Please register one before setting a value.\n        /// </summary>\n        internal static string FormatError_NoSources()\n            => GetString(\"Error_NoSources\");\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_NoSources\" xml:space=\"preserve\">\n    <value>A configuration source is not registered. Please register one before setting a value.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ChainedBuilderExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddConfiguration\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"config\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ChainedConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationProvider\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"TryGet\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\",\n              \"Direction\": \"Out\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Set\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildKeys\",\n          \"Parameters\": [\n            {\n              \"Name\": \"earlierKeys\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            },\n            {\n              \"Name\": \"parentPath\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.String>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.ChainedConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ChainedConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Configuration\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Configuration\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationBuilder\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Sources\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationSource>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Properties\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IDictionary<System.String, System.Object>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Add\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationRoot\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationKeyComparer\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"System.Collections.Generic.IComparer<System.String>\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Instance\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.ConfigurationKeyComparer\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Compare\",\n          \"Parameters\": [\n            {\n              \"Name\": \"x\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"y\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Int32\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"System.Collections.Generic.IComparer<System.String>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationProvider\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Data\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IDictionary<System.String, System.String>\",\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Data\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Collections.Generic.IDictionary<System.String, System.String>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"TryGet\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\",\n              \"Direction\": \"Out\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Set\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildKeys\",\n          \"Parameters\": [\n            {\n              \"Name\": \"earlierKeys\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            },\n            {\n              \"Name\": \"parentPath\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.String>\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"OnReload\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationReloadToken\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Primitives.IChangeToken\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_ActiveChangeCallbacks\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_HasChanged\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"RegisterChangeCallback\",\n          \"Parameters\": [\n            {\n              \"Name\": \"callback\",\n              \"Type\": \"System.Action<System.Object>\"\n            },\n            {\n              \"Name\": \"state\",\n              \"Type\": \"System.Object\"\n            }\n          ],\n          \"ReturnType\": \"System.IDisposable\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"OnReload\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationRoot\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationRoot\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetSection\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildren\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Providers\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationProvider>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationRoot\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Reload\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationRoot\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"providers\",\n              \"Type\": \"System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationProvider>\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationSection\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSection\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetSection\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildren\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Path\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Key\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Value\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Value\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"root\",\n              \"Type\": \"Microsoft.Extensions.Configuration.ConfigurationRoot\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.MemoryConfigurationBuilderExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddInMemoryCollection\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddInMemoryCollection\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"initialData\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Memory.MemoryConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.ConfigurationProvider\",\n      \"ImplementedInterfaces\": [\n        \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Add\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetEnumerator\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.String>>\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_InitialData\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_InitialData\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.Abstractions/Config.Abstractions.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Abstractions</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Abstractions</RootNamespace>\n    <Description>Abstractions of key-value pair based configuration.\nCommonly used types:\nMicrosoft.Extensions.Configuration.IConfiguration\nMicrosoft.Extensions.Configuration.IConfigurationBuilder\nMicrosoft.Extensions.Configuration.IConfigurationProvider\nMicrosoft.Extensions.Configuration.IConfigurationRoot\nMicrosoft.Extensions.Configuration.IConfigurationSection</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Extensions.Primitives\" Version=\"$(MicrosoftExtensionsPrimitivesPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.Abstractions/ConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for configuration classes./>.\n    /// </summary>\n    public static class ConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds a new configuration source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source secrets.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder Add<TSource>(this IConfigurationBuilder builder, Action<TSource> configureSource) where TSource : IConfigurationSource, new()\n        {\n            var source = new TSource();\n            configureSource?.Invoke(source);\n            return builder.Add(source);\n        }\n\n        /// <summary>\n        /// Shorthand for GetSection(\"ConnectionStrings\")[name].\n        /// </summary>\n        /// <param name=\"configuration\">The configuration.</param>\n        /// <param name=\"name\">The connection string key.</param>\n        /// <returns></returns>\n        public static string GetConnectionString(this IConfiguration configuration, string name)\n        {\n            return configuration?.GetSection(\"ConnectionStrings\")?[name];\n        }\n\n        /// <summary>\n        /// Get the enumeration of key value pairs within the <see cref=\"IConfiguration\" />\n        /// </summary>\n        /// <param name=\"configuration\">The <see cref=\"IConfiguration\"/> to enumerate.</param>\n        /// <returns>An enumeration of key value pairs.</returns>\n        public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this IConfiguration configuration) => configuration.AsEnumerable(makePathsRelative: false);\n\n        /// <summary>\n        /// Get the enumeration of key value pairs within the <see cref=\"IConfiguration\" />\n        /// </summary>\n        /// <param name=\"configuration\">The <see cref=\"IConfiguration\"/> to enumerate.</param>\n        /// <param name=\"makePathsRelative\">If true, the child keys returned will have the current configuration's Path trimmed from the front.</param>\n        /// <returns>An enumeration of key value pairs.</returns>\n        public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this IConfiguration configuration, bool makePathsRelative)\n        {\n            var stack = new Stack<IConfiguration>();\n            stack.Push(configuration);\n            var rootSection = configuration as IConfigurationSection;\n            var prefixLength = (makePathsRelative && rootSection != null) ? rootSection.Path.Length + 1 : 0;\n            while (stack.Count > 0)\n            {\n                var config = stack.Pop();\n                // Don't include the sections value if we are removing paths, since it will be an empty key\n                if (config is IConfigurationSection section && (!makePathsRelative || config != configuration))\n                {\n                    yield return new KeyValuePair<string, string>(section.Path.Substring(prefixLength), section.Value);\n                }\n                foreach (var child in config.GetChildren())\n                {\n                    stack.Push(child);\n                }\n            }\n        }\n\n        /// <summary>\n        /// Determines whether the section has a <see cref=\"IConfigurationSection.Value\"/> or has children \n        /// </summary>\n        public static bool Exists(this IConfigurationSection section)\n        {\n            if (section == null)\n            {\n                return false;\n            }\n            return section.Value != null || section.GetChildren().Any();\n        }\n    }\n}"
  },
  {
    "path": "src/Config.Abstractions/ConfigurationPath.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Utility methods and constants for manipulating Configuration paths\n    /// </summary>\n    public static class ConfigurationPath\n    {\n        /// <summary>\n        /// The delimiter \":\" used to separate individual keys in a path.\n        /// </summary>\n        public static readonly string KeyDelimiter = \":\";\n\n        /// <summary>\n        /// Combines path segments into one path.\n        /// </summary>\n        /// <param name=\"pathSegments\">The path segments to combine.</param>\n        /// <returns>The combined path.</returns>\n        public static string Combine(params string[] pathSegments)\n        {\n            if (pathSegments == null)\n            {\n                throw new ArgumentNullException(nameof(pathSegments));\n            }\n            return string.Join(KeyDelimiter, pathSegments);\n        }\n\n        /// <summary>\n        /// Combines path segments into one path.\n        /// </summary>\n        /// <param name=\"pathSegments\">The path segments to combine.</param>\n        /// <returns>The combined path.</returns>\n        public static string Combine(IEnumerable<string> pathSegments)\n        {\n            if (pathSegments == null)\n            {\n                throw new ArgumentNullException(nameof(pathSegments));\n            }\n            return string.Join(KeyDelimiter, pathSegments);\n        }\n\n        /// <summary>\n        /// Extracts the last path segment from the path.\n        /// </summary>\n        /// <param name=\"path\">The path.</param>\n        /// <returns>The last path segment of the path.</returns>\n        public static string GetSectionKey(string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                return path;\n            }\n\n            var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase);\n            return lastDelimiterIndex == -1 ? path : path.Substring(lastDelimiterIndex + 1);\n        }\n\n        /// <summary>\n        /// Extracts the path corresponding to the parent node for a given path.\n        /// </summary>\n        /// <param name=\"path\">The path.</param>\n        /// <returns>The original path minus the last individual segment found in it. Null if the original path corresponds to a top level node.</returns>\n        public static string GetParentPath(string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                return null;\n            }\n\n            var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase);\n            return lastDelimiterIndex == -1 ? null : path.Substring(0, lastDelimiterIndex);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Abstractions/IConfiguration.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a set of key/value application configuration properties.\n    /// </summary>\n    public interface IConfiguration\n    {\n        /// <summary>\n        /// Gets or sets a configuration value.\n        /// </summary>\n        /// <param name=\"key\">The configuration key.</param>\n        /// <returns>The configuration value.</returns>\n        string this[string key] { get; set; }\n\n        /// <summary>\n        /// Gets a configuration sub-section with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key of the configuration section.</param>\n        /// <returns>The <see cref=\"IConfigurationSection\"/>.</returns>\n        /// <remarks>\n        ///     This method will never return <c>null</c>. If no matching sub-section is found with the specified key,\n        ///     an empty <see cref=\"IConfigurationSection\"/> will be returned.\n        /// </remarks>\n        IConfigurationSection GetSection(string key);\n\n        /// <summary>\n        /// Gets the immediate descendant configuration sub-sections.\n        /// </summary>\n        /// <returns>The configuration sub-sections.</returns>\n        IEnumerable<IConfigurationSection> GetChildren();\n\n        /// <summary>\n        /// Returns a <see cref=\"IChangeToken\"/> that can be used to observe when this configuration is reloaded.\n        /// </summary>\n        /// <returns>A <see cref=\"IChangeToken\"/>.</returns>\n        IChangeToken GetReloadToken();\n    }\n}\n"
  },
  {
    "path": "src/Config.Abstractions/IConfigurationBuilder.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a type used to build application configuration.\n    /// </summary>\n    public interface IConfigurationBuilder\n    {\n        /// <summary>\n        /// Gets a key/value collection that can be used to share data between the <see cref=\"IConfigurationBuilder\"/>\n        /// and the registered <see cref=\"IConfigurationSource\"/>s.\n        /// </summary>\n        IDictionary<string, object> Properties { get; }\n\n        /// <summary>\n        /// Gets the sources used to obtain configuration values\n        /// </summary>\n        IList<IConfigurationSource> Sources { get; }\n\n        /// <summary>\n        /// Adds a new configuration source.\n        /// </summary>\n        /// <param name=\"source\">The configuration source to add.</param>\n        /// <returns>The same <see cref=\"IConfigurationBuilder\"/>.</returns>\n        IConfigurationBuilder Add(IConfigurationSource source);\n\n        /// <summary>\n        /// Builds an <see cref=\"IConfiguration\"/> with keys and values from the set of sources registered in\n        /// <see cref=\"Sources\"/>.\n        /// </summary>\n        /// <returns>An <see cref=\"IConfigurationRoot\"/> with keys and values from the registered sources.</returns>\n        IConfigurationRoot Build();\n    }\n}\n"
  },
  {
    "path": "src/Config.Abstractions/IConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Provides configuration key/values for an application.\n    /// </summary>\n    public interface IConfigurationProvider\n    {\n        /// <summary>\n        /// Tries to get a configuration value for the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key.</param>\n        /// <param name=\"value\">The value.</param>\n        /// <returns><c>True</c> if a value for the specified key was found, otherwise <c>false</c>.</returns>\n        bool TryGet(string key, out string value);\n\n        /// <summary>\n        /// Sets a configuration value for the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key.</param>\n        /// <param name=\"value\">The value.</param>\n        void Set(string key, string value);\n\n        /// <summary>\n        /// Returns a change token if this provider supports change tracking, null otherwise.\n        /// </summary>\n        /// <returns></returns>\n        IChangeToken GetReloadToken();\n\n        /// <summary>\n        /// Loads configuration values from the source represented by this <see cref=\"IConfigurationProvider\"/>.\n        /// </summary>\n        void Load();\n\n        /// <summary>\n        /// Returns the immediate descendant configuration keys for a given parent path based on this\n        /// <see cref=\"IConfigurationProvider\"/>'s data and the set of keys returned by all the preceding\n        /// <see cref=\"IConfigurationProvider\"/>s.\n        /// </summary>\n        /// <param name=\"earlierKeys\">The child keys returned by the preceding providers for the same parent path.</param>\n        /// <param name=\"parentPath\">The parent path.</param>\n        /// <returns>The child keys.</returns>\n        IEnumerable<string> GetChildKeys(IEnumerable<string> earlierKeys, string parentPath);\n    }\n}"
  },
  {
    "path": "src/Config.Abstractions/IConfigurationRoot.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents the root of an <see cref=\"IConfiguration\"/> hierarchy.\n    /// </summary>\n    public interface IConfigurationRoot : IConfiguration\n    {\n        /// <summary>\n        /// Force the configuration values to be reloaded from the underlying <see cref=\"IConfigurationProvider\"/>s.\n        /// </summary>\n        void Reload();\n\n        /// <summary>\n        /// The <see cref=\"IConfigurationProvider\"/>s for this configuration.\n        /// </summary>\n        IEnumerable<IConfigurationProvider> Providers { get; }\n    }\n}\n"
  },
  {
    "path": "src/Config.Abstractions/IConfigurationSection.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a section of application configuration values.\n    /// </summary>\n    public interface IConfigurationSection : IConfiguration\n    {\n        /// <summary>\n        /// Gets the key this section occupies in its parent.\n        /// </summary>\n        string Key { get; }\n\n        /// <summary>\n        /// Gets the full path to this section within the <see cref=\"IConfiguration\"/>.\n        /// </summary>\n        string Path { get; }\n\n        /// <summary>\n        /// Gets or sets the section value.\n        /// </summary>\n        string Value { get; set; }\n    }\n}\n"
  },
  {
    "path": "src/Config.Abstractions/IConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a source of configuration key/values for an application.\n    /// </summary>\n    public interface IConfigurationSource\n    {\n        /// <summary>\n        /// Builds the <see cref=\"IConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>An <see cref=\"IConfigurationProvider\"/></returns>\n        IConfigurationProvider Build(IConfigurationBuilder builder);\n    }\n}"
  },
  {
    "path": "src/Config.Abstractions/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Add<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<T0>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"TSource\",\n              \"ParameterPosition\": 0,\n              \"New\": true,\n              \"BaseTypeOrInterfaces\": [\n                \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n              ]\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetConnectionString\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"name\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AsEnumerable\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            }\n          ],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AsEnumerable\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"makePathsRelative\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Exists\",\n          \"Parameters\": [\n            {\n              \"Name\": \"section\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationSection\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationPath\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Combine\",\n          \"Parameters\": [\n            {\n              \"Name\": \"pathSegments\",\n              \"Type\": \"System.String[]\",\n              \"IsParams\": true\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Combine\",\n          \"Parameters\": [\n            {\n              \"Name\": \"pathSegments\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetSectionKey\",\n          \"Parameters\": [\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetParentPath\",\n          \"Parameters\": [\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Field\",\n          \"Name\": \"KeyDelimiter\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"ReadOnly\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfiguration\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Item\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetSection\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildren\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection>\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Properties\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IDictionary<System.String, System.Object>\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Sources\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationSource>\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Add\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationRoot\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"TryGet\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\",\n              \"Direction\": \"Out\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Set\",\n          \"Parameters\": [\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetReloadToken\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Primitives.IChangeToken\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetChildKeys\",\n          \"Parameters\": [\n            {\n              \"Name\": \"earlierKeys\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            },\n            {\n              \"Name\": \"parentPath\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.String>\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfigurationRoot\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfiguration\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Reload\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Providers\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationProvider>\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfigurationSection\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfiguration\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Key\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Path\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Value\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Value\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/AzureKeyVaultConfigurationExtensions.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Security.Cryptography.X509Certificates;\nusing System.Threading.Tasks;\nusing Microsoft.Azure.KeyVault;\nusing Microsoft.Azure.Services.AppAuthentication;\nusing Microsoft.Extensions.Configuration.AzureKeyVault;\nusing Microsoft.IdentityModel.Clients.ActiveDirectory;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for registering <see cref=\"AzureKeyVaultConfigurationProvider\"/> with <see cref=\"IConfigurationBuilder\"/>.\n    /// </summary>\n    public static class AzureKeyVaultConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">The Azure KeyVault uri.</param>\n        /// <param name=\"clientId\">The application client id.</param>\n        /// <param name=\"clientSecret\">The client secret to use for authentication.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            string clientId,\n            string clientSecret)\n        {\n            return AddAzureKeyVault(configurationBuilder, vault, clientId, clientSecret, new DefaultKeyVaultSecretManager());\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">The Azure KeyVault uri.</param>\n        /// <param name=\"clientId\">The application client id.</param>\n        /// <param name=\"clientSecret\">The client secret to use for authentication.</param>\n        /// <param name=\"manager\">The <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            string clientId,\n            string clientSecret,\n            IKeyVaultSecretManager manager)\n        {\n            if (clientId == null)\n            {\n                throw new ArgumentNullException(nameof(clientId));\n            }\n            if (clientSecret == null)\n            {\n                throw new ArgumentNullException(nameof(clientSecret));\n            }\n            KeyVaultClient.AuthenticationCallback callback =\n                (authority, resource, scope) => GetTokenFromClientSecret(authority, resource, clientId, clientSecret);\n\n            return configurationBuilder.AddAzureKeyVault(vault, new KeyVaultClient(callback), manager);\n        }\n\n        private static async Task<string> GetTokenFromClientSecret(string authority, string resource, string clientId, string clientSecret)\n        {\n            var authContext = new AuthenticationContext(authority);\n            var clientCred = new ClientCredential(clientId, clientSecret);\n            var result = await authContext.AcquireTokenAsync(resource, clientCred);\n            return result.AccessToken;\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <param name=\"clientId\">The application client id.</param>\n        /// <param name=\"certificate\">The <see cref=\"X509Certificate2\"/> to use for authentication.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            string clientId,\n            X509Certificate2 certificate)\n        {\n            return AddAzureKeyVault(configurationBuilder, vault, clientId, certificate, new DefaultKeyVaultSecretManager());\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <param name=\"clientId\">The application client id.</param>\n        /// <param name=\"certificate\">The <see cref=\"X509Certificate2\"/> to use for authentication.</param>\n        /// <param name=\"manager\">The <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            string clientId,\n            X509Certificate2 certificate,\n            IKeyVaultSecretManager manager)\n        {\n            if (clientId == null)\n            {\n                throw new ArgumentNullException(nameof(clientId));\n            }\n            if (certificate == null)\n            {\n                throw new ArgumentNullException(nameof(certificate));\n            }\n            KeyVaultClient.AuthenticationCallback callback =\n                (authority, resource, scope) => GetTokenFromClientCertificate(authority, resource, clientId, certificate);\n\n            return configurationBuilder.AddAzureKeyVault(vault, new KeyVaultClient(callback), manager);\n        }\n\n        private static async Task<string> GetTokenFromClientCertificate(string authority, string resource, string clientId, X509Certificate2 certificate)\n        {\n            var authContext = new AuthenticationContext(authority);\n            var result = await authContext.AcquireTokenAsync(resource, new ClientAssertionCertificate(clientId, certificate));\n            return result.AccessToken;\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault)\n        {\n            return AddAzureKeyVault(configurationBuilder, vault, new DefaultKeyVaultSecretManager());\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <param name=\"manager\">The <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            IKeyVaultSecretManager manager)\n        {\n            var azureServiceTokenProvider = new AzureServiceTokenProvider();\n            var authenticationCallback = new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback);\n            var keyVaultClient = new KeyVaultClient(authenticationCallback);\n            \n            return AddAzureKeyVault(configurationBuilder, vault, keyVaultClient, manager);\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the Azure KeyVault.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <param name=\"client\">The <see cref=\"KeyVaultClient\"/> to use for retrieving values.</param>\n        /// <param name=\"manager\">The <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddAzureKeyVault(\n            this IConfigurationBuilder configurationBuilder,\n            string vault,\n            KeyVaultClient client,\n            IKeyVaultSecretManager manager)\n        {\n            if (configurationBuilder == null)\n            {\n                throw new ArgumentNullException(nameof(configurationBuilder));\n            }\n            if (client == null)\n            {\n                throw new ArgumentNullException(nameof(client));\n            }\n            if (vault == null)\n            {\n                throw new ArgumentNullException(nameof(vault));\n            }\n            if (manager == null)\n            {\n                throw new ArgumentNullException(nameof(manager));\n            }\n\n            configurationBuilder.Add(new AzureKeyVaultConfigurationSource()\n            {\n                Client = client,\n                Vault = vault,\n                Manager = manager\n            });\n\n            return configurationBuilder;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.AzureKeyVault/AzureKeyVaultConfigurationProvider.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\nusing Microsoft.Azure.KeyVault;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <summary>\n    /// An AzureKeyVault based <see cref=\"ConfigurationProvider\"/>.\n    /// </summary>\n    internal class AzureKeyVaultConfigurationProvider : ConfigurationProvider\n    {\n        private readonly IKeyVaultClient _client;\n        private readonly string _vault;\n        private readonly IKeyVaultSecretManager _manager;\n\n        /// <summary>\n        /// Creates a new instance of <see cref=\"AzureKeyVaultConfigurationProvider\"/>.\n        /// </summary>\n        /// <param name=\"client\">The <see cref=\"KeyVaultClient\"/> to use for retrieving values.</param>\n        /// <param name=\"vault\">Azure KeyVault uri.</param>\n        /// <param name=\"manager\"></param>\n        public AzureKeyVaultConfigurationProvider(IKeyVaultClient client, string vault, IKeyVaultSecretManager manager)\n        {\n            if (client == null)\n            {\n                throw new ArgumentNullException(nameof(client));\n            }\n            if (vault == null)\n            {\n                throw new ArgumentNullException(nameof(vault));\n            }\n            if (manager == null)\n            {\n                throw new ArgumentNullException(nameof(manager));\n            }\n\n            _client = client;\n            _vault = vault;\n            _manager = manager;\n        }\n\n        public override void Load() => LoadAsync().ConfigureAwait(false).GetAwaiter().GetResult();\n\n        private async Task LoadAsync()\n        {\n            var data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n\n            var secrets = await _client.GetSecretsAsync(_vault).ConfigureAwait(false);\n            do\n            {\n                foreach (var secretItem in secrets)\n                {\n                    if (!_manager.Load(secretItem) || (secretItem.Attributes?.Enabled != true))\n                    {\n                        continue;\n                    }\n\n                    var value = await _client.GetSecretAsync(secretItem.Id).ConfigureAwait(false);\n                    var key = _manager.GetKey(value);\n                    data.Add(key, value.Value);\n                }\n\n                secrets = secrets.NextPageLink != null ?\n                    await _client.GetSecretsNextAsync(secrets.NextPageLink).ConfigureAwait(false) :\n                    null;\n            } while (secrets != null);\n\n            Data = data;\n        }\n    }\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/AzureKeyVaultConfigurationSource.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing Microsoft.Azure.KeyVault;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <summary>\n    /// Represents Azure KeyVault secrets as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    internal class AzureKeyVaultConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// Gets or sets the <see cref=\"KeyVaultClient\"/> to use for retrieving values.\n        /// </summary>\n        public KeyVaultClient Client { get; set; }\n\n        /// <summary>\n        /// Gets or sets the vault uri.\n        /// </summary>\n        public string Vault { get; set; }\n\n        /// <summary>\n        /// Gets or sets the <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.\n        /// </summary>\n        public IKeyVaultSecretManager Manager { get; set; }\n\n        /// <inheritdoc />\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            return new AzureKeyVaultConfigurationProvider(new KeyVaultClientWrapper(Client), Vault, Manager);\n        }\n    }\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/Config.AzureKeyVault.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.AzureKeyVault</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.AzureKeyVault</RootNamespace>\n    <Description>Azure KeyVault configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);azure;keyvault</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n    <ProjectReference Include=\"..\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Azure.KeyVault\" Version=\"$(MicrosoftAzureKeyVaultPackageVersion)\" />\n    <PackageReference Include=\"Microsoft.Azure.Services.AppAuthentication\" Version=\"$(MicrosoftAzureServicesAppAuthenticationPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.AzureKeyVault/DefaultKeyVaultSecretManager.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing Microsoft.Azure.KeyVault;\nusing Microsoft.Azure.KeyVault.Models;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <summary>\n    /// Default implementation of <see cref=\"IKeyVaultSecretManager\"/> that loads all secrets\n    /// and replaces '--' with ':\" in key names.\n    /// </summary>\n    public class DefaultKeyVaultSecretManager : IKeyVaultSecretManager\n    {\n        /// <inheritdoc />\n        public virtual string GetKey(SecretBundle secret)\n        {\n            return secret.SecretIdentifier.Name.Replace(\"--\", ConfigurationPath.KeyDelimiter);\n        }\n\n        /// <inheritdoc />\n        public virtual bool Load(SecretItem secret)\n        {\n            return true;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.AzureKeyVault/IKeyVaultClient.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Threading.Tasks;\nusing Microsoft.Azure.KeyVault;\nusing Microsoft.Azure.KeyVault.Models;\nusing Microsoft.Rest.Azure;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <summary>\n    /// Client class to perform cryptographic key operations and vault operations\n    /// against the Key Vault service.\n    /// Thread safety: This class is thread-safe.\n    /// </summary>\n    internal interface IKeyVaultClient\n    {\n        /// <summary>List secrets in the specified vault</summary>\n        /// <param name=\"vault\">The URL for the vault containing the secrets.</param>\n        /// <returns>A response message containing a list of secrets in the vault along with a link to the next page of secrets</returns>\n        Task<IPage<SecretItem>> GetSecretsAsync(string vault);\n\n        /// <summary>Gets a secret.</summary>\n        /// <param name=\"secretIdentifier\">The URL for the secret.</param>\n        /// <returns>A response message containing the secret</returns>\n        Task<SecretBundle> GetSecretAsync(string secretIdentifier);\n\n        /// <summary>List the next page of secrets</summary>\n        /// <param name=\"nextLink\">nextLink value from a previous call to GetSecrets or GetSecretsNext</param>\n        /// <returns>A response message containing a list of secrets in the vault along with a link to the next page of secrets</returns>\n        Task<IPage<SecretItem>> GetSecretsNextAsync(string nextLink);\n    }\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/IKeyVaultSecretManager.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing Microsoft.Azure.KeyVault.Models;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <summary>\n    /// The <see cref=\"IKeyVaultSecretManager\"/> instance used to control secret loading.\n    /// </summary>\n    public interface IKeyVaultSecretManager\n    {\n        /// <summary>\n        /// Checks if <see cref=\"SecretItem\"/> value should be retrieved.\n        /// </summary>\n        /// <param name=\"secret\">The <see cref=\"SecretItem\"/> instance.</param>\n        /// <returns><code>true</code> is secrets value should be loaded, otherwise <code>false</code>.</returns>\n        bool Load(SecretItem secret);\n\n        /// <summary>\n        /// Maps secret to a configuration key.\n        /// </summary>\n        /// <param name=\"secret\">The <see cref=\"SecretBundle\"/> instance.</param>\n        /// <returns>Configuration key name to store secret value.</returns>\n        string GetKey(SecretBundle secret);\n    }\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/KeyVaultClientWrapper.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Threading.Tasks;\nusing Microsoft.Azure.KeyVault;\nusing Microsoft.Azure.KeyVault.Models;\nusing Microsoft.Rest.Azure;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault\n{\n    /// <inheritdoc />\n    internal class KeyVaultClientWrapper : IKeyVaultClient\n    {\n        private readonly KeyVaultClient _keyVaultClientImplementation;\n\n        /// <summary>\n        /// Creates a new instance of <see cref=\"KeyVaultClientWrapper\"/>.\n        /// </summary>\n        /// <param name=\"keyVaultClientImplementation\">The <see cref=\"KeyVaultClient\"/> instance to wrap.</param>\n        public KeyVaultClientWrapper(KeyVaultClient keyVaultClientImplementation)\n        {\n            _keyVaultClientImplementation = keyVaultClientImplementation;\n        }\n\n        /// <inheritdoc />\n        public Task<IPage<SecretItem>> GetSecretsAsync(string vault)\n        {\n            return _keyVaultClientImplementation.GetSecretsAsync(vault);\n        }\n\n        /// <inheritdoc />\n        public Task<SecretBundle> GetSecretAsync(string secretIdentifier)\n        {\n            return _keyVaultClientImplementation.GetSecretAsync(secretIdentifier);\n        }\n\n        /// <inheritdoc />\n        public Task<IPage<SecretItem>> GetSecretsNextAsync(string nextLink)\n        {\n            return _keyVaultClientImplementation.GetSecretsNextAsync(nextLink);\n        }\n    }\n}"
  },
  {
    "path": "src/Config.AzureKeyVault/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.AzureKeyVault.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n[assembly: InternalsVisibleTo(\"DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7\")]\n\n"
  },
  {
    "path": "src/Config.AzureKeyVault/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.AzureKeyVault, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.AzureKeyVaultConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientId\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientSecret\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientId\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientSecret\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"manager\",\n              \"Type\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientId\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"certificate\",\n              \"Type\": \"System.Security.Cryptography.X509Certificates.X509Certificate2\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"clientId\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"certificate\",\n              \"Type\": \"System.Security.Cryptography.X509Certificates.X509Certificate2\"\n            },\n            {\n              \"Name\": \"manager\",\n              \"Type\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"manager\",\n              \"Type\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddAzureKeyVault\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"vault\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"client\",\n              \"Type\": \"Microsoft.Azure.KeyVault.KeyVaultClient\"\n            },\n            {\n              \"Name\": \"manager\",\n              \"Type\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.AzureKeyVault.DefaultKeyVaultSecretManager\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetKey\",\n          \"Parameters\": [\n            {\n              \"Name\": \"secret\",\n              \"Type\": \"Microsoft.Azure.KeyVault.Models.SecretBundle\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"secret\",\n              \"Type\": \"Microsoft.Azure.KeyVault.Models.SecretItem\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.AzureKeyVault.IKeyVaultSecretManager\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Interface\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"secret\",\n              \"Type\": \"Microsoft.Azure.KeyVault.Models.SecretItem\"\n            }\n          ],\n          \"ReturnType\": \"System.Boolean\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetKey\",\n          \"Parameters\": [\n            {\n              \"Name\": \"secret\",\n              \"Type\": \"Microsoft.Azure.KeyVault.Models.SecretBundle\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.Binder/BinderOptions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Options class used by the <see cref=\"ConfigurationBinder\"/>.\n    /// </summary>\n    public class BinderOptions\n    {\n        /// <summary>\n        /// When false (the default), the binder will only attempt to set public properties.\n        /// If true, the binder will attempt to set all non read-only properties.\n        /// </summary>\n        public bool BindNonPublicProperties { get; set; }\n    }\n}"
  },
  {
    "path": "src/Config.Binder/Config.Binder.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Binder</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Binder</RootNamespace>\n    <Description>Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.Binder/ConfigurationBinder.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Linq;\nusing System.Reflection;\nusing Microsoft.Extensions.Configuration.Binder;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Static helper class that allows binding strongly typed objects to configuration values.\n    /// </summary>\n    public static class ConfigurationBinder\n    {\n        /// <summary>\n        /// Attempts to bind the configuration instance to a new instance of type T.\n        /// If this configuration section has a value, that will be used.\n        /// Otherwise binding by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <typeparam name=\"T\">The type of the new instance to bind.</typeparam>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <returns>The new instance of T if successful, default(T) otherwise.</returns>\n        public static T Get<T>(this IConfiguration configuration)\n            => configuration.Get<T>(_ => { });\n\n        /// <summary>\n        /// Attempts to bind the configuration instance to a new instance of type T.\n        /// If this configuration section has a value, that will be used.\n        /// Otherwise binding by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <typeparam name=\"T\">The type of the new instance to bind.</typeparam>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"configureOptions\">Configures the binder options.</param>\n        /// <returns>The new instance of T if successful, default(T) otherwise.</returns>\n        public static T Get<T>(this IConfiguration configuration, Action<BinderOptions> configureOptions)\n        {\n            if (configuration == null)\n            {\n                throw new ArgumentNullException(nameof(configuration));\n            }\n\n            var result = configuration.Get(typeof(T), configureOptions);\n            if (result == null)\n            {\n                return default(T);\n            }\n            return (T)result;\n        }\n\n        /// <summary>\n        /// Attempts to bind the configuration instance to a new instance of type T.\n        /// If this configuration section has a value, that will be used.\n        /// Otherwise binding by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"type\">The type of the new instance to bind.</param>\n        /// <returns>The new instance if successful, null otherwise.</returns>\n        public static object Get(this IConfiguration configuration, Type type)\n            => configuration.Get(type, _ => { });\n\n        /// <summary>\n        /// Attempts to bind the configuration instance to a new instance of type T.\n        /// If this configuration section has a value, that will be used.\n        /// Otherwise binding by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"type\">The type of the new instance to bind.</param>\n        /// <param name=\"configureOptions\">Configures the binder options.</param>\n        /// <returns>The new instance if successful, null otherwise.</returns>\n        public static object Get(this IConfiguration configuration, Type type, Action<BinderOptions> configureOptions)\n        {\n            if (configuration == null)\n            {\n                throw new ArgumentNullException(nameof(configuration));\n            }\n\n            var options = new BinderOptions();\n            configureOptions?.Invoke(options);\n            return BindInstance(type, instance: null, config: configuration, options: options);\n        }\n\n        /// <summary>\n        /// Attempts to bind the given object instance to the configuration section specified by the key by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"key\">The key of the configuration section to bind.</param>\n        /// <param name=\"instance\">The object to bind.</param>\n        public static void Bind(this IConfiguration configuration, string key, object instance)\n            => configuration.GetSection(key).Bind(instance);\n\n        /// <summary>\n        /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"instance\">The object to bind.</param>\n        public static void Bind(this IConfiguration configuration, object instance)\n            => configuration.Bind(instance, o => { });\n\n        /// <summary>\n        /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration instance to bind.</param>\n        /// <param name=\"instance\">The object to bind.</param>\n        /// <param name=\"configureOptions\">Configures the binder options.</param>\n        public static void Bind(this IConfiguration configuration, object instance, Action<BinderOptions> configureOptions)\n        {\n            if (configuration == null)\n            {\n                throw new ArgumentNullException(nameof(configuration));\n            }\n\n            if (instance != null)\n            {\n                var options = new BinderOptions();\n                configureOptions?.Invoke(options);\n                BindInstance(instance.GetType(), instance, configuration, options);\n            }\n        }\n\n        /// <summary>\n        /// Extracts the value with the specified key and converts it to type T.\n        /// </summary>\n        /// <typeparam name=\"T\">The type to convert the value to.</typeparam>\n        /// <param name=\"configuration\">The configuration.</param>\n        /// <param name=\"key\">The key of the configuration section's value to convert.</param>\n        /// <returns>The converted value.</returns>\n        public static T GetValue<T>(this IConfiguration configuration, string key)\n        {\n            return GetValue(configuration, key, default(T));\n        }\n\n        /// <summary>\n        /// Extracts the value with the specified key and converts it to type T.\n        /// </summary>\n        /// <typeparam name=\"T\">The type to convert the value to.</typeparam>\n        /// <param name=\"configuration\">The configuration.</param>\n        /// <param name=\"key\">The key of the configuration section's value to convert.</param>\n        /// <param name=\"defaultValue\">The default value to use if no value is found.</param>\n        /// <returns>The converted value.</returns>\n        public static T GetValue<T>(this IConfiguration configuration, string key, T defaultValue)\n        {\n            return (T)GetValue(configuration, typeof(T), key, defaultValue);\n        }\n\n        /// <summary>\n        /// Extracts the value with the specified key and converts it to the specified type.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration.</param>\n        /// <param name=\"type\">The type to convert the value to.</param>\n        /// <param name=\"key\">The key of the configuration section's value to convert.</param>\n        /// <returns>The converted value.</returns>\n        public static object GetValue(this IConfiguration configuration, Type type, string key)\n        {\n            return GetValue(configuration, type, key, defaultValue: null);\n        }\n\n        /// <summary>\n        /// Extracts the value with the specified key and converts it to the specified type.\n        /// </summary>\n        /// <param name=\"configuration\">The configuration.</param>\n        /// <param name=\"type\">The type to convert the value to.</param>\n        /// <param name=\"key\">The key of the configuration section's value to convert.</param>\n        /// <param name=\"defaultValue\">The default value to use if no value is found.</param>\n        /// <returns>The converted value.</returns>\n        public static object GetValue(this IConfiguration configuration, Type type, string key, object defaultValue)\n        {\n            var value = configuration.GetSection(key).Value;\n            if (value != null)\n            {\n                return ConvertValue(type, value);\n            }\n            return defaultValue;\n        }\n\n        private static void BindNonScalar(this IConfiguration configuration, object instance, BinderOptions options)\n        {\n            if (instance != null)\n            {\n                foreach (var property in GetAllProperties(instance.GetType().GetTypeInfo()))\n                {\n                    BindProperty(property, instance, configuration, options);\n                }\n            }\n        }\n\n        private static void BindProperty(PropertyInfo property, object instance, IConfiguration config, BinderOptions options)\n        {\n            // We don't support set only, non public, or indexer properties\n            if (property.GetMethod == null ||\n                (!options.BindNonPublicProperties && !property.GetMethod.IsPublic) ||\n                property.GetMethod.GetParameters().Length > 0)\n            {\n                return;\n            }\n\n            var propertyValue = property.GetValue(instance);\n            var hasSetter = property.SetMethod != null && (property.SetMethod.IsPublic || options.BindNonPublicProperties);\n\n            if (propertyValue == null && !hasSetter)\n            {\n                // Property doesn't have a value and we cannot set it so there is no\n                // point in going further down the graph\n                return;\n            }\n\n            propertyValue = BindInstance(property.PropertyType, propertyValue, config.GetSection(property.Name), options);\n\n            if (propertyValue != null && hasSetter)\n            {\n                property.SetValue(instance, propertyValue);\n            }\n        }\n\n        private static object BindToCollection(TypeInfo typeInfo, IConfiguration config, BinderOptions options)\n        {\n            var type = typeof(List<>).MakeGenericType(typeInfo.GenericTypeArguments[0]);\n            var instance = Activator.CreateInstance(type);\n            BindCollection(instance, type, config, options);\n            return instance;\n        }\n\n        // Try to create an array/dictionary instance to back various collection interfaces\n        private static object AttemptBindToCollectionInterfaces(Type type, IConfiguration config, BinderOptions options)\n        {\n            var typeInfo = type.GetTypeInfo();\n\n            if (!typeInfo.IsInterface)\n            {\n                return null;\n            }\n\n            var collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyList<>), type);\n            if (collectionInterface != null)\n            {\n                // IEnumerable<T> is guaranteed to have exactly one parameter\n                return BindToCollection(typeInfo, config, options);\n            }\n\n            collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyDictionary<,>), type);\n            if (collectionInterface != null)\n            {\n                var dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]);\n                var instance = Activator.CreateInstance(dictionaryType);\n                BindDictionary(instance, dictionaryType, config, options);\n                return instance;\n            }\n\n            collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type);\n            if (collectionInterface != null)\n            {\n                var instance = Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]));\n                BindDictionary(instance, collectionInterface, config, options);\n                return instance;\n            }\n\n            collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyCollection<>), type);\n            if (collectionInterface != null)\n            {\n                // IReadOnlyCollection<T> is guaranteed to have exactly one parameter\n                return BindToCollection(typeInfo, config, options);\n            }\n\n            collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type);\n            if (collectionInterface != null)\n            {\n                // ICollection<T> is guaranteed to have exactly one parameter\n                return BindToCollection(typeInfo, config, options);\n            }\n\n            collectionInterface = FindOpenGenericInterface(typeof(IEnumerable<>), type);\n            if (collectionInterface != null)\n            {\n                // IEnumerable<T> is guaranteed to have exactly one parameter\n                return BindToCollection(typeInfo, config, options);\n            }\n\n            return null;\n        }\n\n        private static object BindInstance(Type type, object instance, IConfiguration config, BinderOptions options)\n        {\n            // if binding IConfigurationSection, break early\n            if (type == typeof(IConfigurationSection))\n            {\n                return config;\n            }\n\n            var section = config as IConfigurationSection;\n            var configValue = section?.Value;\n            object convertedValue;\n            Exception error;\n            if (configValue != null && TryConvertValue(type, configValue, out convertedValue, out error))\n            {\n                if (error != null)\n                {\n                    throw error;\n                }\n\n                // Leaf nodes are always reinitialized\n                return convertedValue;\n            }\n\n            if (config != null && config.GetChildren().Any())\n            {\n                // If we don't have an instance, try to create one\n                if (instance == null)\n                {\n                    // We are alrady done if binding to a new collection instance worked\n                    instance = AttemptBindToCollectionInterfaces(type, config, options);\n                    if (instance != null)\n                    {\n                        return instance;\n                    }\n\n                    instance = CreateInstance(type);\n                }\n\n                // See if its a Dictionary\n                var collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type);\n                if (collectionInterface != null)\n                {\n                    BindDictionary(instance, collectionInterface, config, options);\n                }\n                else if (type.IsArray)\n                {\n                    instance = BindArray((Array)instance, config, options);\n                }\n                else\n                {\n                    // See if its an ICollection\n                    collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type);\n                    if (collectionInterface != null)\n                    {\n                        BindCollection(instance, collectionInterface, config, options);\n                    }\n                    // Something else\n                    else\n                    {\n                        BindNonScalar(config, instance, options);\n                    }\n                }\n            }\n\n            return instance;\n        }\n\n        private static object CreateInstance(Type type)\n        {\n            var typeInfo = type.GetTypeInfo();\n\n            if (typeInfo.IsInterface || typeInfo.IsAbstract)\n            {\n                throw new InvalidOperationException(Resources.FormatError_CannotActivateAbstractOrInterface(type));\n            }\n\n            if (type.IsArray)\n            {\n                if (typeInfo.GetArrayRank() > 1)\n                {\n                    throw new InvalidOperationException(Resources.FormatError_UnsupportedMultidimensionalArray(type));\n                }\n\n                return Array.CreateInstance(typeInfo.GetElementType(), 0);\n            }\n\n            var hasDefaultConstructor = typeInfo.DeclaredConstructors.Any(ctor => ctor.IsPublic && ctor.GetParameters().Length == 0);\n            if (!hasDefaultConstructor)\n            {\n                throw new InvalidOperationException(Resources.FormatError_MissingParameterlessConstructor(type));\n            }\n\n            try\n            {\n                return Activator.CreateInstance(type);\n            }\n            catch (Exception ex)\n            {\n                throw new InvalidOperationException(Resources.FormatError_FailedToActivate(type), ex);\n            }\n        }\n\n        private static void BindDictionary(object dictionary, Type dictionaryType, IConfiguration config, BinderOptions options)\n        {\n            var typeInfo = dictionaryType.GetTypeInfo();\n\n            // IDictionary<K,V> is guaranteed to have exactly two parameters\n            var keyType = typeInfo.GenericTypeArguments[0];\n            var valueType = typeInfo.GenericTypeArguments[1];\n            var keyTypeIsEnum = keyType.GetTypeInfo().IsEnum;\n\n            if (keyType != typeof(string) && !keyTypeIsEnum)\n            {\n                // We only support string and enum keys\n                return;\n            }\n\n            var setter = typeInfo.GetDeclaredProperty(\"Item\");\n            foreach (var child in config.GetChildren())\n            {\n                var item = BindInstance(\n                    type: valueType,\n                    instance: null,\n                    config: child,\n                    options: options);\n                if (item != null)\n                {\n                    if (keyType == typeof(string))\n                    {\n                        var key = child.Key;\n                        setter.SetValue(dictionary, item, new object[] { key });\n                    }\n                    else if (keyTypeIsEnum)\n                    {\n                        var key = Convert.ToInt32(Enum.Parse(keyType, child.Key));\n                        setter.SetValue(dictionary, item, new object[] { key });\n                    }\n                }\n            }\n        }\n\n        private static void BindCollection(object collection, Type collectionType, IConfiguration config, BinderOptions options)\n        {\n            var typeInfo = collectionType.GetTypeInfo();\n\n            // ICollection<T> is guaranteed to have exactly one parameter\n            var itemType = typeInfo.GenericTypeArguments[0];\n            var addMethod = typeInfo.GetDeclaredMethod(\"Add\");\n\n            foreach (var section in config.GetChildren())\n            {\n                try\n                {\n                    var item = BindInstance(\n                        type: itemType,\n                        instance: null,\n                        config: section,\n                        options: options);\n                    if (item != null)\n                    {\n                        addMethod.Invoke(collection, new[] { item });\n                    }\n                }\n                catch\n                {\n                }\n            }\n        }\n\n        private static Array BindArray(Array source, IConfiguration config, BinderOptions options)\n        {\n            var children = config.GetChildren().ToArray();\n            var arrayLength = source.Length;\n            var elementType = source.GetType().GetElementType();\n            var newArray = Array.CreateInstance(elementType, arrayLength + children.Length);\n\n            // binding to array has to preserve already initialized arrays with values\n            if (arrayLength > 0)\n            {\n                Array.Copy(source, newArray, arrayLength);\n            }\n\n            for (int i = 0; i < children.Length; i++)\n            {\n                try\n                {\n                    var item = BindInstance(\n                        type: elementType,\n                        instance: null,\n                        config: children[i],\n                        options: options);\n                    if (item != null)\n                    {\n                        newArray.SetValue(item, arrayLength + i);\n                    }\n                }\n                catch\n                {\n                }\n            }\n\n            return newArray;\n        }\n\n        private static bool TryConvertValue(Type type, string value, out object result, out Exception error)\n        {\n            error = null;\n            result = null;\n            if (type == typeof(object))\n            {\n                result = value;\n                return true;\n            }\n  \n            if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))\n            {\n                if (string.IsNullOrEmpty(value))\n                {\n                    return true;\n                }\n                return TryConvertValue(Nullable.GetUnderlyingType(type), value, out result, out error);\n            }\n  \n            var converter = TypeDescriptor.GetConverter(type);\n            if (converter.CanConvertFrom(typeof(string)))\n            {\n                try\n                {\n                    result = converter.ConvertFromInvariantString(value);\n                }\n                catch (Exception ex)\n                {\n                    error = new InvalidOperationException(Resources.FormatError_FailedBinding(value, type), ex);\n                }\n                return true;\n            }\n  \n            return false;\n        }\n\n        private static object ConvertValue(Type type, string value)\n        {\n            object result;\n            Exception error;\n            TryConvertValue(type, value, out result, out error);\n            if (error != null)\n            {\n                throw error;\n            }\n            return result;\n        }\n\n        private static Type FindOpenGenericInterface(Type expected, Type actual)\n        {\n            var actualTypeInfo = actual.GetTypeInfo();\n            if(actualTypeInfo.IsGenericType && \n                actual.GetGenericTypeDefinition() == expected)\n            {\n                return actual;\n            } \n             \n            var interfaces = actualTypeInfo.ImplementedInterfaces;\n            foreach (var interfaceType in interfaces)\n            {\n                if (interfaceType.GetTypeInfo().IsGenericType &&\n                    interfaceType.GetGenericTypeDefinition() == expected)\n                {\n                    return interfaceType;\n                }\n            }\n            return null;\n        }\n\n        private static IEnumerable<PropertyInfo> GetAllProperties(TypeInfo type)\n        {\n            var allProperties = new List<PropertyInfo>();\n\n            do\n            {\n                allProperties.AddRange(type.DeclaredProperties);\n                type = type.BaseType.GetTypeInfo();\n            }\n            while (type != typeof(object).GetTypeInfo());\n\n            return allProperties;\n        }\n    }\n}"
  },
  {
    "path": "src/Config.Binder/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.Binder.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.Binder/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.Binder\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.Binder.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because it is either abstract or an interface.\n        /// </summary>\n        internal static string Error_CannotActivateAbstractOrInterface\n        {\n            get => GetString(\"Error_CannotActivateAbstractOrInterface\");\n        }\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because it is either abstract or an interface.\n        /// </summary>\n        internal static string FormatError_CannotActivateAbstractOrInterface(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_CannotActivateAbstractOrInterface\"), p0);\n\n        /// <summary>\n        /// Failed to convert '{0}' to type '{1}'.\n        /// </summary>\n        internal static string Error_FailedBinding\n        {\n            get => GetString(\"Error_FailedBinding\");\n        }\n\n        /// <summary>\n        /// Failed to convert '{0}' to type '{1}'.\n        /// </summary>\n        internal static string FormatError_FailedBinding(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_FailedBinding\"), p0, p1);\n\n        /// <summary>\n        /// Failed to create instance of type '{0}'.\n        /// </summary>\n        internal static string Error_FailedToActivate\n        {\n            get => GetString(\"Error_FailedToActivate\");\n        }\n\n        /// <summary>\n        /// Failed to create instance of type '{0}'.\n        /// </summary>\n        internal static string FormatError_FailedToActivate(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_FailedToActivate\"), p0);\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because it is missing a public parameterless constructor.\n        /// </summary>\n        internal static string Error_MissingParameterlessConstructor\n        {\n            get => GetString(\"Error_MissingParameterlessConstructor\");\n        }\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because it is missing a public parameterless constructor.\n        /// </summary>\n        internal static string FormatError_MissingParameterlessConstructor(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_MissingParameterlessConstructor\"), p0);\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because multidimensional arrays are not supported.\n        /// </summary>\n        internal static string Error_UnsupportedMultidimensionalArray\n        {\n            get => GetString(\"Error_UnsupportedMultidimensionalArray\");\n        }\n\n        /// <summary>\n        /// Cannot create instance of type '{0}' because multidimensional arrays are not supported.\n        /// </summary>\n        internal static string FormatError_UnsupportedMultidimensionalArray(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_UnsupportedMultidimensionalArray\"), p0);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Binder/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_CannotActivateAbstractOrInterface\" xml:space=\"preserve\">\n    <value>Cannot create instance of type '{0}' because it is either abstract or an interface.</value>\n  </data>\n  <data name=\"Error_FailedBinding\" xml:space=\"preserve\">\n    <value>Failed to convert '{0}' to type '{1}'.</value>\n  </data>\n  <data name=\"Error_FailedToActivate\" xml:space=\"preserve\">\n    <value>Failed to create instance of type '{0}'.</value>\n  </data>\n  <data name=\"Error_MissingParameterlessConstructor\" xml:space=\"preserve\">\n    <value>Cannot create instance of type '{0}' because it is missing a public parameterless constructor.</value>\n  </data>\n  <data name=\"Error_UnsupportedMultidimensionalArray\" xml:space=\"preserve\">\n    <value>Cannot create instance of type '{0}' because multidimensional arrays are not supported.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.Binder/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.Binder, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.BinderOptions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_BindNonPublicProperties\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_BindNonPublicProperties\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.ConfigurationBinder\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Get<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            }\n          ],\n          \"ReturnType\": \"T0\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Get<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"configureOptions\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.BinderOptions>\"\n            }\n          ],\n          \"ReturnType\": \"T0\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Get\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"type\",\n              \"Type\": \"System.Type\"\n            }\n          ],\n          \"ReturnType\": \"System.Object\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Get\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"type\",\n              \"Type\": \"System.Type\"\n            },\n            {\n              \"Name\": \"configureOptions\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.BinderOptions>\"\n            }\n          ],\n          \"ReturnType\": \"System.Object\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Bind\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"instance\",\n              \"Type\": \"System.Object\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Bind\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"instance\",\n              \"Type\": \"System.Object\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Bind\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"instance\",\n              \"Type\": \"System.Object\"\n            },\n            {\n              \"Name\": \"configureOptions\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.BinderOptions>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetValue<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"T0\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetValue<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"defaultValue\",\n              \"Type\": \"T0\"\n            }\n          ],\n          \"ReturnType\": \"T0\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetValue\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"type\",\n              \"Type\": \"System.Type\"\n            },\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Object\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetValue\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfiguration\"\n            },\n            {\n              \"Name\": \"type\",\n              \"Type\": \"System.Type\"\n            },\n            {\n              \"Name\": \"key\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"defaultValue\",\n              \"Type\": \"System.Object\"\n            }\n          ],\n          \"ReturnType\": \"System.Object\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.CommandLine/CommandLineConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing Microsoft.Extensions.Configuration.CommandLine;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for registering <see cref=\"CommandLineConfigurationProvider\"/> with <see cref=\"IConfigurationBuilder\"/>.\n    /// </summary>\n    public static class CommandLineConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the command line.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"args\">The command line args.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddCommandLine(this IConfigurationBuilder configurationBuilder, string[] args)\n        {\n            return configurationBuilder.AddCommandLine(args, switchMappings: null);\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the command line using the specified switch mappings.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"args\">The command line args.</param>\n        /// <param name=\"switchMappings\">The switch mappings.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddCommandLine(\n            this IConfigurationBuilder configurationBuilder,\n            string[] args,\n            IDictionary<string, string> switchMappings)\n        {\n            configurationBuilder.Add(new CommandLineConfigurationSource { Args = args, SwitchMappings = switchMappings });\n            return configurationBuilder;\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from the command line.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddCommandLine(this IConfigurationBuilder builder, Action<CommandLineConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}\n"
  },
  {
    "path": "src/Config.CommandLine/CommandLineConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration.CommandLine\n{\n    /// <summary>\n    /// A command line based <see cref=\"ConfigurationProvider\"/>.\n    /// </summary>\n    public class CommandLineConfigurationProvider : ConfigurationProvider\n    {\n        private readonly Dictionary<string, string> _switchMappings;\n\n        /// <summary>\n        /// Initializes a new instance.\n        /// </summary>\n        /// <param name=\"args\">The command line args.</param>\n        /// <param name=\"switchMappings\">The switch mappings.</param>\n        public CommandLineConfigurationProvider(IEnumerable<string> args, IDictionary<string, string> switchMappings = null)\n        {\n            Args = args ?? throw new ArgumentNullException(nameof(args));\n\n            if (switchMappings != null)\n            {\n                _switchMappings = GetValidatedSwitchMappingsCopy(switchMappings);\n            }\n        }\n\n        /// <summary>\n        /// The command line arguments.\n        /// </summary>\n        protected IEnumerable<string> Args { get; private set; }\n\n        /// <summary>\n        /// Loads the configuration data from the command line args.\n        /// </summary>\n        public override void Load()\n        {\n            var data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n            string key, value;\n\n            using (var enumerator = Args.GetEnumerator())\n            {\n                while (enumerator.MoveNext())\n                {\n                    var currentArg = enumerator.Current;\n                    var keyStartIndex = 0;\n\n                    if (currentArg.StartsWith(\"--\"))\n                    {\n                        keyStartIndex = 2;\n                    }\n                    else if (currentArg.StartsWith(\"-\"))\n                    {\n                        keyStartIndex = 1;\n                    }\n                    else if (currentArg.StartsWith(\"/\"))\n                    {\n                        // \"/SomeSwitch\" is equivalent to \"--SomeSwitch\" when interpreting switch mappings\n                        // So we do a conversion to simplify later processing\n                        currentArg = string.Format(\"--{0}\", currentArg.Substring(1));\n                        keyStartIndex = 2;\n                    }\n\n                    var separator = currentArg.IndexOf('=');\n\n                    if (separator < 0)\n                    {\n                        // If there is neither equal sign nor prefix in current arugment, it is an invalid format\n                        if (keyStartIndex == 0)\n                        {\n                            // Ignore invalid formats\n                            continue;\n                        }\n\n                        // If the switch is a key in given switch mappings, interpret it\n                        if (_switchMappings != null && _switchMappings.ContainsKey(currentArg))\n                        {\n                            key = _switchMappings[currentArg];\n                        }\n                        // If the switch starts with a single \"-\" and it isn't in given mappings , it is an invalid usage so ignore it\n                        else if (keyStartIndex == 1)\n                        {\n                            continue;\n                        }\n                        // Otherwise, use the switch name directly as a key\n                        else\n                        {\n                            key = currentArg.Substring(keyStartIndex);\n                        }\n\n                        var previousKey = enumerator.Current;\n                        if (!enumerator.MoveNext())\n                        {\n                            // ignore missing values\n                            continue;\n                        }\n\n                        value = enumerator.Current;\n                    }\n                    else\n                    {\n                        var keySegment = currentArg.Substring(0, separator);\n\n                        // If the switch is a key in given switch mappings, interpret it\n                        if (_switchMappings != null && _switchMappings.ContainsKey(keySegment))\n                        {\n                            key = _switchMappings[keySegment];\n                        }\n                        // If the switch starts with a single \"-\" and it isn't in given mappings , it is an invalid usage\n                        else if (keyStartIndex == 1)\n                        {\n                            throw new FormatException(Resources.FormatError_ShortSwitchNotDefined(currentArg));\n                        }\n                        // Otherwise, use the switch name directly as a key\n                        else\n                        {\n                            key = currentArg.Substring(keyStartIndex, separator - keyStartIndex);\n                        }\n\n                        value = currentArg.Substring(separator + 1);\n                    }\n\n                    // Override value when key is duplicated. So we always have the last argument win.\n                    data[key] = value;\n                }\n            }\n\n            Data = data;\n        }\n\n        private Dictionary<string, string> GetValidatedSwitchMappingsCopy(IDictionary<string, string> switchMappings)\n        {\n            // The dictionary passed in might be constructed with a case-sensitive comparer\n            // However, the keys in configuration providers are all case-insensitive\n            // So we check whether the given switch mappings contain duplicated keys with case-insensitive comparer\n            var switchMappingsCopy = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n            foreach (var mapping in switchMappings)\n            {\n                // Only keys start with \"--\" or \"-\" are acceptable\n                if (!mapping.Key.StartsWith(\"-\") && !mapping.Key.StartsWith(\"--\"))\n                {\n                    throw new ArgumentException(\n                        Resources.FormatError_InvalidSwitchMapping(mapping.Key),\n                        nameof(switchMappings));\n                }\n\n                if (switchMappingsCopy.ContainsKey(mapping.Key))\n                {\n                    throw new ArgumentException(\n                        Resources.FormatError_DuplicatedKeyInSwitchMappings(mapping.Key),\n                        nameof(switchMappings));\n                }\n\n                switchMappingsCopy.Add(mapping.Key, mapping.Value);\n            }\n\n            return switchMappingsCopy;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.CommandLine/CommandLineConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\n\nnamespace Microsoft.Extensions.Configuration.CommandLine\n{\n    /// <summary>\n    /// Represents command line arguments as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class CommandLineConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// Gets or sets the switch mappings.\n        /// </summary>\n        public IDictionary<string, string> SwitchMappings { get; set; }\n\n        /// <summary>\n        /// Gets or sets the command line args.\n        /// </summary>\n        public IEnumerable<string> Args { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"CommandLineConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"CommandLineConfigurationProvider\"/></returns>\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            return new CommandLineConfigurationProvider(Args, SwitchMappings);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.CommandLine/Config.CommandLine.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.CommandLine</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.CommandLine</RootNamespace>\n    <Description>Command line configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);commandline</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.CommandLine/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.CommandLine.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.CommandLine/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.CommandLine\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.CommandLine.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// Keys in switch mappings are case-insensitive. A duplicated key '{0}' was found.\n        /// </summary>\n        internal static string Error_DuplicatedKeyInSwitchMappings\n        {\n            get => GetString(\"Error_DuplicatedKeyInSwitchMappings\");\n        }\n\n        /// <summary>\n        /// Keys in switch mappings are case-insensitive. A duplicated key '{0}' was found.\n        /// </summary>\n        internal static string FormatError_DuplicatedKeyInSwitchMappings(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_DuplicatedKeyInSwitchMappings\"), p0);\n\n        /// <summary>\n        /// The switch mappings contain an invalid switch '{0}'.\n        /// </summary>\n        internal static string Error_InvalidSwitchMapping\n        {\n            get => GetString(\"Error_InvalidSwitchMapping\");\n        }\n\n        /// <summary>\n        /// The switch mappings contain an invalid switch '{0}'.\n        /// </summary>\n        internal static string FormatError_InvalidSwitchMapping(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_InvalidSwitchMapping\"), p0);\n\n        /// <summary>\n        /// The short switch '{0}' is not defined in the switch mappings.\n        /// </summary>\n        internal static string Error_ShortSwitchNotDefined\n        {\n            get => GetString(\"Error_ShortSwitchNotDefined\");\n        }\n\n        /// <summary>\n        /// The short switch '{0}' is not defined in the switch mappings.\n        /// </summary>\n        internal static string FormatError_ShortSwitchNotDefined(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_ShortSwitchNotDefined\"), p0);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.CommandLine/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_DuplicatedKeyInSwitchMappings\" xml:space=\"preserve\">\n    <value>Keys in switch mappings are case-insensitive. A duplicated key '{0}' was found.</value>\n  </data>\n  <data name=\"Error_InvalidSwitchMapping\" xml:space=\"preserve\">\n    <value>The switch mappings contain an invalid switch '{0}'.</value>\n  </data>\n  <data name=\"Error_ShortSwitchNotDefined\" xml:space=\"preserve\">\n    <value>The short switch '{0}' is not defined in the switch mappings.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.CommandLine/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.CommandLine, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.CommandLineConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddCommandLine\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"args\",\n              \"Type\": \"System.String[]\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddCommandLine\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"args\",\n              \"Type\": \"System.String[]\"\n            },\n            {\n              \"Name\": \"switchMappings\",\n              \"Type\": \"System.Collections.Generic.IDictionary<System.String, System.String>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddCommandLine\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationSource>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.ConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Args\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.String>\",\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"args\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            },\n            {\n              \"Name\": \"switchMappings\",\n              \"Type\": \"System.Collections.Generic.IDictionary<System.String, System.String>\",\n              \"DefaultValue\": \"null\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_SwitchMappings\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IDictionary<System.String, System.String>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_SwitchMappings\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Collections.Generic.IDictionary<System.String, System.String>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Args\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Collections.Generic.IEnumerable<System.String>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Args\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Collections.Generic.IEnumerable<System.String>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.EnvironmentVariables/Config.EnvironmentVariables.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.EnvironmentVariables</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.EnvironmentVariables</RootNamespace>\n    <Description>Environment variables configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);envvar;environmentvariable</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.EnvironmentVariables/EnvironmentVariablesConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Microsoft.Extensions.Configuration.EnvironmentVariables\n{\n    /// <summary>\n    /// An environment variable based <see cref=\"ConfigurationProvider\"/>.\n    /// </summary>\n    public class EnvironmentVariablesConfigurationProvider : ConfigurationProvider\n    {\n        private const string MySqlServerPrefix = \"MYSQLCONNSTR_\";\n        private const string SqlAzureServerPrefix = \"SQLAZURECONNSTR_\";\n        private const string SqlServerPrefix = \"SQLCONNSTR_\";\n        private const string CustomPrefix = \"CUSTOMCONNSTR_\";\n\n        private const string ConnStrKeyFormat = \"ConnectionStrings:{0}\";\n        private const string ProviderKeyFormat = \"ConnectionStrings:{0}_ProviderName\";\n\n        private readonly string _prefix;\n\n        /// <summary>\n        /// Initializes a new instance.\n        /// </summary>\n        public EnvironmentVariablesConfigurationProvider() : this(string.Empty)\n        { }\n\n        /// <summary>\n        /// Initializes a new instance with the specified prefix.\n        /// </summary>\n        /// <param name=\"prefix\">A prefix used to filter the environment variables.</param>\n        public EnvironmentVariablesConfigurationProvider(string prefix)\n        {\n            _prefix = prefix ?? string.Empty;\n        }\n\n        /// <summary>\n        /// Loads the environment variables.\n        /// </summary>\n        public override void Load()\n        {\n            Load(Environment.GetEnvironmentVariables());\n        }\n\n        internal void Load(IDictionary envVariables)\n        {\n            Data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n\n            var filteredEnvVariables = envVariables\n                .Cast<DictionaryEntry>()\n                .SelectMany(AzureEnvToAppEnv)\n                .Where(entry => ((string)entry.Key).StartsWith(_prefix, StringComparison.OrdinalIgnoreCase));\n\n            foreach (var envVariable in filteredEnvVariables)\n            {\n                var key = ((string)envVariable.Key).Substring(_prefix.Length);\n                Data[key] = (string)envVariable.Value;\n            }\n        }\n\n        private static string NormalizeKey(string key)\n        {\n            return key.Replace(\"__\", ConfigurationPath.KeyDelimiter);\n        }\n\n        private static IEnumerable<DictionaryEntry> AzureEnvToAppEnv(DictionaryEntry entry)\n        {\n            var key = (string)entry.Key;\n            var prefix = string.Empty;\n            var provider = string.Empty;\n\n            if (key.StartsWith(MySqlServerPrefix, StringComparison.OrdinalIgnoreCase))\n            {\n                prefix = MySqlServerPrefix;\n                provider = \"MySql.Data.MySqlClient\";\n            }\n            else if (key.StartsWith(SqlAzureServerPrefix, StringComparison.OrdinalIgnoreCase))\n            {\n                prefix = SqlAzureServerPrefix;\n                provider = \"System.Data.SqlClient\";\n            }\n            else if (key.StartsWith(SqlServerPrefix, StringComparison.OrdinalIgnoreCase))\n            {\n                prefix = SqlServerPrefix;\n                provider = \"System.Data.SqlClient\";\n            }\n            else if (key.StartsWith(CustomPrefix, StringComparison.OrdinalIgnoreCase))\n            {\n                prefix = CustomPrefix;\n            }\n            else\n            {\n                entry.Key = NormalizeKey(key);\n                yield return entry;\n                yield break;\n            }\n\n            // Return the key-value pair for connection string\n            yield return new DictionaryEntry(\n                string.Format(ConnStrKeyFormat, NormalizeKey(key.Substring(prefix.Length))),\n                entry.Value);\n\n            if (!string.IsNullOrEmpty(provider))\n            {\n                // Return the key-value pair for provider name\n                yield return new DictionaryEntry(\n                    string.Format(ProviderKeyFormat, NormalizeKey(key.Substring(prefix.Length))),\n                    provider);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.EnvironmentVariables/EnvironmentVariablesConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration.EnvironmentVariables\n{\n    /// <summary>\n    /// Represents environment variables as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class EnvironmentVariablesConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// A prefix used to filter environment variables.\n        /// </summary>\n        public string Prefix { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"EnvironmentVariablesConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"EnvironmentVariablesConfigurationProvider\"/></returns>\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            return new EnvironmentVariablesConfigurationProvider(Prefix);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.EnvironmentVariables/EnvironmentVariablesExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing Microsoft.Extensions.Configuration.EnvironmentVariables;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for registering <see cref=\"EnvironmentVariablesConfigurationProvider\"/> with <see cref=\"IConfigurationBuilder\"/>.\n    /// </summary>\n    public static class EnvironmentVariablesExtensions\n    {\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from environment variables.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddEnvironmentVariables(this IConfigurationBuilder configurationBuilder)\n        {\n            configurationBuilder.Add(new EnvironmentVariablesConfigurationSource());\n            return configurationBuilder;\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from environment variables\n        /// with a specified prefix.\n        /// </summary>\n        /// <param name=\"configurationBuilder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"prefix\">The prefix that environment variable names must start with. The prefix will be removed from the environment variable names.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddEnvironmentVariables(\n            this IConfigurationBuilder configurationBuilder,\n            string prefix)\n        {\n            configurationBuilder.Add(new EnvironmentVariablesConfigurationSource { Prefix = prefix });\n            return configurationBuilder;\n        }\n\n        /// <summary>\n        /// Adds an <see cref=\"IConfigurationProvider\"/> that reads configuration values from environment variables.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddEnvironmentVariables(this IConfigurationBuilder builder, Action<EnvironmentVariablesConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}\n"
  },
  {
    "path": "src/Config.EnvironmentVariables/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.EnvironmentVariables.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.EnvironmentVariables/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.EnvironmentVariablesExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddEnvironmentVariables\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddEnvironmentVariables\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configurationBuilder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"prefix\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddEnvironmentVariables\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationSource>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.ConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"prefix\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Prefix\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Prefix\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Sealed\": true,\n          \"Virtual\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.FileExtensions/Config.FileExtensions.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.FileExtensions</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.FileExtensions</RootNamespace>\n    <Description>Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Physical\" Version=\"$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.FileExtensions/FileConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for <see cref=\"FileConfigurationProvider\"/>.\n    /// </summary>\n    public static class FileConfigurationExtensions\n    {\n        private static string FileProviderKey = \"FileProvider\";\n        private static string FileLoadExceptionHandlerKey = \"FileLoadExceptionHandler\";\n\n        /// <summary>\n        /// Sets the default <see cref=\"IFileProvider\"/> to be used for file-based providers.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"fileProvider\">The default file provider instance.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder SetFileProvider(this IConfigurationBuilder builder, IFileProvider fileProvider)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n\n            builder.Properties[FileProviderKey] = fileProvider ?? throw new ArgumentNullException(nameof(fileProvider));\n            return builder;\n        }\n\n        /// <summary>\n        /// Gets the default <see cref=\"IFileProvider\"/> to be used for file-based providers.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IFileProvider GetFileProvider(this IConfigurationBuilder builder)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n\n            if (builder.Properties.TryGetValue(FileProviderKey, out object provider))\n            {\n                return builder.Properties[FileProviderKey] as IFileProvider;\n            }\n\n            return new PhysicalFileProvider(AppContext.BaseDirectory ?? string.Empty);\n        }\n\n        /// <summary>\n        /// Sets the FileProvider for file-based providers to a PhysicalFileProvider with the base path.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"basePath\">The absolute path of file-based providers.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder SetBasePath(this IConfigurationBuilder builder, string basePath)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n\n            if (basePath == null)\n            {\n                throw new ArgumentNullException(nameof(basePath));\n            }\n\n            return builder.SetFileProvider(new PhysicalFileProvider(basePath));\n        }\n\n        /// <summary>\n        /// Sets a default action to be invoked for file-based providers when an error occurs.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"handler\">The Action to be invoked on a file load exception.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder SetFileLoadExceptionHandler(this IConfigurationBuilder builder, Action<FileLoadExceptionContext> handler)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n\n            builder.Properties[FileLoadExceptionHandlerKey] = handler;\n            return builder;\n        }\n\n        /// <summary>\n        /// Gets the default <see cref=\"IFileProvider\"/> to be used for file-based providers.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static Action<FileLoadExceptionContext> GetFileLoadExceptionHandler(this IConfigurationBuilder builder)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n\n            if (builder.Properties.TryGetValue(FileLoadExceptionHandlerKey, out object handler))\n            {\n                return builder.Properties[FileLoadExceptionHandlerKey] as Action<FileLoadExceptionContext>;\n            }\n            return null;\n        }\n    }\n}"
  },
  {
    "path": "src/Config.FileExtensions/FileConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Base class for file based <see cref=\"ConfigurationProvider\"/>.\n    /// </summary>\n    public abstract class FileConfigurationProvider : ConfigurationProvider\n    {\n        /// <summary>\n        /// Initializes a new instance with the specified source.\n        /// </summary>\n        /// <param name=\"source\">The source settings.</param>\n        public FileConfigurationProvider(FileConfigurationSource source)\n        {\n            if (source == null)\n            {\n                throw new ArgumentNullException(nameof(source));\n            }\n            Source = source;\n\n            if (Source.ReloadOnChange && Source.FileProvider != null)\n            {\n                ChangeToken.OnChange(\n                    () => Source.FileProvider.Watch(Source.Path),\n                    () => {\n                        Thread.Sleep(Source.ReloadDelay);\n                        Load(reload: true);\n                    });\n            }\n        }\n\n        /// <summary>\n        /// The source settings for this provider.\n        /// </summary>\n        public FileConfigurationSource Source { get; }\n\n        private void Load(bool reload)\n        {\n            var file = Source.FileProvider?.GetFileInfo(Source.Path);\n            if (file == null || !file.Exists)\n            {\n                if (Source.Optional || reload) // Always optional on reload\n                {\n                    Data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n                }\n                else\n                {\n                    var error = new StringBuilder($\"The configuration file '{Source.Path}' was not found and is not optional.\");\n                    if (!string.IsNullOrEmpty(file?.PhysicalPath))\n                    {\n                        error.Append($\" The physical path is '{file.PhysicalPath}'.\");\n                    }\n                    throw new FileNotFoundException(error.ToString());\n                }\n            }\n            else\n            {\n                // Always create new Data on reload to drop old keys\n                if (reload)\n                {\n                    Data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n                }\n                using (var stream = file.CreateReadStream())\n                {\n                    try\n                    {\n                        Load(stream);\n                    }\n                    catch (Exception e)\n                    {\n                        bool ignoreException = false;\n                        if (Source.OnLoadException != null)\n                        {\n                            var exceptionContext = new FileLoadExceptionContext\n                            {\n                                Provider = this,\n                                Exception = e\n                            };\n                            Source.OnLoadException.Invoke(exceptionContext);\n                            ignoreException = exceptionContext.Ignore;\n                        }\n                        if (!ignoreException)\n                        {\n                            throw e;\n                        }\n                    }\n                }\n            }\n            // REVIEW: Should we raise this in the base as well / instead?\n            OnReload();\n        }\n\n        /// <summary>\n        /// Loads the contents of the file at <see cref=\"Path\"/>.\n        /// </summary>\n        /// <exception cref=\"FileNotFoundException\">If Optional is <c>false</c> on the source and a\n        /// file does not exist at specified Path.</exception>\n        public override void Load()\n        {\n            Load(reload: false);\n        }\n\n        /// <summary>\n        /// Loads this provider's data from a stream.\n        /// </summary>\n        /// <param name=\"stream\">The stream to read.</param>\n        public abstract void Load(Stream stream);\n    }\n}\n"
  },
  {
    "path": "src/Config.FileExtensions/FileConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Represents a base class for file based <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public abstract class FileConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// Used to access the contents of the file.\n        /// </summary>\n        public IFileProvider FileProvider { get; set; }\n\n        /// <summary>\n        /// The path to the file.\n        /// </summary>\n        public string Path { get; set; }\n\n        /// <summary>\n        /// Determines if loading the file is optional.\n        /// </summary>\n        public bool Optional { get; set; }\n\n        /// <summary>\n        /// Determines whether the source will be loaded if the underlying file changes.\n        /// </summary>\n        public bool ReloadOnChange { get; set; }\n\n        /// <summary>\n        /// Number of milliseconds that reload will wait before calling Load.  This helps\n        /// avoid triggering reload before a file is completely written. Default is 250.\n        /// </summary>\n        public int ReloadDelay { get; set; } = 250;\n\n        /// <summary>\n        /// Will be called if an uncaught exception occurs in FileConfigurationProvider.Load.\n        /// </summary>\n        public Action<FileLoadExceptionContext> OnLoadException { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"IConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"IConfigurationProvider\"/></returns>\n        public abstract IConfigurationProvider Build(IConfigurationBuilder builder);\n\n        /// <summary>\n        /// Called to use any default settings on the builder like the FileProvider or FileLoadExceptionHandler.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        public void EnsureDefaults(IConfigurationBuilder builder)\n        {\n            FileProvider = FileProvider ?? builder.GetFileProvider();\n            OnLoadException = OnLoadException ?? builder.GetFileLoadExceptionHandler();\n        }\n\n        /// <summary>\n        /// If no file provider has been set, for absolute Path, this will creates a physical file provider \n        /// for the nearest existing directory.\n        /// </summary>\n        public void ResolveFileProvider()\n        {\n            if (FileProvider == null && \n                !string.IsNullOrEmpty(Path) &&\n                System.IO.Path.IsPathRooted(Path))\n            {\n                var directory = System.IO.Path.GetDirectoryName(Path);\n                var pathToFile = System.IO.Path.GetFileName(Path);\n                while (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))\n                {\n                    pathToFile = System.IO.Path.Combine(System.IO.Path.GetFileName(directory), pathToFile);\n                    directory = System.IO.Path.GetDirectoryName(directory);\n                }\n                if (Directory.Exists(directory))\n                {\n                    FileProvider = new PhysicalFileProvider(directory);\n                    Path = pathToFile;\n                }\n            }\n        }\n\n    }\n}"
  },
  {
    "path": "src/Config.FileExtensions/FileLoadExceptionContext.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Contains information about a file load exception.\n    /// </summary>\n    public class FileLoadExceptionContext\n    {\n        /// <summary>\n        /// The <see cref=\"FileConfigurationProvider\"/> that caused the exception.\n        /// </summary>\n        public FileConfigurationProvider Provider { get; set; }\n\n        /// <summary>\n        /// The exception that occured in Load.\n        /// </summary>\n        public Exception Exception { get; set; }\n\n        /// <summary>\n        /// If true, the exception will not be rethrown.\n        /// </summary>\n        public bool Ignore { get; set; }\n    }\n}"
  },
  {
    "path": "src/Config.FileExtensions/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.FileExtensions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.FileExtensions/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.FileExtensions\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.FileExtensions.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// The expected physical path was '{0}'.\n        /// </summary>\n        internal static string Error_ExpectedPhysicalPath\n        {\n            get => GetString(\"Error_ExpectedPhysicalPath\");\n        }\n\n        /// <summary>\n        /// The expected physical path was '{0}'.\n        /// </summary>\n        internal static string FormatError_ExpectedPhysicalPath(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_ExpectedPhysicalPath\"), p0);\n\n        /// <summary>\n        /// The configuration file '{0}' was not found and is not optional.\n        /// </summary>\n        internal static string Error_FileNotFound\n        {\n            get => GetString(\"Error_FileNotFound\");\n        }\n\n        /// <summary>\n        /// The configuration file '{0}' was not found and is not optional.\n        /// </summary>\n        internal static string FormatError_FileNotFound(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_FileNotFound\"), p0);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.FileExtensions/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_ExpectedPhysicalPath\" xml:space=\"preserve\">\n    <value>The expected physical path was '{0}'.</value>\n  </data>\n  <data name=\"Error_FileNotFound\" xml:space=\"preserve\">\n    <value>The configuration file '{0}' was not found and is not optional.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.FileExtensions/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.FileExtensions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.FileConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"SetFileProvider\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"fileProvider\",\n              \"Type\": \"Microsoft.Extensions.FileProviders.IFileProvider\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetFileProvider\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.FileProviders.IFileProvider\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"SetBasePath\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"basePath\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"SetFileLoadExceptionHandler\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"handler\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetFileLoadExceptionHandler\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext>\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"BaseType\": \"Microsoft.Extensions.Configuration.ConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Source\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"stream\",\n              \"Type\": \"System.IO.Stream\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Abstract\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"ImplementedInterfaces\": [\n        \"Microsoft.Extensions.Configuration.IConfigurationSource\"\n      ],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_FileProvider\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.FileProviders.IFileProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_FileProvider\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"Microsoft.Extensions.FileProviders.IFileProvider\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Path\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Path\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Optional\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Optional\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_ReloadOnChange\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_ReloadOnChange\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_ReloadDelay\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Int32\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_ReloadDelay\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Int32\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_OnLoadException\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext>\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_OnLoadException\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext>\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Virtual\": true,\n          \"Abstract\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"EnsureDefaults\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"ResolveFileProvider\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.FileLoadExceptionContext\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Provider\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Provider\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Exception\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Exception\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Exception\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Exception\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_Ignore\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.Boolean\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"set_Ignore\",\n          \"Parameters\": [\n            {\n              \"Name\": \"value\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.Ini/Config.Ini.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Ini</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Ini</RootNamespace>\n    <Description>INI configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);ini</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n    <ProjectReference Include=\"..\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.Ini/IniConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.Ini;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for adding <see cref=\"IniConfigurationProvider\"/>.\n    /// </summary>\n    public static class IniConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds the INI configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in\n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builder, string path)\n        {\n            return AddIniFile(builder, provider: null, path: path, optional: false, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the INI configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builder, string path, bool optional)\n        {\n            return AddIniFile(builder, provider: null, path: path, optional: optional, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the INI configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange)\n        {\n            return AddIniFile(builder, provider: null, path: path, optional: optional, reloadOnChange: reloadOnChange);\n        }\n\n        /// <summary>\n        /// Adds a INI configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"provider\">The <see cref=\"IFileProvider\"/> to use to access the file.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n            if (string.IsNullOrEmpty(path))\n            {\n                throw new ArgumentException(Resources.Error_InvalidFilePath, nameof(path));\n            }\n\n            return builder.AddIniFile(s =>\n            {\n                s.FileProvider = provider;\n                s.Path = path;\n                s.Optional = optional;\n                s.ReloadOnChange = reloadOnChange;\n                s.ResolveFileProvider();\n            });\n        }\n\n        /// <summary>\n        /// Adds a INI configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddIniFile(this IConfigurationBuilder builder, Action<IniConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}\n"
  },
  {
    "path": "src/Config.Ini/IniConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\n\nnamespace Microsoft.Extensions.Configuration.Ini\n{\n    /// <summary>\n    /// An INI file based <see cref=\"ConfigurationProvider\"/>.\n    /// Files are simple line structures (<a href=\"https://en.wikipedia.org/wiki/INI_file\">INI Files on Wikipedia</a>)\n    /// </summary>\n    /// <examples>\n    /// [Section:Header]\n    /// key1=value1\n    /// key2 = \" value2 \"\n    /// ; comment\n    /// # comment\n    /// / comment\n    /// </examples>\n    public class IniConfigurationProvider : FileConfigurationProvider\n    {\n        /// <summary>\n        /// Initializes a new instance with the specified source.\n        /// </summary>\n        /// <param name=\"source\">The source settings.</param>\n        public IniConfigurationProvider(IniConfigurationSource source) : base(source) { }\n\n        /// <summary>\n        /// Loads the INI data from a stream.\n        /// </summary>\n        /// <param name=\"stream\">The stream to read.</param>\n        public override void Load(Stream stream)\n        {\n            var data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n\n            using (var reader = new StreamReader(stream))\n            {\n                var sectionPrefix = string.Empty;\n\n                while (reader.Peek() != -1)\n                {\n                    var rawLine = reader.ReadLine();\n                    var line = rawLine.Trim();\n\n                    // Ignore blank lines\n                    if (string.IsNullOrWhiteSpace(line))\n                    {\n                        continue;\n                    }\n                    // Ignore comments\n                    if (line[0] == ';' || line[0] == '#' || line[0] == '/')\n                    {\n                        continue;\n                    }\n                    // [Section:header] \n                    if (line[0] == '[' && line[line.Length - 1] == ']')\n                    {\n                        // remove the brackets\n                        sectionPrefix = line.Substring(1, line.Length - 2) + ConfigurationPath.KeyDelimiter;\n                        continue;\n                    }\n\n                    // key = value OR \"value\"\n                    int separator = line.IndexOf('=');\n                    if (separator < 0)\n                    {\n                        throw new FormatException(Resources.FormatError_UnrecognizedLineFormat(rawLine));\n                    }\n\n                    string key = sectionPrefix + line.Substring(0, separator).Trim();\n                    string value = line.Substring(separator + 1).Trim();\n\n                    // Remove quotes\n                    if (value.Length > 1 && value[0] == '\"' && value[value.Length - 1] == '\"')\n                    {\n                        value = value.Substring(1, value.Length - 2);\n                    }\n\n                    if (data.ContainsKey(key))\n                    {\n                        throw new FormatException(Resources.FormatError_KeyIsDuplicated(key));\n                    }\n\n                    data[key] = value;\n                }\n            }\n\n            Data = data;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Ini/IniConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration.Ini\n{\n    /// <summary>\n    /// Represents an INI file as an <see cref=\"IConfigurationSource\"/>.\n    /// Files are simple line structures (<a href=\"https://en.wikipedia.org/wiki/INI_file\">INI Files on Wikipedia</a>)\n    /// </summary>\n    /// <examples>\n    /// [Section:Header]\n    /// key1=value1\n    /// key2 = \" value2 \"\n    /// ; comment\n    /// # comment\n    /// / comment\n    /// </examples>\n    public class IniConfigurationSource : FileConfigurationSource\n    {\n        /// <summary>\n        /// Builds the <see cref=\"IniConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>An <see cref=\"IniConfigurationProvider\"/></returns>\n        public override IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            EnsureDefaults(builder);\n            return new IniConfigurationProvider(this);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Ini/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.Ini.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.Ini/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.Ini\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.Ini.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string Error_InvalidFilePath\n        {\n            get => GetString(\"Error_InvalidFilePath\");\n        }\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string FormatError_InvalidFilePath()\n            => GetString(\"Error_InvalidFilePath\");\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.\n        /// </summary>\n        internal static string Error_KeyIsDuplicated\n        {\n            get => GetString(\"Error_KeyIsDuplicated\");\n        }\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.\n        /// </summary>\n        internal static string FormatError_KeyIsDuplicated(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_KeyIsDuplicated\"), p0);\n\n        /// <summary>\n        /// Unrecognized line format: '{0}'.\n        /// </summary>\n        internal static string Error_UnrecognizedLineFormat\n        {\n            get => GetString(\"Error_UnrecognizedLineFormat\");\n        }\n\n        /// <summary>\n        /// Unrecognized line format: '{0}'.\n        /// </summary>\n        internal static string FormatError_UnrecognizedLineFormat(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_UnrecognizedLineFormat\"), p0);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Ini/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_InvalidFilePath\" xml:space=\"preserve\">\n    <value>File path must be a non-empty string.</value>\n  </data>\n  <data name=\"Error_KeyIsDuplicated\" xml:space=\"preserve\">\n    <value>A duplicate key '{0}' was found.</value>\n  </data>\n  <data name=\"Error_UnrecognizedLineFormat\" xml:space=\"preserve\">\n    <value>Unrecognized line format: '{0}'.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.Ini/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.Ini, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.IniConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddIniFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddIniFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddIniFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddIniFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"provider\",\n              \"Type\": \"Microsoft.Extensions.FileProviders.IFileProvider\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddIniFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.Ini.IniConfigurationSource>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Ini.IniConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"stream\",\n              \"Type\": \"System.IO.Stream\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.Ini.IniConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Ini.IniConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.Json/Config.Json.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Json</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Json</RootNamespace>\n    <Description>JSON configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);json</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n    <ProjectReference Include=\"..\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Newtonsoft.Json\" Version=\"$(NewtonsoftJsonPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.Json/JsonConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.Json;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for adding <see cref=\"JsonConfigurationProvider\"/>.\n    /// </summary>\n    public static class JsonConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds the JSON configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, string path)\n        {\n            return AddJsonFile(builder, provider: null, path: path, optional: false, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the JSON configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, string path, bool optional)\n        {\n            return AddJsonFile(builder, provider: null, path: path, optional: optional, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the JSON configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange)\n        {\n            return AddJsonFile(builder, provider: null, path: path, optional: optional, reloadOnChange: reloadOnChange);\n        }\n\n        /// <summary>\n        /// Adds a JSON configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"provider\">The <see cref=\"IFileProvider\"/> to use to access the file.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n            if (string.IsNullOrEmpty(path))\n            {\n                throw new ArgumentException(Resources.Error_InvalidFilePath, nameof(path));\n            }\n\n            return builder.AddJsonFile(s =>\n            {\n                s.FileProvider = provider;\n                s.Path = path;\n                s.Optional = optional;\n                s.ReloadOnChange = reloadOnChange;\n                s.ResolveFileProvider();\n            });\n        }\n\n        /// <summary>\n        /// Adds a JSON configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddJsonFile(this IConfigurationBuilder builder, Action<JsonConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}"
  },
  {
    "path": "src/Config.Json/JsonConfigurationFileParser.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\n\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    internal class JsonConfigurationFileParser\n    {\n        private JsonConfigurationFileParser() { }\n\n        private readonly IDictionary<string, string> _data = new SortedDictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n        private readonly Stack<string> _context = new Stack<string>();\n        private string _currentPath;\n\n        private JsonTextReader _reader;\n\n        public static IDictionary<string, string> Parse(Stream input)\n            => new JsonConfigurationFileParser().ParseStream(input);\n\n        private IDictionary<string, string> ParseStream(Stream input)\n        {\n            _data.Clear();\n            _reader = new JsonTextReader(new StreamReader(input));\n            _reader.DateParseHandling = DateParseHandling.None;\n\n            var jsonConfig = JObject.Load(_reader);\n\n            VisitJObject(jsonConfig);\n\n            return _data;\n        }\n\n        private void VisitJObject(JObject jObject)\n        {\n            foreach (var property in jObject.Properties())\n            {\n                EnterContext(property.Name);\n                VisitProperty(property);\n                ExitContext();\n            }\n        }\n\n        private void VisitProperty(JProperty property)\n        {\n            VisitToken(property.Value);\n        }\n\n        private void VisitToken(JToken token)\n        {\n            switch (token.Type)\n            {\n                case JTokenType.Object:\n                    VisitJObject(token.Value<JObject>());\n                    break;\n\n                case JTokenType.Array:\n                    VisitArray(token.Value<JArray>());\n                    break;\n\n                case JTokenType.Integer:\n                case JTokenType.Float:\n                case JTokenType.String:\n                case JTokenType.Boolean:\n                case JTokenType.Bytes:\n                case JTokenType.Raw:\n                case JTokenType.Null:\n                    VisitPrimitive(token.Value<JValue>());\n                    break;\n\n                default:\n                    throw new FormatException(Resources.FormatError_UnsupportedJSONToken(\n                        _reader.TokenType,\n                        _reader.Path,\n                        _reader.LineNumber,\n                        _reader.LinePosition));\n            }\n        }\n\n        private void VisitArray(JArray array)\n        {\n            for (int index = 0; index < array.Count; index++)\n            {\n                EnterContext(index.ToString());\n                VisitToken(array[index]);\n                ExitContext();\n            }\n        }\n\n        private void VisitPrimitive(JValue data)\n        {\n            var key = _currentPath;\n\n            if (_data.ContainsKey(key))\n            {\n                throw new FormatException(Resources.FormatError_KeyIsDuplicated(key));\n            }\n            _data[key] = data.ToString(CultureInfo.InvariantCulture);\n        }\n\n        private void EnterContext(string context)\n        {\n            _context.Push(context);\n            _currentPath = ConfigurationPath.Combine(_context.Reverse());\n        }\n\n        private void ExitContext()\n        {\n            _context.Pop();\n            _currentPath = ConfigurationPath.Combine(_context.Reverse());\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Json/JsonConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Newtonsoft.Json;\n\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    /// <summary>\n    /// A JSON file based <see cref=\"FileConfigurationProvider\"/>.\n    /// </summary>\n    public class JsonConfigurationProvider : FileConfigurationProvider\n    {\n        /// <summary>\n        /// Initializes a new instance with the specified source.\n        /// </summary>\n        /// <param name=\"source\">The source settings.</param>\n        public JsonConfigurationProvider(JsonConfigurationSource source) : base(source) { }\n\n        /// <summary>\n        /// Loads the JSON data from a stream.\n        /// </summary>\n        /// <param name=\"stream\">The stream to read.</param>\n        public override void Load(Stream stream)\n        {\n            try\n            {\n                Data = JsonConfigurationFileParser.Parse(stream);\n            }\n            catch (JsonReaderException e)\n            {\n                string errorLine = string.Empty;\n                if (stream.CanSeek)\n                {\n                    stream.Seek(0, SeekOrigin.Begin);\n\n                    IEnumerable<string> fileContent;\n                    using (var streamReader = new StreamReader(stream))\n                    {\n                        fileContent = ReadLines(streamReader);\n                        errorLine = RetrieveErrorContext(e, fileContent);\n                    }\n                }\n\n                throw new FormatException(Resources.FormatError_JSONParseError(e.LineNumber, errorLine), e);\n            }\n        }\n\n        private static string RetrieveErrorContext(JsonReaderException e, IEnumerable<string> fileContent)\n        {\n            string errorLine = null;\n            if (e.LineNumber >= 2)\n            {\n                var errorContext = fileContent.Skip(e.LineNumber - 2).Take(2).ToList();\n                // Handle situations when the line number reported is out of bounds\n                if (errorContext.Count() >= 2)\n                {\n                    errorLine = errorContext[0].Trim() + Environment.NewLine + errorContext[1].Trim();\n                }\n            }\n            if (string.IsNullOrEmpty(errorLine))\n            {\n                var possibleLineContent = fileContent.Skip(e.LineNumber - 1).FirstOrDefault();\n                errorLine = possibleLineContent ?? string.Empty;\n            }\n            return errorLine;\n        }\n\n        private static IEnumerable<string> ReadLines(StreamReader streamReader)\n        {\n            string line;\n            do\n            {\n                line = streamReader.ReadLine();\n                yield return line;\n            } while (line != null);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Json/JsonConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\n\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    /// <summary>\n    /// Represents a JSON file as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class JsonConfigurationSource : FileConfigurationSource\n    {\n        /// <summary>\n        /// Builds the <see cref=\"JsonConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"JsonConfigurationProvider\"/></returns>\n        public override IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            EnsureDefaults(builder);\n            return new JsonConfigurationProvider(this);\n        }\n    }\n}"
  },
  {
    "path": "src/Config.Json/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.Json.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.Json/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.Json.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string Error_InvalidFilePath\n        {\n            get => GetString(\"Error_InvalidFilePath\");\n        }\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string FormatError_InvalidFilePath()\n            => GetString(\"Error_InvalidFilePath\");\n\n        /// <summary>\n        /// Could not parse the JSON file. Error on line number '{0}': '{1}'.\n        /// </summary>\n        internal static string Error_JSONParseError\n        {\n            get => GetString(\"Error_JSONParseError\");\n        }\n\n        /// <summary>\n        /// Could not parse the JSON file. Error on line number '{0}': '{1}'.\n        /// </summary>\n        internal static string FormatError_JSONParseError(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_JSONParseError\"), p0, p1);\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.\n        /// </summary>\n        internal static string Error_KeyIsDuplicated\n        {\n            get => GetString(\"Error_KeyIsDuplicated\");\n        }\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.\n        /// </summary>\n        internal static string FormatError_KeyIsDuplicated(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_KeyIsDuplicated\"), p0);\n\n        /// <summary>\n        /// Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}.\n        /// </summary>\n        internal static string Error_UnsupportedJSONToken\n        {\n            get => GetString(\"Error_UnsupportedJSONToken\");\n        }\n\n        /// <summary>\n        /// Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}.\n        /// </summary>\n        internal static string FormatError_UnsupportedJSONToken(object p0, object p1, object p2, object p3)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_UnsupportedJSONToken\"), p0, p1, p2, p3);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Json/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_InvalidFilePath\" xml:space=\"preserve\">\n    <value>File path must be a non-empty string.</value>\n  </data>\n  <data name=\"Error_JSONParseError\" xml:space=\"preserve\">\n    <value>Could not parse the JSON file. Error on line number '{0}': '{1}'.</value>\n  </data>\n  <data name=\"Error_KeyIsDuplicated\" xml:space=\"preserve\">\n    <value>A duplicate key '{0}' was found.</value>\n  </data>\n  <data name=\"Error_UnsupportedJSONToken\" xml:space=\"preserve\">\n    <value>Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.Json/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.Json, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.JsonConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddJsonFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddJsonFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddJsonFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddJsonFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"provider\",\n              \"Type\": \"Microsoft.Extensions.FileProviders.IFileProvider\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddJsonFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.Json.JsonConfigurationSource>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"stream\",\n              \"Type\": \"System.IO.Stream\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.Json.JsonConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Json.JsonConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.KeyPerFile/Config.KeyPerFile.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.KeyPerFile</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.KeyPerFile</RootNamespace>\n    <Description>Configuration provider that uses files in a directory for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <EnableApiCheck>false</EnableApiCheck>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Physical\" Version=\"$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.KeyPerFile/KeyPerFileConfigurationBuilderExtensions.cs",
    "content": "using System;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.KeyPerFile;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for registering <see cref=\"KeyPerFileConfigurationProvider\"/> with <see cref=\"IConfigurationBuilder\"/>.\n    /// </summary>\n    public static class KeyPerFileConfigurationBuilderExtensions\n    {\n        /// <summary>\n        /// Adds configuration using files from a directory. File names are used as the key,\n        /// file contents are used as the value.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"directoryPath\">The path to the directory.</param>\n        /// <param name=\"optional\">Whether the directory is optional.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddKeyPerFile(this IConfigurationBuilder builder, string directoryPath, bool optional)\n            => builder.AddKeyPerFile(source =>\n            {\n                // Only try to set the file provider if its not optional or the directory exists \n                if (!optional || Directory.Exists(directoryPath))\n                {\n                    source.FileProvider = new PhysicalFileProvider(directoryPath);\n                }\n                source.Optional = optional;\n            });\n\n        /// <summary>\n        /// Adds configuration using files from a directory. File names are used as the key,\n        /// file contents are used as the value.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddKeyPerFile(this IConfigurationBuilder builder, Action<KeyPerFileConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}\n"
  },
  {
    "path": "src/Config.KeyPerFile/KeyPerFileConfigurationProvider.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\n\nnamespace Microsoft.Extensions.Configuration.KeyPerFile\n{\n    /// <summary>\n    /// A <see cref=\"ConfigurationProvider\"/> that uses a directory's files as configuration key/values.\n    /// </summary>\n    public class KeyPerFileConfigurationProvider : ConfigurationProvider\n    {\n        KeyPerFileConfigurationSource Source { get; set; }\n\n        /// <summary>\n        /// Initializes a new instance.\n        /// </summary>\n        /// <param name=\"source\">The settings.</param>\n        public KeyPerFileConfigurationProvider(KeyPerFileConfigurationSource source)\n            => Source = source ?? throw new ArgumentNullException(nameof(source));\n\n        private static string NormalizeKey(string key)\n            => key.Replace(\"__\", ConfigurationPath.KeyDelimiter);\n\n        private static string TrimNewLine(string value)\n            => value.EndsWith(Environment.NewLine)\n                ? value.Substring(0, value.Length - Environment.NewLine.Length)\n                : value;\n\n        /// <summary>\n        /// Loads the docker secrets.\n        /// </summary>\n        public override void Load()\n        {\n            Data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n\n            if (Source.FileProvider == null)\n            {\n                if (Source.Optional)\n                {\n                    return;\n                }\n                else\n                {\n                    throw new DirectoryNotFoundException(\"A non-null file provider for the directory is required when this source is not optional.\");\n                }\n            }\n\n            var directory = Source.FileProvider.GetDirectoryContents(\"/\");\n            if (!directory.Exists && !Source.Optional)\n            {\n                throw new DirectoryNotFoundException(\"The root directory for the FileProvider doesn't exist and is not optional.\");\n            }\n\n            foreach (var file in directory)\n            {\n                if (file.IsDirectory)\n                {\n                    continue;\n                }\n\n                using (var stream = file.CreateReadStream())\n                using (var streamReader = new StreamReader(stream))\n                {\n                    if (Source.IgnoreCondition == null || !Source.IgnoreCondition(file.Name))\n                    {\n                        Data.Add(NormalizeKey(file.Name), TrimNewLine(streamReader.ReadToEnd()));\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.KeyPerFile/KeyPerFileConfigurationSource.cs",
    "content": "using System;\nusing System.IO;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration.KeyPerFile\n{\n    /// <summary>\n    /// An <see cref=\"IConfigurationSource\"/> used to configure <see cref=\"KeyPerFileConfigurationProvider\"/>.\n    /// </summary>\n    public class KeyPerFileConfigurationSource : IConfigurationSource\n    {\n        /// <summary>\n        /// Constructor;\n        /// </summary>\n        public KeyPerFileConfigurationSource()\n            => IgnoreCondition = s => IgnorePrefix != null && s.StartsWith(IgnorePrefix);\n\n        /// <summary>\n        /// The FileProvider whos root \"/\" directory files will be used as configuration data.\n        /// </summary>\n        public IFileProvider FileProvider { get; set; }\n\n        /// <summary>\n        /// Files that start with this prefix will be excluded.\n        /// Defaults to \"ignore.\".\n        /// </summary>\n        public string IgnorePrefix { get; set; } = \"ignore.\";\n\n        /// <summary>\n        /// Used to determine if a file should be ignored using its name.\n        /// Defaults to using the IgnorePrefix.\n        /// </summary>\n        public Func<string, bool> IgnoreCondition { get; set; }\n\n        /// <summary>\n        /// If false, will throw if the directory doesn't exist.\n        /// </summary>\n        public bool Optional { get; set; }\n\n        /// <summary>\n        /// Builds the <see cref=\"KeyPerFileConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"KeyPerFileConfigurationProvider\"/></returns>\n        public IConfigurationProvider Build(IConfigurationBuilder builder)\n            => new KeyPerFileConfigurationProvider(this);\n    }\n}\n"
  },
  {
    "path": "src/Config.KeyPerFile/README.md",
    "content": "﻿\nThis is a configuration provider that uses a directory's files as data. A file's name is the key and the contents are the value.\n"
  },
  {
    "path": "src/Config.UserSecrets/Config.UserSecrets.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <PackageId>Microsoft.Extensions.Configuration.UserSecrets</PackageId>\n    <AssemblyName>Microsoft.Extensions.Configuration.UserSecrets</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.UserSecrets</RootNamespace>\n    <Description>User secrets configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);secrets;usersecrets</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <Content Include=\"build\\netstandard2.0\\$(PackageId).props\" PackagePath=\"%(Identity)\" />\n    <Content Include=\"build\\netstandard2.0\\$(PackageId).targets\" PackagePath=\"%(Identity)\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config.Json\\Config.Json.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.UserSecrets/PathHelper.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\n\nnamespace Microsoft.Extensions.Configuration.UserSecrets\n{\n    /// <summary>\n    /// Provides paths for user secrets configuration files.\n    /// </summary>\n    public class PathHelper\n    {\n        internal const string SecretsFileName = \"secrets.json\";\n\n        /// <summary>\n        /// <para>\n        /// Returns the path to the JSON file that stores user secrets.\n        /// </para>\n        /// <para>\n        /// This uses the current user profile to locate the secrets file on disk in a location outside of source control.\n        /// </para>\n        /// </summary>\n        /// <param name=\"userSecretsId\">The user secret ID.</param>\n        /// <returns>The full path to the secret file.</returns>\n        public static string GetSecretsPathFromSecretsId(string userSecretsId)\n        {\n            if (string.IsNullOrEmpty(userSecretsId))\n            {\n                throw new ArgumentException(Resources.Common_StringNullOrEmpty, nameof(userSecretsId));\n            }\n\n            var badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars());\n            if (badCharIndex != -1)\n            {\n                throw new InvalidOperationException(\n                    string.Format(\n                        Resources.Error_Invalid_Character_In_UserSecrets_Id,\n                        userSecretsId[badCharIndex],\n                        badCharIndex));\n            }\n\n            const string userSecretsFallbackDir = \"DOTNET_USER_SECRETS_FALLBACK_DIR\";\n\n            // For backwards compat, this checks env vars first before using Env.GetFolderPath\n            var root = Environment.GetEnvironmentVariable(\"APPDATA\")                             // On Windows it goes to %APPDATA%\\Microsoft\\UserSecrets\\\n                       ?? Environment.GetEnvironmentVariable(\"HOME\")                             // On Mac/Linux it goes to ~/.microsoft/usersecrets/\n                       ?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) \n                       ?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)\n                       ?? Environment.GetEnvironmentVariable(userSecretsFallbackDir);            // this fallback is an escape hatch if everything else fails\n\n            if (string.IsNullOrEmpty(root))\n            {\n                throw new InvalidOperationException(\"Could not determine an appropriate location for storing user secrets. Set the \" + userSecretsFallbackDir + \" environment variable to a folder where user secrets should be stored.\");\n            }\n\n            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(\"APPDATA\")))\n            {\n                return Path.Combine(root, \"Microsoft\", \"UserSecrets\", userSecretsId, SecretsFileName);\n            }\n            else\n            {\n                return Path.Combine(root, \".microsoft\", \"usersecrets\", userSecretsId, SecretsFileName);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.UserSecrets/Properties/AssemblyInfo.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.UserSecrets.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n"
  },
  {
    "path": "src/Config.UserSecrets/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.UserSecrets\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.UserSecrets.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// Value cannot be null or an empty string.\n        /// </summary>\n        internal static string Common_StringNullOrEmpty\n        {\n            get => GetString(\"Common_StringNullOrEmpty\");\n        }\n\n        /// <summary>\n        /// Value cannot be null or an empty string.\n        /// </summary>\n        internal static string FormatCommon_StringNullOrEmpty()\n            => GetString(\"Common_StringNullOrEmpty\");\n\n        /// <summary>\n        /// Invalid character '{0}' found in the user secrets ID at index '{1}'.\n        /// </summary>\n        internal static string Error_Invalid_Character_In_UserSecrets_Id\n        {\n            get => GetString(\"Error_Invalid_Character_In_UserSecrets_Id\");\n        }\n\n        /// <summary>\n        /// Invalid character '{0}' found in the user secrets ID at index '{1}'.\n        /// </summary>\n        internal static string FormatError_Invalid_Character_In_UserSecrets_Id(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_Invalid_Character_In_UserSecrets_Id\"), p0, p1);\n\n        /// <summary>\n        /// Could not find 'UserSecretsIdAttribute' on assembly '{0}'.\n        /// Check that the project for '{0}' has set the 'UserSecretsId' build property.\n        /// If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package.\n        /// </summary>\n        internal static string Error_Missing_UserSecretsIdAttribute\n        {\n            get => GetString(\"Error_Missing_UserSecretsIdAttribute\");\n        }\n\n        /// <summary>\n        /// Could not find 'UserSecretsIdAttribute' on assembly '{0}'.\n        /// Check that the project for '{0}' has set the 'UserSecretsId' build property.\n        /// If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package.\n        /// </summary>\n        internal static string FormatError_Missing_UserSecretsIdAttribute(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_Missing_UserSecretsIdAttribute\"), p0);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.UserSecrets/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals of this format is to allow a simple XML format\n    that is mostly human readable. The generation and parsing of the\n    various data types are done through the TypeConverter classes\n    associated with the data types.\n\n    Example:\n\n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n\n    There are any number of \"resheader\" rows that contain simple\n    name/value pairs.\n\n    Each data row contains a name, and value. The row also contains a\n    type or mimetype. Type corresponds to a .NET class that support\n    text/value conversion through the TypeConverter architecture.\n    Classes that don't support this are serialized and stored with the\n    mimetype set.\n\n    The mimetype is used for serialized objects, and tells the\n    ResXResourceReader how to depersist the object. This is currently not\n    extensible. For a given mimetype the value must be set accordingly:\n\n    Note - application/x-microsoft.net.object.binary.base64 is the format\n    that the ResXResourceWriter will generate, however the reader can\n    read any of the formats listed below.\n\n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array\n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Common_StringNullOrEmpty\" xml:space=\"preserve\">\n    <value>Value cannot be null or an empty string.</value>\n  </data>\n  <data name=\"Error_Invalid_Character_In_UserSecrets_Id\" xml:space=\"preserve\">\n    <value>Invalid character '{0}' found in the user secrets ID at index '{1}'.</value>\n  </data>\n  <data name=\"Error_Missing_UserSecretsIdAttribute\" xml:space=\"preserve\">\n    <value>Could not find 'UserSecretsIdAttribute' on assembly '{0}'.\nCheck that the project for '{0}' has set the 'UserSecretsId' build property.\nIf the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package.</value>\n  </data>\n</root>\n"
  },
  {
    "path": "src/Config.UserSecrets/UserSecretsConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing System.Reflection;\nusing Microsoft.Extensions.Configuration.UserSecrets;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Configuration extensions for adding user secrets configuration source.\n    /// </summary>\n    public static class UserSecretsConfigurationExtensions\n    {\n        /// <summary>\n        /// <para>\n        /// Adds the user secrets configuration source. Searches the assembly that contains type <typeparamref name=\"T\"/>\n        /// for an instance of <see cref=\"UserSecretsIdAttribute\"/>, which specifies a user secrets ID.\n        /// </para>\n        /// <para>\n        /// A user secrets ID is unique value used to store and identify a collection of secret configuration values.\n        /// </para>\n        /// </summary>\n        /// <param name=\"configuration\">The configuration builder.</param>\n        /// <typeparam name=\"T\">The type from the assembly to search for an instance of <see cref=\"UserSecretsIdAttribute\"/>.</typeparam>\n        /// <exception cref=\"InvalidOperationException\">Thrown when the assembly containing <typeparamref name=\"T\"/> does not have <see cref=\"UserSecretsIdAttribute\"/>.</exception>\n        /// <returns>The configuration builder.</returns>\n        public static IConfigurationBuilder AddUserSecrets<T>(this IConfigurationBuilder configuration)\n            where T : class\n            => configuration.AddUserSecrets<T>(optional: false);\n\n        /// <summary>\n        /// <para>\n        /// Adds the user secrets configuration source. Searches the assembly that contains type <typeparamref name=\"T\"/>\n        /// for an instance of <see cref=\"UserSecretsIdAttribute\"/>, which specifies a user secrets ID.\n        /// </para>\n        /// <para>\n        /// A user secrets ID is unique value used to store and identify a collection of secret configuration values.\n        /// </para>\n        /// </summary>\n        /// <param name=\"configuration\">The configuration builder.</param>\n        /// <param name=\"optional\">Whether loading secrets is optional. When false, this method may throw.</param>\n        /// <exception cref=\"InvalidOperationException\">Thrown when <paramref name=\"optional\"/> is false and the assembly containing <typeparamref name=\"T\"/> does not have a valid <see cref=\"UserSecretsIdAttribute\"/>.</exception>\n        /// <typeparam name=\"T\">The type from the assembly to search for an instance of <see cref=\"UserSecretsIdAttribute\"/>.</typeparam>\n        /// <returns>The configuration builder.</returns>\n        public static IConfigurationBuilder AddUserSecrets<T>(this IConfigurationBuilder configuration, bool optional)\n            where T : class\n            => configuration.AddUserSecrets(typeof(T).GetTypeInfo().Assembly, optional);\n\n        /// <summary>\n        /// <para>\n        /// Adds the user secrets configuration source. This searches <paramref name=\"assembly\"/> for an instance\n        /// of <see cref=\"UserSecretsIdAttribute\"/>, which specifies a user secrets ID.\n        /// </para>\n        /// <para>\n        /// A user secrets ID is unique value used to store and identify a collection of secret configuration values.\n        /// </para>\n        /// </summary>\n        /// <param name=\"configuration\">The configuration builder.</param>\n        /// <param name=\"assembly\">The assembly with the <see cref=\"UserSecretsIdAttribute\" />.</param>\n        /// <exception cref=\"InvalidOperationException\">Thrown when <paramref name=\"assembly\"/> does not have a valid <see cref=\"UserSecretsIdAttribute\"/></exception>\n        /// <returns>The configuration builder.</returns>\n        public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly)\n            => configuration.AddUserSecrets(assembly, optional: false);\n\n        /// <summary>\n        /// <para>\n        /// Adds the user secrets configuration source. This searches <paramref name=\"assembly\"/> for an instance\n        /// of <see cref=\"UserSecretsIdAttribute\"/>, which specifies a user secrets ID.\n        /// </para>\n        /// <para>\n        /// A user secrets ID is unique value used to store and identify a collection of secret configuration values.\n        /// </para>\n        /// </summary>\n        /// <param name=\"configuration\">The configuration builder.</param>\n        /// <param name=\"assembly\">The assembly with the <see cref=\"UserSecretsIdAttribute\" />.</param>\n        /// <param name=\"optional\">Whether loading secrets is optional. When false, this method may throw.</param>\n        /// <exception cref=\"InvalidOperationException\">Thrown when <paramref name=\"optional\"/> is false and <paramref name=\"assembly\"/> does not have a valid <see cref=\"UserSecretsIdAttribute\"/>.</exception>\n        /// <returns>The configuration builder.</returns>\n        public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly, bool optional)\n        {\n            if (configuration == null)\n            {\n                throw new ArgumentNullException(nameof(configuration));\n            }\n\n            if (assembly == null)\n            {\n                throw new ArgumentNullException(nameof(assembly));\n            }\n\n            var attribute = assembly.GetCustomAttribute<UserSecretsIdAttribute>();\n            if (attribute != null)\n            {\n                return AddUserSecrets(configuration, attribute.UserSecretsId);\n            }\n\n            if (!optional)\n            {\n                throw new InvalidOperationException(Resources.FormatError_Missing_UserSecretsIdAttribute(assembly.GetName().Name));\n            }\n\n            return configuration;\n        }\n\n        /// <summary>\n        /// <para>\n        /// Adds the user secrets configuration source with specified user secrets ID.\n        /// </para>\n        /// <para>\n        /// A user secrets ID is unique value used to store and identify a collection of secret configuration values.\n        /// </para>\n        /// </summary>\n        /// <param name=\"configuration\">The configuration builder.</param>\n        /// <param name=\"userSecretsId\">The user secrets ID.</param>\n        /// <returns>The configuration builder.</returns>\n        public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, string userSecretsId)\n        {\n            if (configuration == null)\n            {\n                throw new ArgumentNullException(nameof(configuration));\n            }\n\n            if (userSecretsId == null)\n            {\n                throw new ArgumentNullException(nameof(userSecretsId));\n            }\n\n            return AddSecretsFile(configuration, PathHelper.GetSecretsPathFromSecretsId(userSecretsId));\n        }\n\n        private static IConfigurationBuilder AddSecretsFile(IConfigurationBuilder configuration, string secretPath)\n        {\n            var directoryPath = Path.GetDirectoryName(secretPath);\n            var fileProvider = Directory.Exists(directoryPath)\n                ? new PhysicalFileProvider(directoryPath)\n                : null;\n            return configuration.AddJsonFile(fileProvider, PathHelper.SecretsFileName, optional: true, reloadOnChange: false);\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.UserSecrets/UserSecretsIdAttribute.cs",
    "content": "﻿// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\n\nnamespace Microsoft.Extensions.Configuration.UserSecrets\n{\n    /// <summary>\n    /// <para>\n    /// Represents the user secrets ID.\n    /// </para>\n    /// <para>\n    /// In most cases, this attribute is automatically generated during compilation by MSBuild targets \n    /// included in the UserSecrets NuGet package. These targets use the MSBuild property 'UserSecretsId'\n    /// to set the value for <see cref=\"UserSecretsId\"/>.\n    /// </para>\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)]\n    public class UserSecretsIdAttribute : Attribute\n    {\n        /// <summary>\n        /// Initializes an instance of <see cref=\"UserSecretsIdAttribute\" />.\n        /// </summary>\n        /// <param name=\"userSecretId\">The user secrets ID.</param>\n        public UserSecretsIdAttribute(string userSecretId)\n        {\n            if (string.IsNullOrEmpty(userSecretId))\n            {\n                throw new ArgumentException(Resources.Common_StringNullOrEmpty, nameof(userSecretId));\n            }\n\n            UserSecretsId = userSecretId;\n        }\n\n        /// <summary>\n        /// The user secrets ID.\n        /// </summary>\n        public string UserSecretsId { get; }\n    }\n}\n"
  },
  {
    "path": "src/Config.UserSecrets/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.UserSecrets, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.UserSecretsConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddUserSecrets<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"Class\": true,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddUserSecrets<T0>\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": [\n            {\n              \"ParameterName\": \"T\",\n              \"ParameterPosition\": 0,\n              \"Class\": true,\n              \"BaseTypeOrInterfaces\": []\n            }\n          ]\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddUserSecrets\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"assembly\",\n              \"Type\": \"System.Reflection.Assembly\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddUserSecrets\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"assembly\",\n              \"Type\": \"System.Reflection.Assembly\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddUserSecrets\",\n          \"Parameters\": [\n            {\n              \"Name\": \"configuration\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"userSecretsId\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.UserSecrets.PathHelper\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"GetSecretsPathFromSecretsId\",\n          \"Parameters\": [\n            {\n              \"Name\": \"userSecretsId\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"System.String\",\n          \"Static\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"System.Attribute\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"get_UserSecretsId\",\n          \"Parameters\": [],\n          \"ReturnType\": \"System.String\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"userSecretId\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Config.UserSecrets/build/netstandard2.0/Microsoft.Extensions.Configuration.UserSecrets.props",
    "content": "﻿<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\n  <ItemGroup>\n    <!-- This capability represents the UserSecretsID + secrets.json approach to storing local user secrets. -->\n    <ProjectCapability Include=\"LocalUserSecrets\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "src/Config.UserSecrets/build/netstandard2.0/Microsoft.Extensions.Configuration.UserSecrets.targets",
    "content": "﻿<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\n  <PropertyGroup>\n    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>\n    <GenerateUserSecretsAttribute Condition=\"'$(GenerateUserSecretsAttribute)'==''\">true</GenerateUserSecretsAttribute>\n  </PropertyGroup>\n\n  <ItemGroup Condition=\" '$(UserSecretsId)' != '' AND '$(GenerateUserSecretsAttribute)' != 'false' \">\n    <AssemblyAttribute Include=\"Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute\">\n      <_Parameter1>$(UserSecretsId.Trim())</_Parameter1>\n    </AssemblyAttribute>\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "src/Config.Xml/Config.Xml.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Xml</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Xml</RootNamespace>\n    <Description>XML configuration provider implementation for Microsoft.Extensions.Configuration.</Description>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <PackageTags>$(PackageTags);xml</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config\\Config.csproj\" />\n    <ProjectReference Include=\"..\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"System.Security.Cryptography.Xml\" Version=\"$(SystemSecurityCryptographyXmlPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n\n"
  },
  {
    "path": "src/Config.Xml/Properties/AssemblyInfo.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Runtime.CompilerServices;\n\n[assembly: InternalsVisibleTo(\"Microsoft.Extensions.Configuration.Xml.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb\")]\n\n"
  },
  {
    "path": "src/Config.Xml/Properties/Resources.Designer.cs",
    "content": "// <auto-generated />\nnamespace Microsoft.Extensions.Configuration.Xml\n{\n    using System.Globalization;\n    using System.Reflection;\n    using System.Resources;\n\n    internal static class Resources\n    {\n        private static readonly ResourceManager _resourceManager\n            = new ResourceManager(\"Microsoft.Extensions.Configuration.Xml.Resources\", typeof(Resources).GetTypeInfo().Assembly);\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string Error_InvalidFilePath\n        {\n            get => GetString(\"Error_InvalidFilePath\");\n        }\n\n        /// <summary>\n        /// File path must be a non-empty string.\n        /// </summary>\n        internal static string FormatError_InvalidFilePath()\n            => GetString(\"Error_InvalidFilePath\");\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.{1}\n        /// </summary>\n        internal static string Error_KeyIsDuplicated\n        {\n            get => GetString(\"Error_KeyIsDuplicated\");\n        }\n\n        /// <summary>\n        /// A duplicate key '{0}' was found.{1}\n        /// </summary>\n        internal static string FormatError_KeyIsDuplicated(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_KeyIsDuplicated\"), p0, p1);\n\n        /// <summary>\n        /// XML namespaces are not supported.{0}\n        /// </summary>\n        internal static string Error_NamespaceIsNotSupported\n        {\n            get => GetString(\"Error_NamespaceIsNotSupported\");\n        }\n\n        /// <summary>\n        /// XML namespaces are not supported.{0}\n        /// </summary>\n        internal static string FormatError_NamespaceIsNotSupported(object p0)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_NamespaceIsNotSupported\"), p0);\n\n        /// <summary>\n        /// Unsupported node type '{0}' was found.{1}\n        /// </summary>\n        internal static string Error_UnsupportedNodeType\n        {\n            get => GetString(\"Error_UnsupportedNodeType\");\n        }\n\n        /// <summary>\n        /// Unsupported node type '{0}' was found.{1}\n        /// </summary>\n        internal static string FormatError_UnsupportedNodeType(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Error_UnsupportedNodeType\"), p0, p1);\n\n        /// <summary>\n        ///  Line {0}, position {1}.\n        /// </summary>\n        internal static string Msg_LineInfo\n        {\n            get => GetString(\"Msg_LineInfo\");\n        }\n\n        /// <summary>\n        ///  Line {0}, position {1}.\n        /// </summary>\n        internal static string FormatMsg_LineInfo(object p0, object p1)\n            => string.Format(CultureInfo.CurrentCulture, GetString(\"Msg_LineInfo\"), p0, p1);\n\n        private static string GetString(string name, params string[] formatterNames)\n        {\n            var value = _resourceManager.GetString(name);\n\n            System.Diagnostics.Debug.Assert(value != null);\n\n            if (formatterNames != null)\n            {\n                for (var i = 0; i < formatterNames.Length; i++)\n                {\n                    value = value.Replace(\"{\" + formatterNames[i] + \"}\", \"{\" + i + \"}\");\n                }\n            }\n\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Xml/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Error_InvalidFilePath\" xml:space=\"preserve\">\n    <value>File path must be a non-empty string.</value>\n  </data>\n  <data name=\"Error_KeyIsDuplicated\" xml:space=\"preserve\">\n    <value>A duplicate key '{0}' was found.{1}</value>\n  </data>\n  <data name=\"Error_NamespaceIsNotSupported\" xml:space=\"preserve\">\n    <value>XML namespaces are not supported.{0}</value>\n  </data>\n  <data name=\"Error_UnsupportedNodeType\" xml:space=\"preserve\">\n    <value>Unsupported node type '{0}' was found.{1}</value>\n  </data>\n  <data name=\"Msg_LineInfo\" xml:space=\"preserve\">\n    <value> Line {0}, position {1}.</value>\n  </data>\n</root>"
  },
  {
    "path": "src/Config.Xml/XmlConfigurationExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.Xml;\nusing Microsoft.Extensions.FileProviders;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    /// <summary>\n    /// Extension methods for adding <see cref=\"XmlConfigurationProvider\"/>.\n    /// </summary>\n    public static class XmlConfigurationExtensions\n    {\n        /// <summary>\n        /// Adds the XML configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, string path)\n        {\n            return AddXmlFile(builder, provider: null, path: path, optional: false, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the XML configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, string path, bool optional)\n        {\n            return AddXmlFile(builder, provider: null, path: path, optional: optional, reloadOnChange: false);\n        }\n\n        /// <summary>\n        /// Adds the XML configuration provider at <paramref name=\"path\"/> to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange)\n        {\n            return AddXmlFile(builder, provider: null, path: path, optional: optional, reloadOnChange: reloadOnChange);\n        }\n\n        /// <summary>\n        /// Adds a XML configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"provider\">The <see cref=\"IFileProvider\"/> to use to access the file.</param>\n        /// <param name=\"path\">Path relative to the base path stored in \n        /// <see cref=\"IConfigurationBuilder.Properties\"/> of <paramref name=\"builder\"/>.</param>\n        /// <param name=\"optional\">Whether the file is optional.</param>\n        /// <param name=\"reloadOnChange\">Whether the configuration should be reloaded if the file changes.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange)\n        {\n            if (builder == null)\n            {\n                throw new ArgumentNullException(nameof(builder));\n            }\n            if (string.IsNullOrEmpty(path))\n            {\n                throw new ArgumentException(Resources.Error_InvalidFilePath, nameof(path));\n            }\n\n            return builder.AddXmlFile(s =>\n            {\n                s.FileProvider = provider;\n                s.Path = path;\n                s.Optional = optional;\n                s.ReloadOnChange = reloadOnChange;\n                s.ResolveFileProvider();\n            });\n        }\n\n        /// <summary>\n        /// Adds a XML configuration source to <paramref name=\"builder\"/>.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/> to add to.</param>\n        /// <param name=\"configureSource\">Configures the source.</param>\n        /// <returns>The <see cref=\"IConfigurationBuilder\"/>.</returns>\n        public static IConfigurationBuilder AddXmlFile(this IConfigurationBuilder builder, Action<XmlConfigurationSource> configureSource)\n            => builder.Add(configureSource);\n    }\n}\n"
  },
  {
    "path": "src/Config.Xml/XmlConfigurationProvider.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Xml;\n\nnamespace Microsoft.Extensions.Configuration.Xml\n{\n    /// <summary>\n    /// Represents an XML file as an <see cref=\"IConfigurationSource\"/>.\n    /// </summary>\n    public class XmlConfigurationProvider : FileConfigurationProvider\n    {\n        private const string NameAttributeKey = \"Name\";\n\n        /// <summary>\n        /// Initializes a new instance with the specified source.\n        /// </summary>\n        /// <param name=\"source\">The source settings.</param>\n        public XmlConfigurationProvider(XmlConfigurationSource source) : base(source) { }\n\n        internal XmlDocumentDecryptor Decryptor { get; set; } = XmlDocumentDecryptor.Instance;\n\n        /// <summary>\n        /// Loads the XML data from a stream.\n        /// </summary>\n        /// <param name=\"stream\">The stream to read.</param>\n        public override void Load(Stream stream)\n        {\n            var data = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);\n\n            var readerSettings = new XmlReaderSettings()\n            {\n                CloseInput = false, // caller will close the stream\n                DtdProcessing = DtdProcessing.Prohibit,\n                IgnoreComments = true,\n                IgnoreWhitespace = true\n            };\n\n            using (var reader = Decryptor.CreateDecryptingXmlReader(stream, readerSettings))\n            {\n                var prefixStack = new Stack<string>();\n\n                SkipUntilRootElement(reader);\n\n                // We process the root element individually since it doesn't contribute to prefix \n                ProcessAttributes(reader, prefixStack, data, AddNamePrefix);\n                ProcessAttributes(reader, prefixStack, data, AddAttributePair);\n\n                var preNodeType = reader.NodeType;\n                while (reader.Read())\n                {\n                    switch (reader.NodeType)\n                    {\n                        case XmlNodeType.Element:\n                            prefixStack.Push(reader.LocalName);\n                            ProcessAttributes(reader, prefixStack, data, AddNamePrefix);\n                            ProcessAttributes(reader, prefixStack, data, AddAttributePair);\n\n                            // If current element is self-closing\n                            if (reader.IsEmptyElement)\n                            {\n                                prefixStack.Pop();\n                            }\n                            break;\n\n                        case XmlNodeType.EndElement:\n                            if (prefixStack.Any())\n                            {\n                                // If this EndElement node comes right after an Element node,\n                                // it means there is no text/CDATA node in current element\n                                if (preNodeType == XmlNodeType.Element)\n                                {\n                                    var key = ConfigurationPath.Combine(prefixStack.Reverse());\n                                    data[key] = string.Empty;\n                                }\n\n                                prefixStack.Pop();\n                            }\n                            break;\n\n                        case XmlNodeType.CDATA:\n                        case XmlNodeType.Text:\n                            {\n                                var key = ConfigurationPath.Combine(prefixStack.Reverse());\n                                if (data.ContainsKey(key))\n                                {\n                                    throw new FormatException(Resources.FormatError_KeyIsDuplicated(key,\n                                        GetLineInfo(reader)));\n                                }\n\n                                data[key] = reader.Value;\n                                break;\n                            }\n                        case XmlNodeType.XmlDeclaration:\n                        case XmlNodeType.ProcessingInstruction:\n                        case XmlNodeType.Comment:\n                        case XmlNodeType.Whitespace:\n                            // Ignore certain types of nodes\n                            break;\n\n                        default:\n                            throw new FormatException(Resources.FormatError_UnsupportedNodeType(reader.NodeType,\n                                GetLineInfo(reader)));\n                    }\n                    preNodeType = reader.NodeType;\n                    // If this element is a self-closing element,\n                    // we pretend that we just processed an EndElement node\n                    // because a self-closing element contains an end within itself\n                    if (preNodeType == XmlNodeType.Element &&\n                        reader.IsEmptyElement)\n                    {\n                        preNodeType = XmlNodeType.EndElement;\n                    }\n                }\n            }\n\n            Data = data;\n        }\n\n        private void SkipUntilRootElement(XmlReader reader)\n        {\n            while (reader.Read())\n            {\n                if (reader.NodeType != XmlNodeType.XmlDeclaration &&\n                    reader.NodeType != XmlNodeType.ProcessingInstruction)\n                {\n                    break;\n                }\n            }\n        }\n\n        private static string GetLineInfo(XmlReader reader)\n        {\n            var lineInfo = reader as IXmlLineInfo;\n            return lineInfo == null ?  string.Empty :\n                Resources.FormatMsg_LineInfo(lineInfo.LineNumber, lineInfo.LinePosition);\n        }\n\n        private void ProcessAttributes(XmlReader reader, Stack<string> prefixStack, IDictionary<string, string> data,\n            Action<XmlReader, Stack<string>, IDictionary<string, string>, XmlWriter> act, XmlWriter writer = null)\n        {\n            for (int i = 0; i < reader.AttributeCount; i++)\n            {\n                reader.MoveToAttribute(i);\n\n                // If there is a namespace attached to current attribute\n                if (!string.IsNullOrEmpty(reader.NamespaceURI))\n                {\n                    throw new FormatException(Resources.FormatError_NamespaceIsNotSupported(GetLineInfo(reader)));\n                }\n\n                act(reader, prefixStack, data, writer);\n            }\n\n            // Go back to the element containing the attributes we just processed\n            reader.MoveToElement();\n        }\n\n        // The special attribute \"Name\" only contributes to prefix\n        // This method adds a prefix if current node in reader represents a \"Name\" attribute\n        private static void AddNamePrefix(XmlReader reader, Stack<string> prefixStack,\n            IDictionary<string, string> data, XmlWriter writer)\n        {\n            if (!string.Equals(reader.LocalName, NameAttributeKey, StringComparison.OrdinalIgnoreCase))\n            {\n                return;\n            }\n\n            // If current element is not root element\n            if (prefixStack.Any())\n            {\n                var lastPrefix = prefixStack.Pop();\n                prefixStack.Push(ConfigurationPath.Combine(lastPrefix, reader.Value));\n            }\n            else\n            {\n                prefixStack.Push(reader.Value);\n            }\n        }\n\n        // Common attributes contribute to key-value pairs\n        // This method adds a key-value pair if current node in reader represents a common attribute\n        private static void AddAttributePair(XmlReader reader, Stack<string> prefixStack,\n            IDictionary<string, string> data, XmlWriter writer)\n        {\n            prefixStack.Push(reader.LocalName);\n            var key = ConfigurationPath.Combine(prefixStack.Reverse());\n            if (data.ContainsKey(key))\n            {\n                throw new FormatException(Resources.FormatError_KeyIsDuplicated(key, GetLineInfo(reader)));\n            }\n\n            data[key] = reader.Value;\n            prefixStack.Pop();\n        }\n    }\n}\n"
  },
  {
    "path": "src/Config.Xml/XmlConfigurationSource.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nnamespace Microsoft.Extensions.Configuration.Xml\n{\n    /// <summary>\n    /// An XML file based <see cref=\"FileConfigurationSource\"/>.\n    /// </summary>\n    public class XmlConfigurationSource : FileConfigurationSource\n    {\n        /// <summary>\n        /// Builds the <see cref=\"XmlConfigurationProvider\"/> for this source.\n        /// </summary>\n        /// <param name=\"builder\">The <see cref=\"IConfigurationBuilder\"/>.</param>\n        /// <returns>A <see cref=\"XmlConfigurationProvider\"/></returns>\n        public override IConfigurationProvider Build(IConfigurationBuilder builder)\n        {\n            EnsureDefaults(builder);\n            return new XmlConfigurationProvider(this);\n        }\n    }\n}"
  },
  {
    "path": "src/Config.Xml/XmlDocumentDecryptor.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing System.Security.Cryptography.Xml;\nusing System.Xml;\n\nnamespace Microsoft.Extensions.Configuration.Xml\n{\n    /// <summary>\n    /// Class responsible for encrypting and decrypting XML.\n    /// </summary>\n    public class XmlDocumentDecryptor\n    {\n        /// <summary>\n        /// Accesses the singleton decryptor instance.\n        /// </summary>\n        public static readonly XmlDocumentDecryptor Instance = new XmlDocumentDecryptor();\n\n        private readonly Func<XmlDocument, EncryptedXml> _encryptedXmlFactory;\n\n        /// <summary>\n        /// Initializes a XmlDocumentDecryptor.\n        /// </summary>\n        // don't create an instance of this directly\n        protected XmlDocumentDecryptor()\n            : this(DefaultEncryptedXmlFactory)\n        {\n        }\n\n        // for testing only\n        internal XmlDocumentDecryptor(Func<XmlDocument, EncryptedXml> encryptedXmlFactory)\n        {\n            _encryptedXmlFactory = encryptedXmlFactory;\n        }\n\n        private static bool ContainsEncryptedData(XmlDocument document)\n        {\n            // EncryptedXml will simply decrypt the document in-place without telling\n            // us that it did so, so we need to perform a check to see if EncryptedXml\n            // will actually do anything. The below check for an encrypted data blob\n            // is the same one that EncryptedXml would have performed.\n            var namespaceManager = new XmlNamespaceManager(document.NameTable);\n            namespaceManager.AddNamespace(\"enc\", \"http://www.w3.org/2001/04/xmlenc#\");\n            return (document.SelectSingleNode(\"//enc:EncryptedData\", namespaceManager) != null);\n        }\n\n        /// <summary>\n        /// Returns an XmlReader that decrypts data transparently.\n        /// </summary>\n        public XmlReader CreateDecryptingXmlReader(Stream input, XmlReaderSettings settings)\n        {\n            // XML-based configurations aren't really all that big, so we can buffer\n            // the whole thing in memory while we determine decryption operations.\n            var memStream = new MemoryStream();\n            input.CopyTo(memStream);\n            memStream.Position = 0;\n\n            // First, consume the entire XmlReader as an XmlDocument.\n            var document = new XmlDocument();\n            using (var reader = XmlReader.Create(memStream, settings))\n            {\n                document.Load(reader);\n            }\n            memStream.Position = 0;\n\n            if (ContainsEncryptedData(document))\n            {\n                return DecryptDocumentAndCreateXmlReader(document);\n            }\n            else\n            {\n                // If no decryption would have taken place, return a new fresh reader\n                // based on the memory stream (which doesn't need to be disposed).\n                return XmlReader.Create(memStream, settings);\n            }\n        }\n\n        /// <summary>\n        /// Creates a reader that can decrypt an encrypted XML document.\n        /// </summary>\n        /// <param name=\"document\">The document.</param>\n        /// <returns>An XmlReader which can read the document.</returns>\n        protected virtual XmlReader DecryptDocumentAndCreateXmlReader(XmlDocument document)\n        {\n            // Perform the actual decryption step, updating the XmlDocument in-place.\n            var encryptedXml = _encryptedXmlFactory(document);\n            encryptedXml.DecryptDocument();\n\n            // Finally, return the new XmlReader from the updated XmlDocument.\n            // Error messages based on this XmlReader won't show line numbers,\n            // but that's fine since we transformed the document anyway.\n            return document.CreateNavigator().ReadSubtree();\n        }\n\n        private static EncryptedXml DefaultEncryptedXmlFactory(XmlDocument document)\n            => new EncryptedXml(document);\n    }\n}\n"
  },
  {
    "path": "src/Config.Xml/baseline.netcore.json",
    "content": "{\n  \"AssemblyIdentity\": \"Microsoft.Extensions.Configuration.Xml, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\",\n  \"Types\": [\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.XmlConfigurationExtensions\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"Abstract\": true,\n      \"Static\": true,\n      \"Sealed\": true,\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddXmlFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddXmlFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddXmlFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddXmlFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"provider\",\n              \"Type\": \"Microsoft.Extensions.FileProviders.IFileProvider\"\n            },\n            {\n              \"Name\": \"path\",\n              \"Type\": \"System.String\"\n            },\n            {\n              \"Name\": \"optional\",\n              \"Type\": \"System.Boolean\"\n            },\n            {\n              \"Name\": \"reloadOnChange\",\n              \"Type\": \"System.Boolean\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"AddXmlFile\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            },\n            {\n              \"Name\": \"configureSource\",\n              \"Type\": \"System.Action<Microsoft.Extensions.Configuration.Xml.XmlConfigurationSource>\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\",\n          \"Static\": true,\n          \"Extension\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Xml.XmlConfigurationProvider\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationProvider\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Load\",\n          \"Parameters\": [\n            {\n              \"Name\": \"stream\",\n              \"Type\": \"System.IO.Stream\"\n            }\n          ],\n          \"ReturnType\": \"System.Void\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [\n            {\n              \"Name\": \"source\",\n              \"Type\": \"Microsoft.Extensions.Configuration.Xml.XmlConfigurationSource\"\n            }\n          ],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Xml.XmlConfigurationSource\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"BaseType\": \"Microsoft.Extensions.Configuration.FileConfigurationSource\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"Build\",\n          \"Parameters\": [\n            {\n              \"Name\": \"builder\",\n              \"Type\": \"Microsoft.Extensions.Configuration.IConfigurationBuilder\"\n            }\n          ],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.IConfigurationProvider\",\n          \"Virtual\": true,\n          \"Override\": true,\n          \"ImplementedInterface\": \"Microsoft.Extensions.Configuration.IConfigurationSource\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    },\n    {\n      \"Name\": \"Microsoft.Extensions.Configuration.Xml.XmlDocumentDecryptor\",\n      \"Visibility\": \"Public\",\n      \"Kind\": \"Class\",\n      \"ImplementedInterfaces\": [],\n      \"Members\": [\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"CreateDecryptingXmlReader\",\n          \"Parameters\": [\n            {\n              \"Name\": \"input\",\n              \"Type\": \"System.IO.Stream\"\n            },\n            {\n              \"Name\": \"settings\",\n              \"Type\": \"System.Xml.XmlReaderSettings\"\n            }\n          ],\n          \"ReturnType\": \"System.Xml.XmlReader\",\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Method\",\n          \"Name\": \"DecryptDocumentAndCreateXmlReader\",\n          \"Parameters\": [\n            {\n              \"Name\": \"document\",\n              \"Type\": \"System.Xml.XmlDocument\"\n            }\n          ],\n          \"ReturnType\": \"System.Xml.XmlReader\",\n          \"Virtual\": true,\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Constructor\",\n          \"Name\": \".ctor\",\n          \"Parameters\": [],\n          \"Visibility\": \"Protected\",\n          \"GenericParameter\": []\n        },\n        {\n          \"Kind\": \"Field\",\n          \"Name\": \"Instance\",\n          \"Parameters\": [],\n          \"ReturnType\": \"Microsoft.Extensions.Configuration.Xml.XmlDocumentDecryptor\",\n          \"Static\": true,\n          \"ReadOnly\": true,\n          \"Visibility\": \"Public\",\n          \"GenericParameter\": []\n        }\n      ],\n      \"GenericParameters\": []\n    }\n  ]\n}"
  },
  {
    "path": "src/Directory.Build.props",
    "content": "<Project>\n  <Import Project=\"..\\Directory.Build.props\" />\n\n  <PropertyGroup>\n    <GenerateDocumentationFile>true</GenerateDocumentationFile>\n    <PackageTags>configuration</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Internal.AspNetCore.Sdk\" PrivateAssets=\"All\" Version=\"$(InternalAspNetCoreSdkPackageVersion)\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "test/Config.AzureKeyVault.Test/AzureKeyVaultConfigurationTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Azure.KeyVault;\nusing Microsoft.Azure.KeyVault.Models;\nusing Microsoft.Extensions.Configuration.Test;\nusing Microsoft.Rest.Azure;\nusing Moq;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.AzureKeyVault.Test\n{\n    public class AzureKeyVaultConfigurationTest\n    {\n        private const string VaultUri = \"https://vault\";\n\n        [Fact]\n        public void LoadsAllSecretsFromVault()\n        {\n            var client = new Mock<IKeyVaultClient>(MockBehavior.Strict);\n            var secret1Id = GetSecretId(\"Secret1\");\n            var secret2Id = GetSecretId(\"Secret2\");\n\n            client.Setup(c => c.GetSecretsAsync(VaultUri)).ReturnsAsync(new PageMock()\n            {\n                NextPageLink = \"next\",\n                Value = new[] { new SecretItem { Id = secret1Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretsNextAsync(\"next\")).ReturnsAsync(new PageMock()\n            {\n                Value = new[] { new SecretItem { Id = secret2Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretAsync(secret1Id)).ReturnsAsync(new SecretBundle() { Value = \"Value1\", Id = secret1Id });\n            client.Setup(c => c.GetSecretAsync(secret2Id)).ReturnsAsync(new SecretBundle() { Value = \"Value2\", Id = secret2Id });\n\n            // Act\n            var provider = new AzureKeyVaultConfigurationProvider(client.Object, VaultUri, new DefaultKeyVaultSecretManager());\n            provider.Load();\n\n            // Assert\n            client.VerifyAll();\n\n            var childKeys = provider.GetChildKeys(Enumerable.Empty<string>(), null).ToArray();\n            Assert.Equal(new[] { \"Secret1\", \"Secret2\" }, childKeys);\n            Assert.Equal(\"Value1\", provider.Get(\"Secret1\"));\n            Assert.Equal(\"Value2\", provider.Get(\"Secret2\"));\n        }\n\n        [Fact]\n        public void DoesNotLoadFilteredItems()\n        {\n            var client = new Mock<IKeyVaultClient>(MockBehavior.Strict);\n            var secret1Id = GetSecretId(\"Secret1\");\n            var secret2Id = GetSecretId(\"Secret2\");\n\n            client.Setup(c => c.GetSecretsAsync(VaultUri)).ReturnsAsync(new PageMock()\n            {\n                Value = new[] { new SecretItem { Id = secret1Id, Attributes = new SecretAttributes { Enabled = true } }, new SecretItem { Id = secret2Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretAsync(secret1Id)).ReturnsAsync(new SecretBundle() { Value = \"Value1\", Id = secret1Id });\n\n            // Act\n            var provider = new AzureKeyVaultConfigurationProvider(client.Object, VaultUri, new EndsWithOneKeyVaultSecretManager());\n            provider.Load();\n\n            // Assert\n            client.VerifyAll();\n\n            var childKeys = provider.GetChildKeys(Enumerable.Empty<string>(), null).ToArray();\n            Assert.Equal(new[] { \"Secret1\" }, childKeys);\n            Assert.Equal(\"Value1\", provider.Get(\"Secret1\"));\n        }\n\n        [Fact]\n        public void DoesNotLoadDisabledItems()\n        {\n            var client = new Mock<IKeyVaultClient>(MockBehavior.Strict);\n            var secret1Id = GetSecretId(\"Secret1\");\n            var secret2Id = GetSecretId(\"Secret2\");\n            var secret3Id = GetSecretId(\"Secret3\");\n            var secret4Id = GetSecretId(\"Secret4\");\n\n            client.Setup(c => c.GetSecretsAsync(VaultUri)).ReturnsAsync(new PageMock()\n            {\n                NextPageLink = \"next\",\n                Value = new[] { new SecretItem { Id = secret1Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretsNextAsync(\"next\")).ReturnsAsync(new PageMock()\n            {\n                Value = new[]\n                {\n                    new SecretItem { Id = secret2Id, Attributes = new SecretAttributes { Enabled = false } },\n                    new SecretItem { Id = secret3Id, Attributes = new SecretAttributes { Enabled = null } },\n                    new SecretItem { Id = secret4Id, Attributes = null },\n                }\n            });\n\n            client.Setup(c => c.GetSecretAsync(secret1Id)).ReturnsAsync(new SecretBundle() { Value = \"Value1\", Id = secret1Id });\n\n            // Act\n            var provider = new AzureKeyVaultConfigurationProvider(client.Object, VaultUri, new DefaultKeyVaultSecretManager());\n            provider.Load();\n\n            // Assert\n            client.VerifyAll();\n\n            var childKeys = provider.GetChildKeys(Enumerable.Empty<string>(), null).ToArray();\n            Assert.Equal(new[] { \"Secret1\" }, childKeys);\n            Assert.Equal(\"Value1\", provider.Get(\"Secret1\"));\n            Assert.Throws<InvalidOperationException>(() => provider.Get(\"Secret2\"));\n            Assert.Throws<InvalidOperationException>(() => provider.Get(\"Secret3\"));\n            Assert.Throws<InvalidOperationException>(() => provider.Get(\"Secret4\"));\n        }\n\n        [Fact]\n        public void SupportsReload()\n        {\n            var client = new Mock<IKeyVaultClient>(MockBehavior.Strict);\n            var secret1Id = GetSecretId(\"Secret1\");\n            var value = \"Value1\";\n\n            client.Setup(c => c.GetSecretsAsync(VaultUri)).ReturnsAsync(new PageMock()\n            {\n                Value = new[] { new SecretItem { Id = secret1Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretAsync(secret1Id)).Returns((string id) => Task.FromResult(new SecretBundle() { Value = value, Id = id }));\n\n            // Act & Assert\n            var provider = new AzureKeyVaultConfigurationProvider(client.Object, VaultUri, new DefaultKeyVaultSecretManager());\n            provider.Load();\n\n            client.VerifyAll();\n            Assert.Equal(\"Value1\", provider.Get(\"Secret1\"));\n\n            value = \"Value2\";\n            provider.Load();\n            Assert.Equal(\"Value2\", provider.Get(\"Secret1\"));\n        }\n\n        [Fact]\n        public void ReplaceDoubleMinusInKeyName()\n        {\n            var client = new Mock<IKeyVaultClient>(MockBehavior.Strict);\n            var secret1Id = GetSecretId(\"Section--Secret1\");\n\n            client.Setup(c => c.GetSecretsAsync(VaultUri)).ReturnsAsync(new PageMock()\n            {\n                Value = new[] { new SecretItem { Id = secret1Id, Attributes = new SecretAttributes { Enabled = true } } }\n            });\n\n            client.Setup(c => c.GetSecretAsync(secret1Id)).ReturnsAsync(new SecretBundle() { Value = \"Value1\", Id = secret1Id });\n\n            // Act\n            var provider = new AzureKeyVaultConfigurationProvider(client.Object, VaultUri, new DefaultKeyVaultSecretManager());\n            provider.Load();\n\n            // Assert\n            client.VerifyAll();\n\n            Assert.Equal(\"Value1\", provider.Get(\"Section:Secret1\"));\n        }\n\n        [Fact]\n        public void ConstructorThrowsForNullManager()\n        {\n            Assert.Throws<ArgumentNullException>(() => new AzureKeyVaultConfigurationProvider(Mock.Of<IKeyVaultClient>(), VaultUri, null));\n        }\n\n        private string GetSecretId(string name) => new SecretIdentifier(VaultUri, name).Identifier;\n\n        private class EndsWithOneKeyVaultSecretManager : DefaultKeyVaultSecretManager\n        {\n            public override bool Load(SecretItem secret)\n            {\n                return secret.Identifier.Name.EndsWith(\"1\");\n            }\n        }\n\n        private class PageMock: IPage<SecretItem>\n        {\n            public IEnumerable<SecretItem> Value { get; set; }\n\n            public IEnumerator<SecretItem> GetEnumerator()\n            {\n                return Value.GetEnumerator();\n            }\n\n            IEnumerator IEnumerable.GetEnumerator()\n            {\n                return GetEnumerator();\n            }\n\n            public string NextPageLink { get; set; }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.AzureKeyVault.Test/Config.AzureKeyVault.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.AzureKeyVault.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.AzureKeyVault.Test</RootNamespace>\n    <TargetFramework>net461</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.AzureKeyVault\\Config.AzureKeyVault.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"Moq\" Version=\"$(MoqPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Binder.Test/Config.Binder.Test.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Binder.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Binder.Test</RootNamespace>\n    <TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>\n    <TargetFrameworks Condition=\" '$(OS)' != 'Windows_NT' \">netcoreapp2.2</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.Binder\\Config.Binder.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Binder.Test/ConfigurationBinderTests.cs",
    "content": "// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Reflection;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Binder.Test\n{\n    public class ConfigurationBinderTests\n    {\n        public class ComplexOptions\n        {\n            public ComplexOptions()\n            {\n                Nested = new NestedOptions();\n                Virtual = \"complex\";\n            }\n\n            public NestedOptions Nested { get; set; }\n            public int Integer { get; set; }\n            public bool Boolean { get; set; }\n            public virtual string Virtual { get; set; }\n            public object Object { get; set; }\n\n            public string PrivateSetter { get; private set; }\n            public string ProtectedSetter { get; protected set; }\n            public string InternalSetter { get; internal set; }\n            public static string StaticProperty { get; set; }\n\n            private string PrivateProperty { get; set; }\n            internal string InternalProperty { get; set; }\n            protected string ProtectedProperty { get; set; }\n\n            protected string ProtectedPrivateSet { get; private set; }\n\n            private string PrivateReadOnly { get; }\n            internal string InternalReadOnly { get; }\n            protected string ProtectedReadOnly { get; }\n\n            public string ReadOnly\n            {\n                get { return null; }\n            }\n        }\n\n        public class NestedOptions\n        {\n            public int Integer { get; set; }\n        }\n\n        public class DerivedOptions : ComplexOptions\n        {\n            public override string Virtual\n            {\n                get\n                {\n                    return base.Virtual;\n                }\n                set\n                {\n                    base.Virtual = \"Derived:\" + value;\n                }\n            }\n        }\n\n        public class NullableOptions\n        {\n            public bool? MyNullableBool { get; set; }\n            public int? MyNullableInt { get; set; }\n            public DateTime? MyNullableDateTime { get; set; }\n        }\n\n        public class EnumOptions\n        {\n            public UriKind UriKind { get; set; }\n        }\n\n        public class GenericOptions<T>\n        {\n            public T Value { get; set; }\n        }\n\n        public class ConfigurationInterfaceOptions\n        {\n            public IConfigurationSection Section { get; set; }\n        }\n\n        public class DerivedOptionsWithIConfigurationSection : DerivedOptions\n        {\n            public IConfigurationSection DerivedSection { get; set; }\n        }\n\n        [Fact]\n        public void CanBindIConfigurationSection()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Section:Integer\", \"-2\"},\n                {\"Section:Boolean\", \"TRUe\"},\n                {\"Section:Nested:Integer\", \"11\"},\n                {\"Section:Virtual\", \"Sup\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.Get<ConfigurationInterfaceOptions>();\n\n            var childOptions = options.Section.Get<DerivedOptions>();\n\n            Assert.True(childOptions.Boolean);\n            Assert.Equal(-2, childOptions.Integer);\n            Assert.Equal(11, childOptions.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", childOptions.Virtual);\n\n            Assert.Equal(\"Section\", options.Section.Key);\n            Assert.Equal(\"Section\", options.Section.Path);\n            Assert.Null(options.Section.Value);\n        }\n\n        [Fact]\n        public void CanBindWithKeyOverload()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Section:Integer\", \"-2\"},\n                {\"Section:Boolean\", \"TRUe\"},\n                {\"Section:Nested:Integer\", \"11\"},\n                {\"Section:Virtual\", \"Sup\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new DerivedOptions();\n            config.Bind(\"Section\", options);\n\n            Assert.True(options.Boolean);\n            Assert.Equal(-2, options.Integer);\n            Assert.Equal(11, options.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", options.Virtual);\n        }\n\n        [Fact]\n        public void CanBindIConfigurationSectionWithDerivedOptionsSection()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Section:Integer\", \"-2\"},\n                {\"Section:Boolean\", \"TRUe\"},\n                {\"Section:Nested:Integer\", \"11\"},\n                {\"Section:Virtual\", \"Sup\"},\n                {\"Section:DerivedSection:Nested:Integer\", \"11\"},\n                {\"Section:DerivedSection:Virtual\", \"Sup\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.Get<ConfigurationInterfaceOptions>();\n\n            var childOptions = options.Section.Get<DerivedOptionsWithIConfigurationSection>();\n\n            var childDerivedOptions = childOptions.DerivedSection.Get<DerivedOptions>();\n\n            Assert.True(childOptions.Boolean);\n            Assert.Equal(-2, childOptions.Integer);\n            Assert.Equal(11, childOptions.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", childOptions.Virtual);\n            Assert.Equal(11, childDerivedOptions.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", childDerivedOptions.Virtual);\n\n            Assert.Equal(\"Section\", options.Section.Key);\n            Assert.Equal(\"Section\", options.Section.Path);\n            Assert.Equal(\"DerivedSection\", childOptions.DerivedSection.Key);\n            Assert.Equal(\"Section:DerivedSection\", childOptions.DerivedSection.Path);\n            Assert.Null(options.Section.Value);\n        }\n\n        [Fact]\n        public void EmptyStringIsNullable()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"empty\", \"\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            Assert.Null(config.GetValue<bool?>(\"empty\"));\n            Assert.Null(config.GetValue<int?>(\"empty\"));\n        }\n\n        [Fact]\n        public void GetScalarNullable()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", \"-2\"},\n                {\"Boolean\", \"TRUe\"},\n                {\"Nested:Integer\", \"11\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            Assert.True(config.GetValue<bool?>(\"Boolean\"));\n            Assert.Equal(-2, config.GetValue<int?>(\"Integer\"));\n            Assert.Equal(11, config.GetValue<int?>(\"Nested:Integer\"));\n        }\n\n        [Fact]\n        public void CanBindToObjectProperty()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Object\", \"whatever\" }\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new ComplexOptions();\n            config.Bind(options);\n\n            Assert.Equal(\"whatever\", options.Object);\n        }\n\n        [Fact]\n        public void GetNullValue()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", null},\n                {\"Boolean\", null},\n                {\"Nested:Integer\", null},\n                {\"Object\", null }\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            Assert.False(config.GetValue<bool>(\"Boolean\"));\n            Assert.Equal(0, config.GetValue<int>(\"Integer\"));\n            Assert.Equal(0, config.GetValue<int>(\"Nested:Integer\"));\n            Assert.Null(config.GetValue<ComplexOptions>(\"Object\"));\n            Assert.False(config.GetSection(\"Boolean\").Get<bool>());\n            Assert.Equal(0, config.GetSection(\"Integer\").Get<int>());\n            Assert.Equal(0, config.GetSection(\"Nested:Integer\").Get<int>());\n            Assert.Null(config.GetSection(\"Object\").Get<ComplexOptions>());\n        }\n\n        [Fact]\n        public void GetDefaultsWhenDataDoesNotExist()\n        {\n            var dic = new Dictionary<string, string>\n            {\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            Assert.False(config.GetValue<bool>(\"Boolean\"));\n            Assert.Equal(0, config.GetValue<int>(\"Integer\"));\n            Assert.Equal(0, config.GetValue<int>(\"Nested:Integer\"));\n            Assert.Null(config.GetValue<ComplexOptions>(\"Object\"));\n            Assert.True(config.GetValue(\"Boolean\", true));\n            Assert.Equal(3, config.GetValue(\"Integer\", 3));\n            Assert.Equal(1, config.GetValue(\"Nested:Integer\", 1));\n            var foo = new ComplexOptions();\n            Assert.Same(config.GetValue(\"Object\", foo), foo);\n        }\n\n        [Fact]\n        public void GetUri()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"AnUri\", \"http://www.bing.com\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var uri = config.GetValue<Uri>(\"AnUri\");\n\n            Assert.Equal(\"http://www.bing.com\", uri.OriginalString);\n        }\n\n        [Theory]\n        [InlineData(\"2147483647\", typeof(int))]\n        [InlineData(\"4294967295\", typeof(uint))]\n        [InlineData(\"32767\", typeof(short))]\n        [InlineData(\"65535\", typeof(ushort))]\n        [InlineData(\"-9223372036854775808\", typeof(long))]\n        [InlineData(\"18446744073709551615\", typeof(ulong))]\n        [InlineData(\"trUE\", typeof(bool))]\n        [InlineData(\"255\", typeof(byte))]\n        [InlineData(\"127\", typeof(sbyte))]\n        [InlineData(\"\\uffff\", typeof(char))]\n        [InlineData(\"79228162514264337593543950335\", typeof(decimal))]\n        [InlineData(\"1.79769e+308\", typeof(double))]\n        [InlineData(\"3.40282347E+38\", typeof(float))]\n        [InlineData(\"2015-12-24T07:34:42-5:00\", typeof(DateTime))]\n        [InlineData(\"12/24/2015 13:44:55 +4\", typeof(DateTimeOffset))]\n        [InlineData(\"99.22:22:22.1234567\", typeof(TimeSpan))]\n        [InlineData(\"http://www.bing.com\", typeof(Uri))]\n        // enum test\n        [InlineData(\"Constructor\", typeof(AttributeTargets))]\n        [InlineData(\"CA761232-ED42-11CE-BACD-00AA0057B223\", typeof(Guid))]\n        public void CanReadAllSupportedTypes(string value, Type type)\n        {\n            // arrange\n            var dic = new Dictionary<string, string>\n            {\n                {\"Value\", value}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var optionsType = typeof(GenericOptions<>).MakeGenericType(type);\n            var options = Activator.CreateInstance(optionsType);\n            var expectedValue = TypeDescriptor.GetConverter(type).ConvertFromInvariantString(value);\n\n            // act\n            config.Bind(options);\n            var optionsValue = options.GetType().GetProperty(\"Value\").GetValue(options);\n            var getValueValue = config.GetValue(type, \"Value\");\n            var getValue = config.GetSection(\"Value\").Get(type);\n\n            // assert\n            Assert.Equal(expectedValue, optionsValue);\n            Assert.Equal(expectedValue, getValue);\n            Assert.Equal(expectedValue, getValueValue);\n        }\n\n        [Theory]\n        [InlineData(typeof(int))]\n        [InlineData(typeof(uint))]\n        [InlineData(typeof(short))]\n        [InlineData(typeof(ushort))]\n        [InlineData(typeof(long))]\n        [InlineData(typeof(ulong))]\n        [InlineData(typeof(bool))]\n        [InlineData(typeof(byte))]\n        [InlineData(typeof(sbyte))]\n        [InlineData(typeof(char))]\n        [InlineData(typeof(decimal))]\n        [InlineData(typeof(double))]\n        [InlineData(typeof(float))]\n        [InlineData(typeof(DateTime))]\n        [InlineData(typeof(DateTimeOffset))]\n        [InlineData(typeof(TimeSpan))]\n        [InlineData(typeof(AttributeTargets))]\n        [InlineData(typeof(Guid))]\n        public void ConsistentExceptionOnFailedBinding(Type type)\n        {\n            // arrange\n            const string IncorrectValue = \"Invalid data\";\n            var dic = new Dictionary<string, string>\n            {\n                {\"Value\", IncorrectValue}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var optionsType = typeof(GenericOptions<>).MakeGenericType(type);\n            var options = Activator.CreateInstance(optionsType);\n\n            // act\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(options));\n\n            var getValueException = Assert.Throws<InvalidOperationException>(\n                () => config.GetValue(type, \"Value\"));\n\n            var getException = Assert.Throws<InvalidOperationException>(\n                () => config.GetSection(\"Value\").Get(type));\n\n            // assert\n            Assert.NotNull(exception.InnerException);\n            Assert.NotNull(getException.InnerException);\n            Assert.Equal(\n                Resources.FormatError_FailedBinding(IncorrectValue, type),\n                exception.Message);\n            Assert.Equal(\n                Resources.FormatError_FailedBinding(IncorrectValue, type),\n                getException.Message);\n            Assert.Equal(\n                Resources.FormatError_FailedBinding(IncorrectValue, type),\n                getValueException.Message);\n        }\n\n        [Fact]\n        public void BinderIgnoresIndexerProperties()\n        {\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n            config.Bind(new List<string>());\n        }\n\n        [Fact]\n        public void BindCanReadComplexProperties()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", \"-2\"},\n                {\"Boolean\", \"TRUe\"},\n                {\"Nested:Integer\", \"11\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var instance = new ComplexOptions();\n            config.Bind(instance);\n\n            Assert.True(instance.Boolean);\n            Assert.Equal(-2, instance.Integer);\n            Assert.Equal(11, instance.Nested.Integer);\n        }\n\n        [Fact]\n        public void GetCanReadComplexProperties()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", \"-2\"},\n                {\"Boolean\", \"TRUe\"},\n                {\"Nested:Integer\", \"11\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new ComplexOptions();\n            config.Bind(options);\n\n            Assert.True(options.Boolean);\n            Assert.Equal(-2, options.Integer);\n            Assert.Equal(11, options.Nested.Integer);\n        }\n\n        [Fact]\n        public void BindCanReadInheritedProperties()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", \"-2\"},\n                {\"Boolean\", \"TRUe\"},\n                {\"Nested:Integer\", \"11\"},\n                {\"Virtual\", \"Sup\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var instance = new DerivedOptions();\n            config.Bind(instance);\n\n            Assert.True(instance.Boolean);\n            Assert.Equal(-2, instance.Integer);\n            Assert.Equal(11, instance.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", instance.Virtual);\n        }\n\n        [Fact]\n        public void GetCanReadInheritedProperties()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"Integer\", \"-2\"},\n                {\"Boolean\", \"TRUe\"},\n                {\"Nested:Integer\", \"11\"},\n                {\"Virtual\", \"Sup\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new DerivedOptions();\n            config.Bind(options);\n\n            Assert.True(options.Boolean);\n            Assert.Equal(-2, options.Integer);\n            Assert.Equal(11, options.Nested.Integer);\n            Assert.Equal(\"Derived:Sup\", options.Virtual);\n        }\n\n        [Fact]\n        public void GetCanReadStaticProperty()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"StaticProperty\", \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n            var options = new ComplexOptions();\n            config.Bind(options);\n\n            Assert.Equal(\"stuff\", ComplexOptions.StaticProperty);\n        }\n\n        [Fact]\n        public void BindCanReadStaticProperty()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"StaticProperty\", \"other stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var instance = new ComplexOptions();\n            config.Bind(instance);\n\n            Assert.Equal(\"other stuff\", ComplexOptions.StaticProperty);\n        }\n\n        [Fact]\n        public void CanGetComplexOptionsWhichHasAlsoHasValue()\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {\"obj\", \"whut\" },\n                {\"obj:Integer\", \"-2\"},\n                {\"obj:Boolean\", \"TRUe\"},\n                {\"obj:Nested:Integer\", \"11\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.GetSection(\"obj\").Get<ComplexOptions>();\n            Assert.NotNull(options);\n            Assert.True(options.Boolean);\n            Assert.Equal(-2, options.Integer);\n            Assert.Equal(11, options.Nested.Integer);\n        }\n\n        [Theory]\n        [InlineData(\"ReadOnly\")]\n        [InlineData(\"PrivateSetter\")]\n        [InlineData(\"ProtectedSetter\")]\n        [InlineData(\"InternalSetter\")]\n        [InlineData(\"InternalProperty\")]\n        [InlineData(\"PrivateProperty\")]\n        [InlineData(\"ProtectedProperty\")]\n        [InlineData(\"ProtectedPrivateSet\")]\n        public void GetIgnoresTests(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.Get<ComplexOptions>();\n            Assert.Null(options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Theory]\n        [InlineData(\"PrivateSetter\")]\n        [InlineData(\"ProtectedSetter\")]\n        [InlineData(\"InternalSetter\")]\n        [InlineData(\"InternalProperty\")]\n        [InlineData(\"PrivateProperty\")]\n        [InlineData(\"ProtectedProperty\")]\n        [InlineData(\"ProtectedPrivateSet\")]\n        public void GetCanSetNonPublicWhenSet(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.Get<ComplexOptions>(o => o.BindNonPublicProperties = true);\n            Assert.Equal(\"stuff\", options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Theory]\n        [InlineData(\"InternalReadOnly\")]\n        [InlineData(\"PrivateReadOnly\")]\n        [InlineData(\"ProtectedReadOnly\")]\n        public void NonPublicModeGetStillIgnoresReadonly(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = config.Get<ComplexOptions>(o => o.BindNonPublicProperties = true);\n            Assert.Null(options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Theory]\n        [InlineData(\"ReadOnly\")]\n        [InlineData(\"PrivateSetter\")]\n        [InlineData(\"ProtectedSetter\")]\n        [InlineData(\"InternalSetter\")]\n        [InlineData(\"InternalProperty\")]\n        [InlineData(\"PrivateProperty\")]\n        [InlineData(\"ProtectedProperty\")]\n        [InlineData(\"ProtectedPrivateSet\")]\n        public void BindIgnoresTests(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new ComplexOptions();\n            config.Bind(options);\n\n            Assert.Null(options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Theory]\n        [InlineData(\"PrivateSetter\")]\n        [InlineData(\"ProtectedSetter\")]\n        [InlineData(\"InternalSetter\")]\n        [InlineData(\"InternalProperty\")]\n        [InlineData(\"PrivateProperty\")]\n        [InlineData(\"ProtectedProperty\")]\n        [InlineData(\"ProtectedPrivateSet\")]\n        public void BindCanSetNonPublicWhenSet(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new ComplexOptions();\n            config.Bind(options, o => o.BindNonPublicProperties = true );\n            Assert.Equal(\"stuff\", options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Theory]\n        [InlineData(\"InternalReadOnly\")]\n        [InlineData(\"PrivateReadOnly\")]\n        [InlineData(\"ProtectedReadOnly\")]\n        public void NonPublicModeBindStillIgnoresReadonly(string property)\n        {\n            var dic = new Dictionary<string, string>\n            {\n                {property, \"stuff\"},\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dic);\n            var config = configurationBuilder.Build();\n\n            var options = new ComplexOptions();\n            config.Bind(options, o => o.BindNonPublicProperties = true);\n            Assert.Null(options.GetType().GetTypeInfo().GetDeclaredProperty(property).GetValue(options));\n        }\n\n        [Fact]\n        public void ExceptionWhenTryingToBindToInterface()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ISomeInterfaceProperty:Subkey\", \"x\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(new TestOptions()));\n            Assert.Equal(\n                Resources.FormatError_CannotActivateAbstractOrInterface(typeof(ISomeInterface)),\n                exception.Message);\n        }\n\n        [Fact]\n        public void ExceptionWhenTryingToBindClassWithoutParameterlessConstructor()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ClassWithoutPublicConstructorProperty:Subkey\", \"x\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(new TestOptions()));\n            Assert.Equal(\n                Resources.FormatError_MissingParameterlessConstructor(typeof(ClassWithoutPublicConstructor)),\n                exception.Message);\n        }\n\n        [Fact]\n        public void ExceptionWhenTryingToBindToTypeThrowsWhenActivated()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ThrowsWhenActivatedProperty:subkey\", \"x\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(new TestOptions()));\n            Assert.NotNull(exception.InnerException);\n            Assert.Equal(\n                Resources.FormatError_FailedToActivate(typeof(ThrowsWhenActivated)),\n                exception.Message);\n        }\n\n        [Fact]\n        public void ExceptionIncludesKeyOfFailedBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"NestedOptionsProperty:NestedOptions2Property:ISomeInterfaceProperty:subkey\", \"x\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(new TestOptions()));\n            Assert.Equal(\n                Resources.FormatError_CannotActivateAbstractOrInterface(typeof(ISomeInterface)),\n                exception.Message);\n        }\n\n        private interface ISomeInterface\n        {\n        }\n\n        private class ClassWithoutPublicConstructor\n        {\n            private ClassWithoutPublicConstructor()\n            {\n            }\n        }\n\n        private class ThrowsWhenActivated\n        {\n            public ThrowsWhenActivated()\n            {\n                throw new Exception();\n            }\n        }\n\n        private class NestedOptions1\n        {\n            public NestedOptions2 NestedOptions2Property { get; set; }\n        }\n\n        private class NestedOptions2\n        {\n            public ISomeInterface ISomeInterfaceProperty { get; set; }\n        }\n\n        private class TestOptions\n        {\n            public ISomeInterface ISomeInterfaceProperty { get; set; }\n\n            public ClassWithoutPublicConstructor ClassWithoutPublicConstructorProperty { get; set; }\n\n            public int IntProperty { get; set; }\n\n            public ThrowsWhenActivated ThrowsWhenActivatedProperty { get; set; }\n\n            public NestedOptions1 NestedOptionsProperty { get; set; }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Binder.Test/ConfigurationCollectionBindingTests.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Binder.Test\n{\n    public class ConfigurationCollectionBinding\n    {\n        [Fact]\n        public void GetList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringList:0\", \"val0\"},\n                {\"StringList:1\", \"val1\"},\n                {\"StringList:2\", \"val2\"},\n                {\"StringList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var list = new List<string>();\n            config.GetSection(\"StringList\").Bind(list);\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(\"val0\", list[0]);\n            Assert.Equal(\"val1\", list[1]);\n            Assert.Equal(\"val2\", list[2]);\n            Assert.Equal(\"valx\", list[3]);\n        }\n\n        [Fact]\n        public void GetListNullValues()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringList:0\", null},\n                {\"StringList:1\", null},\n                {\"StringList:2\", null},\n                {\"StringList:x\", null}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var list = new List<string>();\n            config.GetSection(\"StringList\").Bind(list);\n\n            Assert.Empty(list);\n        }\n\n        [Fact]\n        public void GetListInvalidValues()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"InvalidList:0\", \"true\"},\n                {\"InvalidList:1\", \"invalid\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var list = new List<bool>();\n            config.GetSection(\"InvalidList\").Bind(list);\n\n            Assert.Single(list);\n            Assert.True(list[0]);\n        }\n\n        [Fact]\n        public void BindList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringList:0\", \"val0\"},\n                {\"StringList:1\", \"val1\"},\n                {\"StringList:2\", \"val2\"},\n                {\"StringList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var list = new List<string>();\n            config.GetSection(\"StringList\").Bind(list);\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(\"val0\", list[0]);\n            Assert.Equal(\"val1\", list[1]);\n            Assert.Equal(\"val2\", list[2]);\n            Assert.Equal(\"valx\", list[3]);\n        }\n\n        [Fact]\n        public void GetObjectList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ObjectList:0:Integer\", \"30\"},\n                {\"ObjectList:1:Integer\", \"31\"},\n                {\"ObjectList:2:Integer\", \"32\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new List<NestedOptions>();\n            config.GetSection(\"ObjectList\").Bind(options);\n\n            Assert.Equal(3, options.Count);\n\n            Assert.Equal(30, options[0].Integer);\n            Assert.Equal(31, options[1].Integer);\n            Assert.Equal(32, options[2].Integer);\n        }\n\n        [Fact]\n        public void GetStringDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringDictionary:abc\", \"val_1\"},\n                {\"StringDictionary:def\", \"val_2\"},\n                {\"StringDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new Dictionary<string, string>();\n            config.GetSection(\"StringDictionary\").Bind(options);\n\n            Assert.Equal(3, options.Count);\n\n            Assert.Equal(\"val_1\", options[\"abc\"]);\n            Assert.Equal(\"val_2\", options[\"def\"]);\n            Assert.Equal(\"val_3\", options[\"ghi\"]);\n        }\n\n        [Fact]\n        public void GetEnumDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"EnumDictionary:abc\", \"val_1\"},\n                {\"EnumDictionary:def\", \"val_2\"},\n                {\"EnumDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new Dictionary<KeyEnum, string>();\n            config.GetSection(\"EnumDictionary\").Bind(options);\n\n            Assert.Equal(3, options.Count);\n\n            Assert.Equal(\"val_1\", options[KeyEnum.abc]);\n            Assert.Equal(\"val_2\", options[KeyEnum.def]);\n            Assert.Equal(\"val_3\", options[KeyEnum.ghi]);\n        }\n\n        [Fact]\n        public void GetStringList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringList:0\", \"val0\"},\n                {\"StringList:1\", \"val1\"},\n                {\"StringList:2\", \"val2\"},\n                {\"StringList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.StringList;\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(\"val0\", list[0]);\n            Assert.Equal(\"val1\", list[1]);\n            Assert.Equal(\"val2\", list[2]);\n            Assert.Equal(\"valx\", list[3]);\n        }\n\n        [Fact]\n        public void BindStringList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringList:0\", \"val0\"},\n                {\"StringList:1\", \"val1\"},\n                {\"StringList:2\", \"val2\"},\n                {\"StringList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.StringList;\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(\"val0\", list[0]);\n            Assert.Equal(\"val1\", list[1]);\n            Assert.Equal(\"val2\", list[2]);\n            Assert.Equal(\"valx\", list[3]);\n        }\n\n        [Fact]\n        public void GetIntList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IntList:0\", \"42\"},\n                {\"IntList:1\", \"43\"},\n                {\"IntList:2\", \"44\"},\n                {\"IntList:x\", \"45\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.IntList;\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(42, list[0]);\n            Assert.Equal(43, list[1]);\n            Assert.Equal(44, list[2]);\n            Assert.Equal(45, list[3]);\n        }\n\n        [Fact]\n        public void BindIntList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IntList:0\", \"42\"},\n                {\"IntList:1\", \"43\"},\n                {\"IntList:2\", \"44\"},\n                {\"IntList:x\", \"45\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.IntList;\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(42, list[0]);\n            Assert.Equal(43, list[1]);\n            Assert.Equal(44, list[2]);\n            Assert.Equal(45, list[3]);\n        }\n\n        [Fact]\n        public void AlreadyInitializedListBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"AlreadyInitializedList:0\", \"val0\"},\n                {\"AlreadyInitializedList:1\", \"val1\"},\n                {\"AlreadyInitializedList:2\", \"val2\"},\n                {\"AlreadyInitializedList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.AlreadyInitializedList;\n\n            Assert.Equal(5, list.Count);\n\n            Assert.Equal(\"This was here before\", list[0]);\n            Assert.Equal(\"val0\", list[1]);\n            Assert.Equal(\"val1\", list[2]);\n            Assert.Equal(\"val2\", list[3]);\n            Assert.Equal(\"valx\", list[4]);\n        }\n\n        [Fact]\n        public void AlreadyInitializedListInterfaceBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"AlreadyInitializedListInterface:0\", \"val0\"},\n                {\"AlreadyInitializedListInterface:1\", \"val1\"},\n                {\"AlreadyInitializedListInterface:2\", \"val2\"},\n                {\"AlreadyInitializedListInterface:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.AlreadyInitializedListInterface;\n\n            Assert.Equal(5, list.Count);\n\n            Assert.Equal(\"This was here too\", list[0]);\n            Assert.Equal(\"val0\", list[1]);\n            Assert.Equal(\"val1\", list[2]);\n            Assert.Equal(\"val2\", list[3]);\n            Assert.Equal(\"valx\", list[4]);\n        }\n\n        [Fact]\n        public void CustomListBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"CustomList:0\", \"val0\"},\n                {\"CustomList:1\", \"val1\"},\n                {\"CustomList:2\", \"val2\"},\n                {\"CustomList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            var list = options.CustomList;\n\n            Assert.Equal(4, list.Count);\n\n            Assert.Equal(\"val0\", list[0]);\n            Assert.Equal(\"val1\", list[1]);\n            Assert.Equal(\"val2\", list[2]);\n            Assert.Equal(\"valx\", list[3]);\n        }\n\n        [Fact]\n        public void ObjectListBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ObjectList:0:Integer\", \"30\"},\n                {\"ObjectList:1:Integer\", \"31\"},\n                {\"ObjectList:2:Integer\", \"32\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            Assert.Equal(3, options.ObjectList.Count);\n\n            Assert.Equal(30, options.ObjectList[0].Integer);\n            Assert.Equal(31, options.ObjectList[1].Integer);\n            Assert.Equal(32, options.ObjectList[2].Integer);\n        }\n\n        [Fact]\n        public void NestedListsBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"NestedLists:0:0\", \"val00\"},\n                {\"NestedLists:0:1\", \"val01\"},\n                {\"NestedLists:1:0\", \"val10\"},\n                {\"NestedLists:1:1\", \"val11\"},\n                {\"NestedLists:1:2\", \"val12\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            Assert.Equal(2, options.NestedLists.Count);\n            Assert.Equal(2, options.NestedLists[0].Count);\n            Assert.Equal(3, options.NestedLists[1].Count);\n\n            Assert.Equal(\"val00\", options.NestedLists[0][0]);\n            Assert.Equal(\"val01\", options.NestedLists[0][1]);\n            Assert.Equal(\"val10\", options.NestedLists[1][0]);\n            Assert.Equal(\"val11\", options.NestedLists[1][1]);\n            Assert.Equal(\"val12\", options.NestedLists[1][2]);\n        }\n\n        [Fact]\n        public void StringDictionaryBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringDictionary:abc\", \"val_1\"},\n                {\"StringDictionary:def\", \"val_2\"},\n                {\"StringDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.Equal(3, options.StringDictionary.Count);\n\n            Assert.Equal(\"val_1\", options.StringDictionary[\"abc\"]);\n            Assert.Equal(\"val_2\", options.StringDictionary[\"def\"]);\n            Assert.Equal(\"val_3\", options.StringDictionary[\"ghi\"]);\n        }\n\n        [Fact]\n        public void AlreadyInitializedStringDictionaryBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"AlreadyInitializedStringDictionaryInterface:abc\", \"val_1\"},\n                {\"AlreadyInitializedStringDictionaryInterface:def\", \"val_2\"},\n                {\"AlreadyInitializedStringDictionaryInterface:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.NotNull(options.AlreadyInitializedStringDictionaryInterface);\n            Assert.Equal(4, options.AlreadyInitializedStringDictionaryInterface.Count);\n\n            Assert.Equal(\"This was already here\", options.AlreadyInitializedStringDictionaryInterface[\"123\"]);\n            Assert.Equal(\"val_1\", options.AlreadyInitializedStringDictionaryInterface[\"abc\"]);\n            Assert.Equal(\"val_2\", options.AlreadyInitializedStringDictionaryInterface[\"def\"]);\n            Assert.Equal(\"val_3\", options.AlreadyInitializedStringDictionaryInterface[\"ghi\"]);\n        }\n\n        [Fact]\n        public void CanOverrideExistingDictionaryKey()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"abc\", \"override\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new Dictionary<string, string>\n            {\n                {\"abc\", \"default\"}\n            };\n\n            config.Bind(options);\n\n            var optionsCount = options.Count;\n\n            Assert.Equal(1, optionsCount);\n            Assert.Equal(\"override\", options[\"abc\"]);\n        }\n\n        [Fact]\n        public void IntDictionaryBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IntDictionary:abc\", \"42\"},\n                {\"IntDictionary:def\", \"43\"},\n                {\"IntDictionary:ghi\", \"44\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.Equal(3, options.IntDictionary.Count);\n\n            Assert.Equal(42, options.IntDictionary[\"abc\"]);\n            Assert.Equal(43, options.IntDictionary[\"def\"]);\n            Assert.Equal(44, options.IntDictionary[\"ghi\"]);\n        }\n\n        [Fact]\n        public void ObjectDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ObjectDictionary:abc:Integer\", \"1\"},\n                {\"ObjectDictionary:def:Integer\", \"2\"},\n                {\"ObjectDictionary:ghi:Integer\", \"3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.Equal(3, options.ObjectDictionary.Count);\n\n            Assert.Equal(1, options.ObjectDictionary[\"abc\"].Integer);\n            Assert.Equal(2, options.ObjectDictionary[\"def\"].Integer);\n            Assert.Equal(3, options.ObjectDictionary[\"ghi\"].Integer);\n        }\n\n        [Fact]\n        public void ListDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ListDictionary:abc:0\", \"abc_0\"},\n                {\"ListDictionary:abc:1\", \"abc_1\"},\n                {\"ListDictionary:def:0\", \"def_0\"},\n                {\"ListDictionary:def:1\", \"def_1\"},\n                {\"ListDictionary:def:2\", \"def_2\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.Equal(2, options.ListDictionary.Count);\n            Assert.Equal(2, options.ListDictionary[\"abc\"].Count);\n            Assert.Equal(3, options.ListDictionary[\"def\"].Count);\n\n            Assert.Equal(\"abc_0\", options.ListDictionary[\"abc\"][0]);\n            Assert.Equal(\"abc_1\", options.ListDictionary[\"abc\"][1]);\n            Assert.Equal(\"def_0\", options.ListDictionary[\"def\"][0]);\n            Assert.Equal(\"def_1\", options.ListDictionary[\"def\"][1]);\n            Assert.Equal(\"def_2\", options.ListDictionary[\"def\"][2]);\n        }\n\n        [Fact]\n        public void ListInNestedOptionBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ObjectList:0:ListInNestedOption:0\", \"00\"},\n                {\"ObjectList:0:ListInNestedOption:1\", \"01\"},\n                {\"ObjectList:1:ListInNestedOption:0\", \"10\"},\n                {\"ObjectList:1:ListInNestedOption:1\", \"11\"},\n                {\"ObjectList:1:ListInNestedOption:2\", \"12\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithLists();\n            config.Bind(options);\n\n            Assert.Equal(2, options.ObjectList.Count);\n            Assert.Equal(2, options.ObjectList[0].ListInNestedOption.Count);\n            Assert.Equal(3, options.ObjectList[1].ListInNestedOption.Count);\n\n            Assert.Equal(\"00\", options.ObjectList[0].ListInNestedOption[0]);\n            Assert.Equal(\"01\", options.ObjectList[0].ListInNestedOption[1]);\n            Assert.Equal(\"10\", options.ObjectList[1].ListInNestedOption[0]);\n            Assert.Equal(\"11\", options.ObjectList[1].ListInNestedOption[1]);\n            Assert.Equal(\"12\", options.ObjectList[1].ListInNestedOption[2]);\n        }\n\n        [Fact]\n        public void NonStringKeyDictionaryBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"NonStringKeyDictionary:abc\", \"val_1\"},\n                {\"NonStringKeyDictionary:def\", \"val_2\"},\n                {\"NonStringKeyDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithDictionary();\n            config.Bind(options);\n\n            Assert.Empty(options.NonStringKeyDictionary);\n        }\n\n        [Fact]\n        public void GetStringArray()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringArray:0\", \"val0\"},\n                {\"StringArray:1\", \"val1\"},\n                {\"StringArray:2\", \"val2\"},\n                {\"StringArray:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithArrays();\n            config.Bind(options);\n\n            var array = options.StringArray;\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n\n        [Fact]\n        public void BindStringArray()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"StringArray:0\", \"val0\"},\n                {\"StringArray:1\", \"val1\"},\n                {\"StringArray:2\", \"val2\"},\n                {\"StringArray:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var instance = new OptionsWithArrays();\n            config.Bind(instance);\n\n            var array = instance.StringArray;\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n        [Fact]\n        public void GetAlreadyInitializedArray()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"AlreadyInitializedArray:0\", \"val0\"},\n                {\"AlreadyInitializedArray:1\", \"val1\"},\n                {\"AlreadyInitializedArray:2\", \"val2\"},\n                {\"AlreadyInitializedArray:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithArrays();\n            config.Bind(options);\n            var array = options.AlreadyInitializedArray;\n\n            Assert.Equal(7, array.Length);\n\n            Assert.Equal(OptionsWithArrays.InitialValue, array[0]);\n            Assert.Null(array[1]);\n            Assert.Null(array[2]);\n            Assert.Equal(\"val0\", array[3]);\n            Assert.Equal(\"val1\", array[4]);\n            Assert.Equal(\"val2\", array[5]);\n            Assert.Equal(\"valx\", array[6]);\n        }\n\n        [Fact]\n        public void BindAlreadyInitializedArray()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"AlreadyInitializedArray:0\", \"val0\"},\n                {\"AlreadyInitializedArray:1\", \"val1\"},\n                {\"AlreadyInitializedArray:2\", \"val2\"},\n                {\"AlreadyInitializedArray:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new OptionsWithArrays();\n            config.Bind(options);\n\n            var array = options.AlreadyInitializedArray;\n\n            Assert.Equal(7, array.Length);\n\n            Assert.Equal(OptionsWithArrays.InitialValue, array[0]);\n            Assert.Null(array[1]);\n            Assert.Null(array[2]);\n            Assert.Equal(\"val0\", array[3]);\n            Assert.Equal(\"val1\", array[4]);\n            Assert.Equal(\"val2\", array[5]);\n            Assert.Equal(\"valx\", array[6]);\n        }\n\n        [Fact]\n        public void ArrayInNestedOptionBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ObjectArray:0:ArrayInNestedOption:0\", \"0\"},\n                {\"ObjectArray:0:ArrayInNestedOption:1\", \"1\"},\n                {\"ObjectArray:1:ArrayInNestedOption:0\", \"10\"},\n                {\"ObjectArray:1:ArrayInNestedOption:1\", \"11\"},\n                {\"ObjectArray:1:ArrayInNestedOption:2\", \"12\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var options = new OptionsWithArrays();\n            config.Bind(options);\n\n            Assert.Equal(2, options.ObjectArray.Length);\n            Assert.Equal(2, options.ObjectArray[0].ArrayInNestedOption.Length);\n            Assert.Equal(3, options.ObjectArray[1].ArrayInNestedOption.Length);\n\n            Assert.Equal(0, options.ObjectArray[0].ArrayInNestedOption[0]);\n            Assert.Equal(1, options.ObjectArray[0].ArrayInNestedOption[1]);\n            Assert.Equal(10, options.ObjectArray[1].ArrayInNestedOption[0]);\n            Assert.Equal(11, options.ObjectArray[1].ArrayInNestedOption[1]);\n            Assert.Equal(12, options.ObjectArray[1].ArrayInNestedOption[2]);\n        }\n\n        [Fact]\n        public void UnsupportedMultidimensionalArrays()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"DimensionalArray:0:0\", \"a\"},\n                {\"DimensionalArray:0:1\", \"b\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var options = new OptionsWithArrays();\n\n            var exception = Assert.Throws<InvalidOperationException>(\n                () => config.Bind(options));\n            Assert.Equal(\n                Resources.FormatError_UnsupportedMultidimensionalArray(typeof(string[,])),\n                exception.Message);\n        }\n\n        [Fact]\n        public void JaggedArrayBinding()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"JaggedArray:0:0\", \"00\"},\n                {\"JaggedArray:0:1\", \"01\"},\n                {\"JaggedArray:1:0\", \"10\"},\n                {\"JaggedArray:1:1\", \"11\"},\n                {\"JaggedArray:1:2\", \"12\"},\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n            var options = new OptionsWithArrays();\n            config.Bind(options);\n\n            Assert.Equal(2, options.JaggedArray.Length);\n            Assert.Equal(2, options.JaggedArray[0].Length);\n            Assert.Equal(3, options.JaggedArray[1].Length);\n\n            Assert.Equal(\"00\", options.JaggedArray[0][0]);\n            Assert.Equal(\"01\", options.JaggedArray[0][1]);\n            Assert.Equal(\"10\", options.JaggedArray[1][0]);\n            Assert.Equal(\"11\", options.JaggedArray[1][1]);\n            Assert.Equal(\"12\", options.JaggedArray[1][2]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedIEnumerable()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IEnumerable:0\", \"val0\"},\n                {\"IEnumerable:1\", \"val1\"},\n                {\"IEnumerable:2\", \"val2\"},\n                {\"IEnumerable:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            var array = options.IEnumerable.ToArray();\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedICollection()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"ICollection:0\", \"val0\"},\n                {\"ICollection:1\", \"val1\"},\n                {\"ICollection:2\", \"val2\"},\n                {\"ICollection:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            var array = options.ICollection.ToArray();\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedIReadOnlyCollection()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IReadOnlyCollection:0\", \"val0\"},\n                {\"IReadOnlyCollection:1\", \"val1\"},\n                {\"IReadOnlyCollection:2\", \"val2\"},\n                {\"IReadOnlyCollection:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            var array = options.IReadOnlyCollection.ToArray();\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedIReadOnlyList()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IReadOnlyList:0\", \"val0\"},\n                {\"IReadOnlyList:1\", \"val1\"},\n                {\"IReadOnlyList:2\", \"val2\"},\n                {\"IReadOnlyList:x\", \"valx\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            var array = options.IReadOnlyList.ToArray();\n\n            Assert.Equal(4, array.Length);\n\n            Assert.Equal(\"val0\", array[0]);\n            Assert.Equal(\"val1\", array[1]);\n            Assert.Equal(\"val2\", array[2]);\n            Assert.Equal(\"valx\", array[3]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedIDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IDictionary:abc\", \"val_1\"},\n                {\"IDictionary:def\", \"val_2\"},\n                {\"IDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            Assert.Equal(3, options.IDictionary.Count);\n\n            Assert.Equal(\"val_1\", options.IDictionary[\"abc\"]);\n            Assert.Equal(\"val_2\", options.IDictionary[\"def\"]);\n            Assert.Equal(\"val_3\", options.IDictionary[\"ghi\"]);\n        }\n\n        [Fact]\n        public void CanBindUninitializedIReadOnlyDictionary()\n        {\n            var input = new Dictionary<string, string>\n            {\n                {\"IReadOnlyDictionary:abc\", \"val_1\"},\n                {\"IReadOnlyDictionary:def\", \"val_2\"},\n                {\"IReadOnlyDictionary:ghi\", \"val_3\"}\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(input);\n            var config = configurationBuilder.Build();\n\n            var options = new UnintializedCollectionsOptions();\n            config.Bind(options);\n\n            Assert.Equal(3, options.IReadOnlyDictionary.Count);\n\n            Assert.Equal(\"val_1\", options.IReadOnlyDictionary[\"abc\"]);\n            Assert.Equal(\"val_2\", options.IReadOnlyDictionary[\"def\"]);\n            Assert.Equal(\"val_3\", options.IReadOnlyDictionary[\"ghi\"]);\n        }\n\n        private class UnintializedCollectionsOptions\n        {\n            public IEnumerable<string> IEnumerable { get; set; }\n            public IDictionary<string, string> IDictionary { get; set; }\n            public ICollection<string> ICollection { get; set; }\n            public IList<string> IList { get; set; }\n            public IReadOnlyCollection<string> IReadOnlyCollection { get; set; }\n            public IReadOnlyList<string> IReadOnlyList { get; set; }\n            public IReadOnlyDictionary<string, string> IReadOnlyDictionary { get; set; }\n        }\n\n        private class CustomList : List<string>\n        {\n            // Add an overload, just to make sure binding picks the right Add method\n            public void Add(string a, string b)\n            {\n            }\n        }\n\n        private class CustomDictionary<T> : Dictionary<string, T>\n        {\n        }\n\n        private class NestedOptions\n        {\n            public int Integer { get; set; }\n\n            public List<string> ListInNestedOption { get; set; }\n\n            public int[] ArrayInNestedOption { get; set; }\n        }\n\n        private enum KeyEnum\n        {\n            abc,\n            def,\n            ghi\n        }\n\n        private class OptionsWithArrays\n        {\n            public const string InitialValue = \"This was here before\";\n\n            public OptionsWithArrays()\n            {\n                AlreadyInitializedArray = new string[] { InitialValue, null, null };\n            }\n\n            public string[] AlreadyInitializedArray { get; set; }\n\n            public string[] StringArray { get; set; }\n\n            // this should throw becase we do not support multidimensional arrays\n            public string[,] DimensionalArray { get; set; }\n\n            public string[][] JaggedArray { get; set; }\n\n            public NestedOptions[] ObjectArray { get; set; }\n        }\n\n        private class OptionsWithLists\n        {\n            public OptionsWithLists()\n            {\n                AlreadyInitializedList = new List<string>\n                {\n                    \"This was here before\"\n                };\n                AlreadyInitializedListInterface = new List<string>\n                {\n                    \"This was here too\"\n                };\n            }\n\n            public CustomList CustomList { get; set; }\n\n            public List<string> StringList { get; set; }\n\n            public List<int> IntList { get; set; }\n\n            // This cannot be initialized because we cannot\n            // activate an interface\n            public IList<string> StringListInterface { get; set; }\n\n            public List<List<string>> NestedLists { get; set; }\n\n            public List<string> AlreadyInitializedList { get; set; }\n\n            public List<NestedOptions> ObjectList { get; set; }\n\n            public IList<string> AlreadyInitializedListInterface { get; set; }\n        }\n\n        private class OptionsWithDictionary\n        {\n            public OptionsWithDictionary()\n            {\n                AlreadyInitializedStringDictionaryInterface = new Dictionary<string, string>\n                {\n                    [\"123\"] = \"This was already here\"\n                };\n            }\n\n            public Dictionary<string, int> IntDictionary { get; set; }\n\n            public Dictionary<string, string> StringDictionary { get; set; }\n\n            public Dictionary<string, NestedOptions> ObjectDictionary { get; set; }\n\n            public Dictionary<string, List<string>> ListDictionary { get; set; }\n\n            public Dictionary<NestedOptions, string> NonStringKeyDictionary { get; set; }\n\n            // This cannot be initialized because we cannot\n            // activate an interface\n            public IDictionary<string, string> StringDictionaryInterface { get; set; }\n\n            public IDictionary<string, string> AlreadyInitializedStringDictionaryInterface { get; set; }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.CommandLine.Test/CommandLineTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.CommandLine.Test\n{\n    public class CommandLineTest\n    {\n        [Fact]\n        public void IgnoresOnlyUnknownArgs()\n        {\n            var args = new string[]\n                {\n                    \"foo\",\n                    \"/bar=baz\"\n                };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n            cmdLineConfig.Load();\n            Assert.Single(cmdLineConfig.GetChildKeys(new string[0], null));\n            Assert.Equal(\"baz\", cmdLineConfig.Get(\"bar\"));\n        }\n\n        [Fact]\n        public void CanIgnoreValuesInMiddle()\n        {\n            var args = new string[]\n                {\n                    \"Key1=Value1\",\n                    \"--Key2=Value2\",\n                    \"/Key3=Value3\",\n                    \"Bogus1\",\n                    \"--Key4\", \"Value4\",\n                    \"Bogus2\",\n                    \"/Key5\", \"Value5\",\n                    \"Bogus3\"\n                };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n\n            cmdLineConfig.Load();\n\n            Assert.Equal(\"Value1\", cmdLineConfig.Get(\"Key1\"));\n            Assert.Equal(\"Value2\", cmdLineConfig.Get(\"Key2\"));\n            Assert.Equal(\"Value3\", cmdLineConfig.Get(\"Key3\"));\n            Assert.Equal(\"Value4\", cmdLineConfig.Get(\"Key4\"));\n            Assert.Equal(\"Value5\", cmdLineConfig.Get(\"Key5\"));\n            Assert.Equal(5, cmdLineConfig.GetChildKeys(new string[0], null).Count());\n        }\n\n\n        [Fact]\n        public void LoadKeyValuePairsFromCommandLineArgumentsWithoutSwitchMappings()\n        {\n            var args = new string[]\n                {\n                    \"Key1=Value1\",\n                    \"--Key2=Value2\",\n                    \"/Key3=Value3\",\n                    \"--Key4\", \"Value4\",\n                    \"/Key5\", \"Value5\"\n                };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n\n            cmdLineConfig.Load();\n\n            Assert.Equal(\"Value1\", cmdLineConfig.Get(\"Key1\"));\n            Assert.Equal(\"Value2\", cmdLineConfig.Get(\"Key2\"));\n            Assert.Equal(\"Value3\", cmdLineConfig.Get(\"Key3\"));\n            Assert.Equal(\"Value4\", cmdLineConfig.Get(\"Key4\"));\n            Assert.Equal(\"Value5\", cmdLineConfig.Get(\"Key5\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromCommandLineArgumentsWithSwitchMappings()\n        {\n            var args = new string[]\n                {\n                    \"-K1=Value1\",\n                    \"--Key2=Value2\",\n                    \"/Key3=Value3\",\n                    \"--Key4\", \"Value4\",\n                    \"/Key5\", \"Value5\",\n                    \"/Key6=Value6\"\n                };\n            var switchMappings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)\n                {\n                    { \"-K1\", \"LongKey1\" },\n                    { \"--Key2\", \"SuperLongKey2\" },\n                    { \"--Key6\", \"SuchALongKey6\"}\n                };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args, switchMappings);\n\n            cmdLineConfig.Load();\n\n            Assert.Equal(\"Value1\", cmdLineConfig.Get(\"LongKey1\"));\n            Assert.Equal(\"Value2\", cmdLineConfig.Get(\"SuperLongKey2\"));\n            Assert.Equal(\"Value3\", cmdLineConfig.Get(\"Key3\"));\n            Assert.Equal(\"Value4\", cmdLineConfig.Get(\"Key4\"));\n            Assert.Equal(\"Value5\", cmdLineConfig.Get(\"Key5\"));\n            Assert.Equal(\"Value6\", cmdLineConfig.Get(\"SuchALongKey6\"));\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingSwitchMappingsWithDuplicatedKeys()\n        {\n            // Arrange\n            var args = new string[]\n                {\n                    \"-K1=Value1\",\n                    \"--Key2=Value2\",\n                    \"/Key3=Value3\",\n                    \"--Key4\", \"Value4\",\n                    \"/Key5\", \"Value5\"\n                };\n            var switchMappings = new Dictionary<string, string>(StringComparer.Ordinal)\n                {\n                    { \"--KEY1\", \"LongKey1\" },\n                    { \"--key1\", \"SuperLongKey1\" },\n                    { \"-Key2\", \"LongKey2\" },\n                    { \"-KEY2\", \"LongKey2\"}\n                };\n\n            // Find out the duplicate expected be be reported\n            var expectedDup = string.Empty;\n            var set = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n            foreach (var mapping in switchMappings)\n            {\n                if (set.Contains(mapping.Key))\n                {\n                    expectedDup = mapping.Key;\n                    break;\n                }\n\n                set.Add(mapping.Key);\n            }\n\n            var expectedMsg = new ArgumentException(Resources.\n                FormatError_DuplicatedKeyInSwitchMappings(expectedDup), \"switchMappings\").Message;\n\n            // Act\n            var exception = Assert.Throws<ArgumentException>(\n                () => new CommandLineConfigurationProvider(args, switchMappings));\n\n            // Assert\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenSwitchMappingsContainInvalidKey()\n        {\n            var args = new string[]\n                {\n                    \"-K1=Value1\",\n                    \"--Key2=Value2\",\n                    \"/Key3=Value3\",\n                    \"--Key4\", \"Value4\",\n                    \"/Key5\", \"Value5\"\n                };\n            var switchMappings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)\n                {\n                    { \"-K1\", \"LongKey1\" },\n                    { \"--Key2\", \"SuperLongKey2\" },\n                    { \"/Key3\", \"AnotherSuperLongKey3\" }\n                };\n            var expectedMsg = new ArgumentException(Resources.FormatError_InvalidSwitchMapping(\"/Key3\"),\n                \"switchMappings\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(\n                () => new CommandLineConfigurationProvider(args, switchMappings));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenNullIsPassedToConstructorAsArgs()\n        {\n            string[] args = null;\n            var expectedMsg = new ArgumentNullException(\"args\").Message;\n\n            var exception = Assert.Throws<ArgumentNullException>(() => new CommandLineConfigurationProvider(args));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void OverrideValueWhenKeyIsDuplicated()\n        {\n            var args = new string[]\n                {\n                    \"/Key1=Value1\",\n                    \"--Key1=Value2\"\n                };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n\n            cmdLineConfig.Load();\n\n            Assert.Equal(\"Value2\", cmdLineConfig.Get(\"Key1\"));\n        }\n\n        [Fact]\n        public void IgnoreWhenValueForAKeyIsMissing()\n        {\n            var args = new string[]\n            {\n                \"--Key1\", \"Value1\",\n                \"/Key2\" /* The value for Key2 is missing here */\n            };\n\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n            cmdLineConfig.Load();\n            Assert.Single(cmdLineConfig.GetChildKeys(new string[0], null));\n            Assert.Equal(\"Value1\", cmdLineConfig.Get(\"Key1\"));\n        }\n\n        [Fact]\n        public void IgnoreWhenAnArgumentCannotBeRecognized()\n        {\n            var args = new string[]\n            {\n                \"ArgWithoutPrefixAndEqualSign\"\n            };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args);\n            cmdLineConfig.Load();\n            Assert.Empty(cmdLineConfig.GetChildKeys(new string[0], null));\n        }\n\n        [Fact]\n        public void IgnoreWhenShortSwitchNotDefined()\n        {\n            var args = new string[]\n            {\n                \"-Key1\", \"Value1\",\n            };\n            var switchMappings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)\n            {\n                { \"-Key2\", \"LongKey2\" }\n            };\n            var cmdLineConfig = new CommandLineConfigurationProvider(args, switchMappings);\n            cmdLineConfig.Load();\n            Assert.Empty(cmdLineConfig.GetChildKeys(new string[0], \"\"));\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.CommandLine.Test/Config.CommandLine.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.CommandLine.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.CommandLine.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.CommandLine\\Config.CommandLine.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.EnvironmentVariables.Test/Config.EnvironmentVariables.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.EnvironmentVariables.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.EnvironmentVariables.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.EnvironmentVariables\\Config.EnvironmentVariables.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.EnvironmentVariables.Test/EnvironmentVariablesTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.EnvironmentVariables.Test\n{\n    public class EnvironmentVariablesTest\n    {\n        [Fact]\n        public void LoadKeyValuePairsFromEnvironmentDictionary()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"DefaultConnection:ConnectionString\", \"TestConnectionString\"},\n                    {\"DefaultConnection:Provider\", \"SqlClient\"},\n                    {\"Inventory:ConnectionString\", \"AnotherTestConnectionString\"},\n                    {\"Inventory:Provider\", \"MySql\"}\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider(null);\n\n            envConfigSrc.Load(dict);\n\n            Assert.Equal(\"TestConnectionString\", envConfigSrc.Get(\"defaultconnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", envConfigSrc.Get(\"DEFAULTCONNECTION:PROVIDER\"));\n            Assert.Equal(\"AnotherTestConnectionString\", envConfigSrc.Get(\"Inventory:CONNECTIONSTRING\"));\n            Assert.Equal(\"MySql\", envConfigSrc.Get(\"Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromEnvironmentDictionaryWithPrefix()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"DefaultConnection:ConnectionString\", \"TestConnectionString\"},\n                    {\"DefaultConnection:Provider\", \"SqlClient\"},\n                    {\"Inventory:ConnectionString\", \"AnotherTestConnectionString\"},\n                    {\"Inventory:Provider\", \"MySql\"}\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider(\"DefaultConnection:\");\n\n            envConfigSrc.Load(dict);\n\n            Assert.Equal(\"TestConnectionString\", envConfigSrc.Get(\"ConnectionString\"));\n            Assert.Equal(\"SqlClient\", envConfigSrc.Get(\"Provider\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromAzureEnvironment()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"APPSETTING_AppName\", \"TestAppName\"},\n                    {\"CUSTOMCONNSTR_db1\", \"CustomConnStr\"},\n                    {\"SQLCONNSTR_db2\", \"SQLConnStr\"},\n                    {\"MYSQLCONNSTR_db3\", \"MySQLConnStr\"},\n                    {\"SQLAZURECONNSTR_db4\", \"SQLAzureConnStr\"},\n                    {\"CommonEnv\", \"CommonEnvValue\"},\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider();\n\n            envConfigSrc.Load(dict);\n\n            string value;\n            Assert.Equal(\"TestAppName\", envConfigSrc.Get(\"APPSETTING_AppName\"));\n            Assert.False(envConfigSrc.TryGet(\"AppName\", out value));\n            Assert.Equal(\"CustomConnStr\", envConfigSrc.Get(\"ConnectionStrings:db1\"));\n            Assert.Equal(\"SQLConnStr\", envConfigSrc.Get(\"ConnectionStrings:db2\"));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"ConnectionStrings:db2_ProviderName\"));\n            Assert.Equal(\"MySQLConnStr\", envConfigSrc.Get(\"ConnectionStrings:db3\"));\n            Assert.Equal(\"MySql.Data.MySqlClient\", envConfigSrc.Get(\"ConnectionStrings:db3_ProviderName\"));\n            Assert.Equal(\"SQLAzureConnStr\", envConfigSrc.Get(\"ConnectionStrings:db4\"));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"ConnectionStrings:db4_ProviderName\"));\n            Assert.Equal(\"CommonEnvValue\", envConfigSrc.Get(\"CommonEnv\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromAzureEnvironmentWithPrefix()\n        {\n            var dict = new Hashtable()\n            {\n                {\"CUSTOMCONNSTR_db1\", \"CustomConnStr\"},\n                {\"SQLCONNSTR_db2\", \"SQLConnStr\"},\n                {\"MYSQLCONNSTR_db3\", \"MySQLConnStr\"},\n                {\"SQLAZURECONNSTR_db4\", \"SQLAzureConnStr\"},\n                {\"CommonEnv\", \"CommonEnvValue\"},\n            };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider(\"ConnectionStrings:\");\n\n            envConfigSrc.Load(dict);\n\n            Assert.Equal(\"CustomConnStr\", envConfigSrc.Get(\"db1\"));\n            Assert.Equal(\"SQLConnStr\", envConfigSrc.Get(\"db2\"));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"db2_ProviderName\"));\n            Assert.Equal(\"MySQLConnStr\", envConfigSrc.Get(\"db3\"));\n            Assert.Equal(\"MySql.Data.MySqlClient\", envConfigSrc.Get(\"db3_ProviderName\"));\n            Assert.Equal(\"SQLAzureConnStr\", envConfigSrc.Get(\"db4\"));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"db4_ProviderName\"));\n        }\n\n        [Fact]\n        public void LastVariableAddedWhenKeyIsDuplicatedInAzureEnvironment()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"ConnectionStrings:db2\", \"CommonEnvValue\"},\n                    {\"SQLCONNSTR_db2\", \"SQLConnStr\"},\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider();\n\n            envConfigSrc.Load(dict);\n\n            Assert.True(!string.IsNullOrEmpty(envConfigSrc.Get(\"ConnectionStrings:db2\")));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"ConnectionStrings:db2_ProviderName\"));\n        }\n\n        [Fact]\n        public void LastVariableAddedWhenMultipleEnvironmentVariablesWithSameNameButDifferentCaseExist()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"CommonEnv\", \"CommonEnvValue1\"},\n                    {\"commonenv\", \"commonenvValue2\"},\n                    {\"cOMMonEnv\", \"commonenvValue3\"},\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider();\n\n            envConfigSrc.Load(dict);\n\n            Assert.True(!string.IsNullOrEmpty(envConfigSrc.Get(\"cOMMonEnv\")));\n            Assert.True(!string.IsNullOrEmpty(envConfigSrc.Get(\"CommonEnv\")));\n        }\n\n        [Fact]\n        public void ReplaceDoubleUnderscoreInEnvironmentVariables()\n        {\n            var dict = new Hashtable()\n                {\n                    {\"data__ConnectionString\", \"connection\"},\n                    {\"SQLCONNSTR__db1\", \"connStr\"}\n                };\n            var envConfigSrc = new EnvironmentVariablesConfigurationProvider();\n\n            envConfigSrc.Load(dict);\n\n            Assert.Equal(\"connection\", envConfigSrc.Get(\"data:ConnectionString\"));\n            Assert.Equal(\"System.Data.SqlClient\", envConfigSrc.Get(\"ConnectionStrings:_db1_ProviderName\"));\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.FileExtensions.Test/Config.FileExtensions.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.FileExtensions.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.FileExtensions.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.FileExtensions.Test/FileConfigurationBuilderExtensionsTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.FileProviders;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    public class FileConfigurationBuilderExtensionsTest\n    {\n        [Fact]\n        public void SetFileProvider_ThrowsIfBasePathIsNull()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act and Assert\n            var ex = Assert.Throws<ArgumentNullException>(() => configurationBuilder.SetBasePath(basePath: null));\n            Assert.Equal(\"basePath\", ex.ParamName);\n        }\n\n        [Fact]\n        public void SetFileProvider_CheckPropertiesValueOnBuilder()\n        {\n            var expectedBasePath = Directory.GetCurrentDirectory();\n            var configurationBuilder = new ConfigurationBuilder();\n\n            configurationBuilder.SetBasePath(expectedBasePath);\n            var physicalProvider = configurationBuilder.GetFileProvider() as PhysicalFileProvider;\n            Assert.NotNull(physicalProvider);\n            Assert.Equal(EnsureTrailingSlash(expectedBasePath), physicalProvider.Root);\n        }\n\n        [Fact]\n        public void GetFileProvider_ReturnPhysicalProviderWithBaseDirectoryIfNotSet()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            var physicalProvider = configurationBuilder.GetFileProvider() as PhysicalFileProvider;\n\n            string expectedPath;\n\n            expectedPath = AppContext.BaseDirectory;\n\n            Assert.NotNull(physicalProvider);\n            Assert.Equal(EnsureTrailingSlash(expectedPath), physicalProvider.Root);\n        }\n\n        private static string EnsureTrailingSlash(string path)\n        {\n            if (!string.IsNullOrEmpty(path) &&\n                path[path.Length - 1] != Path.DirectorySeparatorChar)\n            {\n                return path + Path.DirectorySeparatorChar;\n            }\n\n            return path;\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.FunctionalTests/ArrayTests.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.FunctionalTests\n{\n    public class ArrayTests : IDisposable\n    {\n        private string _iniConfigFilePath;\n        private string _xmlConfigFilePath;\n        private string _json1ConfigFilePath;\n        private string _json2ConfigFilePath;\n\n        private static readonly string _iniConfigFileContent = @\"\n[address]\n2=ini_2.2.2.2\ni=ini_i.i.i.i\n\";\n        private static readonly string _xmlConfigFileContent = @\"\n<settings>\n    <address name=\"\"4\"\">xml_4.4.4.4</address>\n    <address name=\"\"1\"\">xml_1.1.1.1</address>\n    <address name=\"\"x\"\">xml_x.x.x.x</address>\n</settings>\n\";\n        private static readonly string _json1ConfigFileContent = @\"\n{\n    'address': [\n        'json_0.0.0.0',\n        'json_1.1.1.1',\n        'json_2.2.2.2'\n    ]\n}\n\";\n\n        private static readonly string _json2ConfigFileContent = @\"\n{\n    'address': {\n        'j': 'json_j.j.j.j',\n        '3': 'json_3.3.3.3'\n    }\n}\n\";\n\n        [Fact]\n        public void DifferentConfigSources_Merged_KeysAreSorted()\n        {\n            var config = BuildConfig();\n\n            var configurationSection = config.GetSection(\"address\");\n            var indexConfigurationSections = configurationSection.GetChildren().ToArray();\n\n            Assert.Equal(8, indexConfigurationSections.Length);\n            Assert.Equal(\"0\", indexConfigurationSections[0].Key);\n            Assert.Equal(\"1\", indexConfigurationSections[1].Key);\n            Assert.Equal(\"2\", indexConfigurationSections[2].Key);\n            Assert.Equal(\"3\", indexConfigurationSections[3].Key);\n            Assert.Equal(\"4\", indexConfigurationSections[4].Key);\n            Assert.Equal(\"i\", indexConfigurationSections[5].Key);\n            Assert.Equal(\"j\", indexConfigurationSections[6].Key);\n            Assert.Equal(\"x\", indexConfigurationSections[7].Key);\n\n            Assert.Equal(\"address:0\", indexConfigurationSections[0].Path);\n            Assert.Equal(\"address:1\", indexConfigurationSections[1].Path);\n            Assert.Equal(\"address:2\", indexConfigurationSections[2].Path);\n            Assert.Equal(\"address:3\", indexConfigurationSections[3].Path);\n            Assert.Equal(\"address:4\", indexConfigurationSections[4].Path);\n            Assert.Equal(\"address:i\", indexConfigurationSections[5].Path);\n            Assert.Equal(\"address:j\", indexConfigurationSections[6].Path);\n            Assert.Equal(\"address:x\", indexConfigurationSections[7].Path);\n        }\n\n        [Fact]\n        public void DifferentConfigSources_Merged_WithOverwrites()\n        {\n            var config = BuildConfig();\n\n            Assert.Equal(\"json_0.0.0.0\", config[\"address:0\"]);\n            Assert.Equal(\"xml_1.1.1.1\", config[\"address:1\"]);\n            Assert.Equal(\"ini_2.2.2.2\", config[\"address:2\"]);\n            Assert.Equal(\"json_3.3.3.3\", config[\"address:3\"]);\n            Assert.Equal(\"xml_4.4.4.4\", config[\"address:4\"]);\n            Assert.Equal(\"ini_i.i.i.i\", config[\"address:i\"]);\n            Assert.Equal(\"json_j.j.j.j\", config[\"address:j\"]);\n            Assert.Equal(\"xml_x.x.x.x\", config[\"address:x\"]);\n        }\n\n        private IConfiguration BuildConfig()\n        {\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddJsonFile(_json1ConfigFilePath);\n            configurationBuilder.AddIniFile(_iniConfigFilePath);\n            configurationBuilder.AddJsonFile(_json2ConfigFilePath);\n            configurationBuilder.AddXmlFile(_xmlConfigFilePath);\n            return configurationBuilder.Build();\n        }\n\n        public ArrayTests()\n        {\n            var basePath = AppContext.BaseDirectory ?? string.Empty;\n            _iniConfigFilePath = Path.GetRandomFileName();\n            _xmlConfigFilePath = Path.GetRandomFileName();\n            _json1ConfigFilePath = Path.GetRandomFileName();\n            _json2ConfigFilePath = Path.GetRandomFileName();\n\n            File.WriteAllText(Path.Combine(basePath, _iniConfigFilePath), _iniConfigFileContent);\n            File.WriteAllText(Path.Combine(basePath, _xmlConfigFilePath), _xmlConfigFileContent);\n            File.WriteAllText(Path.Combine(basePath, _json1ConfigFilePath), _json1ConfigFileContent);\n            File.WriteAllText(Path.Combine(basePath, _json2ConfigFilePath), _json2ConfigFileContent);\n        }\n\n        public void Dispose()\n        {\n            File.Delete(_iniConfigFilePath);\n            File.Delete(_xmlConfigFilePath);\n            File.Delete(_json1ConfigFilePath);\n            File.Delete(_json2ConfigFilePath);\n        }\n    }\n}"
  },
  {
    "path": "test/Config.FunctionalTests/Config.FunctionalTests.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.FunctionalTests</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.FunctionalTests</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.Ini\\Config.Ini.csproj\" />\n    <ProjectReference Include=\"..\\..\\src\\Config.Json\\Config.Json.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n    <ProjectReference Include=\"..\\..\\src\\Config.Xml\\Config.Xml.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.AspNetCore.Testing\" Version=\"$(MicrosoftAspNetCoreTestingPackageVersion)\" />\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.FunctionalTests/ConfigurationTests.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Testing.xunit;\nusing Microsoft.Extensions.Configuration.Ini;\nusing Microsoft.Extensions.Configuration.Json;\nusing Microsoft.Extensions.Configuration.Xml;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Primitives;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public class ConfigurationTests : IDisposable\n    {\n        private readonly DisposableFileSystem _fileSystem;\n        private readonly PhysicalFileProvider _fileProvider;\n        private readonly string _basePath;\n        private readonly string _iniFile;\n        private readonly string _xmlFile;\n        private readonly string _jsonFile;\n        private static readonly string _iniConfigFileContent =\n            @\"IniKey1=IniValue1\n[IniKey2]\n# Comments\nIniKey3=IniValue2\n; Comments\nIniKey4=IniValue3\nIniKey5:IniKey6=IniValue4\n/Comments\n[CommonKey1:CommonKey2]\nIniKey7=IniValue5\nCommonKey3:CommonKey4=IniValue6\";\n        private static readonly string _xmlConfigFileContent =\n            @\"<settings XmlKey1=\"\"XmlValue1\"\">\n  <!-- Comments -->\n  <XmlKey2 XmlKey3=\"\"XmlValue2\"\">\n    <!-- Comments -->\n    <XmlKey4>XmlValue3</XmlKey4>\n    <XmlKey5 Name=\"\"XmlKey6\"\">XmlValue4</XmlKey5>\n  </XmlKey2>\n  <CommonKey1 Name=\"\"CommonKey2\"\" XmlKey7=\"\"XmlValue5\"\">\n    <!-- Comments -->\n    <CommonKey3 CommonKey4=\"\"XmlValue6\"\" />\n  </CommonKey1>\n</settings>\";\n        private static readonly string _jsonConfigFileContent =\n            @\"{\n  \"\"JsonKey1\"\": \"\"JsonValue1\"\",\n  \"\"Json.Key2\"\": {\n    \"\"JsonKey3\"\": \"\"JsonValue2\"\",\n    \"\"Json.Key4\"\": \"\"JsonValue3\"\",\n    \"\"JsonKey5:JsonKey6\"\": \"\"JsonValue4\"\"\n  },\n  \"\"CommonKey1\"\": {\n    \"\"CommonKey2\"\": {\n      \"\"JsonKey7\"\": \"\"JsonValue5\"\",\n      \"\"CommonKey3:CommonKey4\"\": \"\"JsonValue6\"\"\n    }\n  }\n}\";\n        private static readonly Dictionary<string, string> _memConfigContent = new Dictionary<string, string>\n            {\n                { \"MemKey1\", \"MemValue1\" },\n                { \"MemKey2:MemKey3\", \"MemValue2\" },\n                { \"MemKey2:MemKey4\", \"MemValue3\" },\n                { \"MemKey2:MemKey5:MemKey6\", \"MemValue4\" },\n                { \"CommonKey1:CommonKey2:MemKey7\", \"MemValue5\" },\n                { \"CommonKey1:CommonKey2:CommonKey3:CommonKey4\", \"MemValue6\" }\n            };\n\n        public ConfigurationTests()\n        {\n            _fileSystem = new DisposableFileSystem();\n            _fileProvider = new PhysicalFileProvider(_fileSystem.RootPath);\n            _basePath = AppContext.BaseDirectory ?? string.Empty;\n\n            _iniFile = Path.GetRandomFileName();\n            _xmlFile = Path.GetRandomFileName();\n            _jsonFile = Path.GetRandomFileName();\n        }\n\n        [Fact]\n        public void MissingFileIncludesAbsolutePathIfPhysicalFileProvider()\n        {\n            var error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddIniFile(\"missing.ini\").Build());\n            Assert.True(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddJsonFile(\"missing.json\").Build());\n            Assert.True(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddXmlFile(\"missing.xml\").Build());\n            Assert.True(error.Message.Contains(_basePath), error.Message);\n        }\n\n        private class NotVeryGoodFileProvider : IFileProvider\n        {\n            public IDirectoryContents GetDirectoryContents(string subpath)\n            {\n                return null;\n            }\n\n            public IFileInfo GetFileInfo(string subpath)\n            {\n                return null;\n            }\n\n            public IChangeToken Watch(string filter)\n            {\n                return null;\n            }\n        }\n\n        private class MissingFile : IFileInfo\n        {\n            public bool Exists\n            {\n                get\n                {\n                    return false;\n                }\n            }\n\n            public bool IsDirectory\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public DateTimeOffset LastModified\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public long Length\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public string Name\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public string PhysicalPath\n            {\n                get\n                {\n                    return null;\n                }\n            }\n\n            public Stream CreateReadStream()\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        private class AlwaysMissingFileProvider : IFileProvider\n        {\n            public IDirectoryContents GetDirectoryContents(string subpath)\n            {\n                return null;\n            }\n\n            public IFileInfo GetFileInfo(string subpath)\n            {\n                return new MissingFile();\n            }\n\n            public IChangeToken Watch(string filter)\n            {\n                return null;\n            }\n        }\n\n        private void WriteTestFiles()\n        {\n            _fileSystem.WriteFile(_iniFile, _iniConfigFileContent);\n            _fileSystem.WriteFile(_xmlFile, _xmlConfigFileContent);\n            _fileSystem.WriteFile(_jsonFile, _jsonConfigFileContent);\n        }\n\n        private IConfigurationBuilder CreateBuilder()\n        {\n            return new ConfigurationBuilder().SetFileProvider(_fileProvider);\n        }\n\n        [Fact]\n        public void MissingFileDoesNotIncludesAbsolutePathIfWithNullFileInfo()\n        {\n            var provider = new NotVeryGoodFileProvider();\n            var error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddIniFile(provider, \"missing.ini\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddJsonFile(provider, \"missing.json\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddXmlFile(provider, \"missing.xml\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n        }\n\n        [Fact]\n        public void MissingFileDoesNotIncludesAbsolutePathIfWithNoPhysicalPath()\n        {\n            var provider = new AlwaysMissingFileProvider();\n            var error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddIniFile(provider, \"missing.ini\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddJsonFile(provider, \"missing.json\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n            error = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddXmlFile(provider, \"missing.xml\", optional: false, reloadOnChange: false).Build());\n            Assert.False(error.Message.Contains(_basePath), error.Message);\n        }\n\n        [Fact]\n        public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProviders()\n        {\n            // Arrange\n            _fileSystem.WriteFile(_iniFile, _iniConfigFileContent);\n            _fileSystem.WriteFile(_xmlFile, _xmlConfigFileContent);\n            _fileSystem.WriteFile(_jsonFile, _jsonConfigFileContent);\n            var config = CreateBuilder()\n                .AddIniFile(_iniFile)\n                .AddJsonFile(_jsonFile)\n                .AddXmlFile(_xmlFile)\n                .AddInMemoryCollection(_memConfigContent)\n                .Build();\n\n            // Assert\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"IniValue2\", config[\"IniKey2:IniKey3\"]);\n            Assert.Equal(\"IniValue3\", config[\"IniKey2:IniKey4\"]);\n            Assert.Equal(\"IniValue4\", config[\"IniKey2:IniKey5:IniKey6\"]);\n            Assert.Equal(\"IniValue5\", config[\"CommonKey1:CommonKey2:IniKey7\"]);\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"JsonValue2\", config[\"Json.Key2:JsonKey3\"]);\n            Assert.Equal(\"JsonValue3\", config[\"Json.Key2:Json.Key4\"]);\n            Assert.Equal(\"JsonValue4\", config[\"Json.Key2:JsonKey5:JsonKey6\"]);\n            Assert.Equal(\"JsonValue5\", config[\"CommonKey1:CommonKey2:JsonKey7\"]);\n\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey2:XmlKey3\"]);\n            Assert.Equal(\"XmlValue3\", config[\"XmlKey2:XmlKey4\"]);\n            Assert.Equal(\"XmlValue4\", config[\"XmlKey2:XmlKey5:XmlKey6\"]);\n            Assert.Equal(\"XmlValue5\", config[\"CommonKey1:CommonKey2:XmlKey7\"]);\n\n            Assert.Equal(\"MemValue1\", config[\"MemKey1\"]);\n            Assert.Equal(\"MemValue2\", config[\"MemKey2:MemKey3\"]);\n            Assert.Equal(\"MemValue3\", config[\"MemKey2:MemKey4\"]);\n            Assert.Equal(\"MemValue4\", config[\"MemKey2:MemKey5:MemKey6\"]);\n            Assert.Equal(\"MemValue5\", config[\"CommonKey1:CommonKey2:MemKey7\"]);\n\n            Assert.Equal(\"MemValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n        }\n\n        [Fact]\n        public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAbsolutePath()\n        {\n            // Arrange\n            WriteTestFiles();\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.AddIniFile(Path.Combine(_fileSystem.RootPath, _iniFile));\n            configurationBuilder.AddJsonFile(Path.Combine(_fileSystem.RootPath, _jsonFile));\n            configurationBuilder.AddXmlFile(Path.Combine(_fileSystem.RootPath, _xmlFile));\n            configurationBuilder.AddInMemoryCollection(_memConfigContent);\n\n            var config = configurationBuilder.Build();\n\n            // Assert\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"IniValue2\", config[\"IniKey2:IniKey3\"]);\n            Assert.Equal(\"IniValue3\", config[\"IniKey2:IniKey4\"]);\n            Assert.Equal(\"IniValue4\", config[\"IniKey2:IniKey5:IniKey6\"]);\n            Assert.Equal(\"IniValue5\", config[\"CommonKey1:CommonKey2:IniKey7\"]);\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"JsonValue2\", config[\"Json.Key2:JsonKey3\"]);\n            Assert.Equal(\"JsonValue3\", config[\"Json.Key2:Json.Key4\"]);\n            Assert.Equal(\"JsonValue4\", config[\"Json.Key2:JsonKey5:JsonKey6\"]);\n            Assert.Equal(\"JsonValue5\", config[\"CommonKey1:CommonKey2:JsonKey7\"]);\n\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey2:XmlKey3\"]);\n            Assert.Equal(\"XmlValue3\", config[\"XmlKey2:XmlKey4\"]);\n            Assert.Equal(\"XmlValue4\", config[\"XmlKey2:XmlKey5:XmlKey6\"]);\n            Assert.Equal(\"XmlValue5\", config[\"CommonKey1:CommonKey2:XmlKey7\"]);\n\n            Assert.Equal(\"MemValue1\", config[\"MemKey1\"]);\n            Assert.Equal(\"MemValue2\", config[\"MemKey2:MemKey3\"]);\n            Assert.Equal(\"MemValue3\", config[\"MemKey2:MemKey4\"]);\n            Assert.Equal(\"MemValue4\", config[\"MemKey2:MemKey5:MemKey6\"]);\n            Assert.Equal(\"MemValue5\", config[\"CommonKey1:CommonKey2:MemKey7\"]);\n\n            Assert.Equal(\"MemValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n        }\n\n        [Fact]\n        public void CanOverrideValuesWithNewConfigurationProvider()\n        {\n            // Arrange\n            WriteTestFiles();\n            var configurationBuilder = CreateBuilder();\n\n            // Act & Assert\n            configurationBuilder.AddIniFile(_iniFile);\n            var config = configurationBuilder.Build();\n            Assert.Equal(\"IniValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n\n            configurationBuilder.AddJsonFile(_jsonFile);\n            config = configurationBuilder.Build();\n            Assert.Equal(\"JsonValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n\n            configurationBuilder.AddXmlFile(_xmlFile);\n            config = configurationBuilder.Build();\n            Assert.Equal(\"XmlValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n\n            configurationBuilder.AddInMemoryCollection(_memConfigContent);\n            config = configurationBuilder.Build();\n            Assert.Equal(\"MemValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n        }\n\n        private IConfigurationRoot BuildConfig()\n        {\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddIniFile(Path.GetFileName(_iniFile));\n            configurationBuilder.AddJsonFile(Path.GetFileName(_jsonFile));\n            configurationBuilder.AddXmlFile(Path.GetFileName(_xmlFile));\n            return configurationBuilder.Build();\n        }\n\n        public class TestIniSourceProvider : IniConfigurationProvider, IConfigurationSource\n        {\n            public TestIniSourceProvider(string path)\n                : base(new IniConfigurationSource { Path = path })\n            { }\n\n            public IConfigurationProvider Build(IConfigurationBuilder builder)\n            {\n                Source.FileProvider = builder.GetFileProvider();\n                return this;\n            }\n        }\n\n        public class TestJsonSourceProvider : JsonConfigurationProvider, IConfigurationSource\n        {\n            public TestJsonSourceProvider(string path)\n                : base(new JsonConfigurationSource { Path = path })\n            { }\n\n            public IConfigurationProvider Build(IConfigurationBuilder builder)\n            {\n                Source.FileProvider = builder.GetFileProvider();\n                return this;\n            }\n        }\n\n        public class TestXmlSourceProvider : XmlConfigurationProvider, IConfigurationSource\n        {\n            public TestXmlSourceProvider(string path)\n                : base(new XmlConfigurationSource { Path = path })\n            { }\n\n            public IConfigurationProvider Build(IConfigurationBuilder builder)\n            {\n                Source.FileProvider = builder.GetFileProvider();\n                return this;\n            }\n        }\n\n        [Fact]\n        public void OnLoadErrorWillBeCalledOnJsonParseError()\n        {\n            // Arrange\n            File.WriteAllText(Path.Combine(_basePath, \"error.json\"), @\"{\"\"JsonKey1\"\": \");\n\n            FileConfigurationProvider provider = null;\n            Exception jsonError = null;\n            Action<FileLoadExceptionContext> jsonLoadError = c =>\n            {\n                jsonError = c.Exception;\n                provider = c.Provider;\n            };\n\n            try\n            {\n                new ConfigurationBuilder().AddJsonFile(\"error.json\")\n                    .SetFileLoadExceptionHandler(jsonLoadError)\n                    .Build();\n            }\n            catch (FormatException e)\n            {\n                Assert.Equal(e, jsonError);\n            }\n            Assert.NotNull(provider);\n        }\n\n        [Fact]\n        public void OnLoadErrorWillBeCalledOnXmlParseError()\n        {\n            // Arrange\n            _fileSystem.WriteFile(\"error.xml\", @\"gobblygook\");\n\n            FileConfigurationProvider provider = null;\n            Exception error = null;\n            Action<FileLoadExceptionContext> loadError = c =>\n            {\n                error = c.Exception;\n                provider = c.Provider;\n            };\n\n            try\n            {\n                CreateBuilder().AddJsonFile(\"error.xml\")\n                    .SetFileLoadExceptionHandler(loadError)\n                    .Build();\n            }\n            catch (FormatException e)\n            {\n                Assert.Equal(e, error);\n            }\n            Assert.NotNull(provider);\n        }\n\n        [Fact]\n        public void OnLoadErrorWillBeCalledOnIniLoadError()\n        {\n            // Arrange\n            _fileSystem.WriteFile(\"error.ini\", @\"IniKey1=IniValue1\nIniKey1=IniValue2\");\n\n            FileConfigurationProvider provider = null;\n            Exception error = null;\n            Action<FileLoadExceptionContext> loadError = c =>\n            {\n                error = c.Exception;\n                provider = c.Provider;\n            };\n\n            try\n            {\n                CreateBuilder().AddIniFile(\"error.ini\")\n                    .SetFileLoadExceptionHandler(loadError)\n                    .Build();\n            }\n            catch (FormatException e)\n            {\n                Assert.Equal(e, error);\n            }\n            Assert.NotNull(provider);\n        }\n\n        [Fact]\n        public void OnLoadErrorCanIgnoreErrors()\n        {\n            // Arrange\n            _fileSystem.WriteFile(\"error.json\", @\"{\"\"JsonKey1\"\": \");\n\n            FileConfigurationProvider provider = null;\n            Action<FileLoadExceptionContext> jsonLoadError = c =>\n            {\n                provider = c.Provider;\n                c.Ignore = true;\n            };\n\n            CreateBuilder()\n                .AddJsonFile(s =>\n                {\n                    s.Path = \"error.json\";\n                    s.OnLoadException = jsonLoadError;\n                })\n                .Build();\n\n            Assert.NotNull(provider);\n        }\n\n        [Fact]\n        public void CanSetValuesAndReloadValues()\n        {\n            // Arrange\n            WriteTestFiles();\n            var configurationBuilder = CreateBuilder();\n            configurationBuilder.Add(new TestIniSourceProvider(_iniFile));\n            configurationBuilder.Add(new TestJsonSourceProvider(_jsonFile));\n            configurationBuilder.Add(new TestXmlSourceProvider(_xmlFile));\n\n            var config = configurationBuilder.Build();\n\n            // Act & Assert\n            // Set value\n            config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"] = \"NewValue\";\n\n            // All config sources must be updated\n            foreach (var provider in configurationBuilder.Sources)\n            {\n                Assert.Equal(\"NewValue\",\n                    (provider as FileConfigurationProvider).Get(\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"));\n            }\n\n            // Recover values by reloading\n            config.Reload();\n\n            Assert.Equal(\"XmlValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n\n            // Set value with indexer\n            config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"] = \"NewValue\";\n\n            // All config sources must be updated\n            foreach (var provider in configurationBuilder.Sources)\n            {\n                Assert.Equal(\"NewValue\",\n                    (provider as FileConfigurationProvider).Get(\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"));\n            }\n\n            // Recover values by reloading\n            config.Reload();\n            Assert.Equal(\"XmlValue6\", config[\"CommonKey1:CommonKey2:CommonKey3:CommonKey4\"]);\n        }\n\n        [Fact]\n        public async Task ReloadOnChangeWorksAfterError()\n        {\n            _fileSystem.WriteFile(\"reload.json\", @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n            var config = CreateBuilder()\n                .AddJsonFile(\"reload.json\", optional: false, reloadOnChange: true)\n                .Build();\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n\n            // Introduce an error and make sure the old key is removed\n            _fileSystem.WriteFile(\"reload.json\", @\"{\"\"JsonKey1\"\": \");\n            \n            var i = 0;\n            while (i < 10 && config[\"JsonKey1\"] != null)\n            {\n                await Task.Delay(2000); // wait for notification\n                i++;\n            }\n            \n            Assert.Null(config[\"JsonKey1\"]);\n\n            // Update the file again to make sure the config is updated\n            _fileSystem.WriteFile(\"reload.json\", @\"{\"\"JsonKey1\"\": \"\"JsonValue2\"\"}\");\n            \n            i = 0;\n            while (i < 10 && config[\"JsonKey1\"] == null)\n            {\n                await Task.Delay(1100); // wait for notification\n                i++;\n            }\n            \n            Assert.Equal(\"JsonValue2\", config[\"JsonKey1\"]);\n        }\n\n        [Fact]\n        public async Task TouchingFileWillReload()\n        {\n            // Arrange\n            _fileSystem.WriteFile(\"reload.json\", @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n            _fileSystem.WriteFile(\"reload.ini\", @\"IniKey1 = IniValue1\");\n            _fileSystem.WriteFile(\"reload.xml\", @\"<settings XmlKey1=\"\"XmlValue1\"\"/>\");\n\n            var config = CreateBuilder()\n                .AddIniFile(\"reload.ini\", optional: false, reloadOnChange: true)\n                .AddJsonFile(\"reload.json\", optional: false, reloadOnChange: true)\n                .AddXmlFile(\"reload.xml\", optional: false, reloadOnChange: true)\n                .Build();\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n\n            var token = config.GetReloadToken();\n\n            // Act & Assert\n            // Update files\n            _fileSystem.WriteFile(\"reload.json\", @\"{\"\"JsonKey1\"\": \"\"JsonValue2\"\"}\");\n            _fileSystem.WriteFile(\"reload.ini\", @\"IniKey1 = IniValue2\");\n            _fileSystem.WriteFile(\"reload.xml\", @\"<settings XmlKey1=\"\"XmlValue2\"\"/>\");\n\n            await Task.Delay(2000);\n\n            Assert.Equal(\"JsonValue2\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue2\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey1\"]);\n            Assert.True(token.HasChanged);\n        }\n\n        [Fact]\n        public async Task CreatingOptionalFileInNonExistentDirectoryWillReload()\n        {\n            var directory = Path.GetRandomFileName();\n            var jsonRootRelativeFile = Path.Combine(directory, Path.GetRandomFileName());\n            var jsonAbsoluteFile = Path.Combine(_fileSystem.RootPath, jsonRootRelativeFile);\n\n            // Arrange\n            var config = new ConfigurationBuilder()\n                .AddJsonFile(jsonAbsoluteFile, optional: true, reloadOnChange: true)\n                .Build();\n\n            Assert.Null(config[\"JsonKey1\"]);\n\n            var createToken = config.GetReloadToken();\n            Assert.False(createToken.HasChanged);\n\n            _fileSystem.CreateFolder(directory);\n\n            await Task.Delay(500);\n\n            _fileSystem.WriteFile(jsonRootRelativeFile, @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n\n            await Task.Delay(2500);\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.True(createToken.HasChanged);\n        }\n\n        [Theory]\n        [InlineData(false)]\n        [InlineData(true)]\n        public async Task DeletingFilesThatRedefineKeysWithReload(bool optional)\n        {\n            // Arrange\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"Key\"\": \"\"JsonValue1\"\"}\");\n            _fileSystem.WriteFile(_iniFile, @\"Key = IniValue1\");\n            _fileSystem.WriteFile(_xmlFile, @\"<settings Key=\"\"XmlValue1\"\"/>\");\n\n            // Act & Assert\n            var config = CreateBuilder()\n                .AddXmlFile(_xmlFile, optional, reloadOnChange: true)\n                .AddJsonFile(_jsonFile, optional, reloadOnChange: true)\n                .AddIniFile(_iniFile, optional, reloadOnChange: true)\n                .Build();\n            Assert.Equal(\"IniValue1\", config[\"Key\"]);\n\n            // Delete files and ensure order is preserved\n            var token = config.GetReloadToken();\n            _fileSystem.DeleteFile(_iniFile);\n            await Task.Delay(2000);\n            Assert.Equal(\"JsonValue1\", config[\"Key\"]);\n            Assert.True(token.HasChanged);\n\n            token = config.GetReloadToken();\n            _fileSystem.DeleteFile(_jsonFile);\n            await Task.Delay(2000);\n            Assert.Equal(\"XmlValue1\", config[\"Key\"]);\n            Assert.True(token.HasChanged);\n\n            token = config.GetReloadToken();\n            _fileSystem.DeleteFile(_xmlFile);\n            await Task.Delay(2000);\n            Assert.Null(config[\"Key\"]);\n            Assert.True(token.HasChanged);\n\n            token = config.GetReloadToken();\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"Key\"\": \"\"JsonValue1\"\"}\");\n            await Task.Delay(2000);\n            Assert.Equal(\"JsonValue1\", config[\"Key\"]);\n            Assert.True(token.HasChanged);\n\n            // Adding a file earlier in the chain has no effect\n            token = config.GetReloadToken();\n            _fileSystem.WriteFile(_xmlFile, @\"<settings Key=\"\"XmlValue1\"\"/>\");\n            await Task.Delay(2000);\n            Assert.Equal(\"JsonValue1\", config[\"Key\"]);\n            Assert.True(token.HasChanged);\n\n            token = config.GetReloadToken();\n            _fileSystem.WriteFile(_iniFile, @\"Key = IniValue1\");\n            await Task.Delay(2000);\n            Assert.Equal(\"IniValue1\", config[\"Key\"]);\n            Assert.True(token.HasChanged);\n        }\n\n\n        [Theory]\n        [InlineData(false)]\n        [InlineData(true)]\n        public async Task DeletingFileWillReload(bool optional)\n        {\n            // Arrange\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n            _fileSystem.WriteFile(_iniFile, @\"IniKey1 = IniValue1\");\n            _fileSystem.WriteFile(_xmlFile, @\"<settings XmlKey1=\"\"XmlValue1\"\"/>\");\n\n            // Act & Assert\n            var config = CreateBuilder()\n                .AddXmlFile(_xmlFile, optional, reloadOnChange: true)\n                .AddJsonFile(_jsonFile, optional, reloadOnChange: true)\n                .AddIniFile(_iniFile, optional, reloadOnChange: true)\n                .Build();\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n\n            var token = config.GetReloadToken();\n\n            // Delete files\n            _fileSystem.DeleteFile(_jsonFile);\n            _fileSystem.DeleteFile(_iniFile);\n            _fileSystem.DeleteFile(_xmlFile);\n\n            await Task.Delay(3300);\n\n            Assert.Null(config[\"JsonKey1\"]);\n            Assert.Null(config[\"IniKey1\"]);\n            Assert.Null(config[\"XmlKey1\"]);\n            Assert.True(token.HasChanged);\n        }\n\n        [Fact]\n        public async Task CreatingWritingDeletingCreatingFileWillReload()\n        {\n            // Arrange\n            var config = CreateBuilder()\n                .AddIniFile(_iniFile, optional: true, reloadOnChange: true)\n                .AddJsonFile(_jsonFile, optional: true, reloadOnChange: true)\n                .AddXmlFile(_xmlFile, optional: true, reloadOnChange: true)\n                .Build();\n\n            Assert.Null(config[\"JsonKey1\"]);\n            Assert.Null(config[\"IniKey1\"]);\n            Assert.Null(config[\"XmlKey1\"]);\n\n            var createToken = config.GetReloadToken();\n\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n            _fileSystem.WriteFile(_iniFile, @\"IniKey1 = IniValue1\");\n            _fileSystem.WriteFile(_xmlFile, @\"<settings XmlKey1=\"\"XmlValue1\"\"/>\");\n\n            await Task.Delay(2000);\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.True(createToken.HasChanged);\n\n            var writeToken = config.GetReloadToken();\n\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"JsonKey1\"\": \"\"JsonValue2\"\"}\");\n            _fileSystem.WriteFile(_iniFile, @\"IniKey1 = IniValue2\");\n            _fileSystem.WriteFile(_xmlFile, @\"<settings XmlKey1=\"\"XmlValue2\"\"/>\");\n\n            await Task.Delay(2000);\n\n            Assert.Equal(\"JsonValue2\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue2\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey1\"]);\n            Assert.True(writeToken.HasChanged);\n\n            var deleteToken = config.GetReloadToken();\n\n            // Act & Assert\n            // Delete files\n            _fileSystem.DeleteFile(_jsonFile);\n            _fileSystem.DeleteFile(_iniFile);\n            _fileSystem.DeleteFile(_xmlFile);\n\n            await Task.Delay(2000);\n\n            Assert.Null(config[\"JsonKey1\"]);\n            Assert.Null(config[\"IniKey1\"]);\n            Assert.Null(config[\"XmlKey1\"]);\n            Assert.True(deleteToken.HasChanged);\n\n            var createAgainToken = config.GetReloadToken();\n\n            _fileSystem.WriteFile(_jsonFile, @\"{\"\"JsonKey1\"\": \"\"JsonValue1\"\"}\");\n            _fileSystem.WriteFile(_iniFile, @\"IniKey1 = IniValue1\");\n            _fileSystem.WriteFile(_xmlFile, @\"<settings XmlKey1=\"\"XmlValue1\"\"/>\");\n\n            await Task.Delay(2000);\n\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"IniValue1\", config[\"IniKey1\"]);\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.True(createAgainToken.HasChanged);\n        }\n\n        [Fact]\n        public void LoadIncorrectJsonFile_ThrowFormatException()\n        {\n            // Arrange\n            var json = @\"{\n                'name': 'test',\n                'address': {\n                    'street': 'Something street' /*Missing comma*/\n                    'zipcode': '12345'\n                }\n            }\";\n            _fileSystem.WriteFile(_jsonFile, json);\n\n            // Act & Assert\n            var exception = Assert.Throws<FormatException>(() => CreateBuilder().AddJsonFile(_jsonFile).Build());\n            Assert.NotNull(exception.Message);\n        }\n\n        [Fact]\n        public void SetBasePathCalledMultipleTimesForEachSourceLastOneWins()\n        {\n            // Arrange\n            var builder = new ConfigurationBuilder();\n            var jsonConfigFilePath = \"test.json\";\n            File.WriteAllText(Path.Combine(Directory.GetCurrentDirectory(), jsonConfigFilePath), _jsonConfigFileContent);\n            var xmlConfigFilePath = \"test.xml\";\n            File.WriteAllText(Path.Combine(Directory.GetCurrentDirectory(), xmlConfigFilePath), _xmlConfigFileContent);\n\n            // Act\n            builder.AddXmlFile(\"test.xml\")\n                .SetBasePath(Directory.GetCurrentDirectory())\n                .AddJsonFile(\"test.json\");\n\n            var config = builder.Build();\n\n            // Assert\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"JsonValue2\", config[\"Json.Key2:JsonKey3\"]);\n            Assert.Equal(\"JsonValue3\", config[\"Json.Key2:Json.Key4\"]);\n            Assert.Equal(\"JsonValue4\", config[\"Json.Key2:JsonKey5:JsonKey6\"]);\n            Assert.Equal(\"JsonValue5\", config[\"CommonKey1:CommonKey2:JsonKey7\"]);\n\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey2:XmlKey3\"]);\n            Assert.Equal(\"XmlValue3\", config[\"XmlKey2:XmlKey4\"]);\n            Assert.Equal(\"XmlValue4\", config[\"XmlKey2:XmlKey5:XmlKey6\"]);\n\n            File.Delete(jsonConfigFilePath);\n        }\n\n        [Fact]\n        public void GetDefaultBasePathForSources()\n        {\n            // Arrange\n            var builder = new ConfigurationBuilder();\n\n            var jsonConfigFilePath = Path.Combine(_basePath, \"test.json\");\n            var xmlConfigFilePath = Path.Combine(_basePath, \"xmltest.xml\");\n            File.WriteAllText(jsonConfigFilePath, _jsonConfigFileContent);\n            File.WriteAllText(xmlConfigFilePath, _xmlConfigFileContent);\n\n            // Act\n            builder.AddJsonFile(\"test.json\").AddXmlFile(\"xmltest.xml\");\n\n            var config = builder.Build();\n\n            // Assert\n            Assert.Equal(\"JsonValue1\", config[\"JsonKey1\"]);\n            Assert.Equal(\"JsonValue2\", config[\"Json.Key2:JsonKey3\"]);\n            Assert.Equal(\"JsonValue3\", config[\"Json.Key2:Json.Key4\"]);\n            Assert.Equal(\"JsonValue4\", config[\"Json.Key2:JsonKey5:JsonKey6\"]);\n            Assert.Equal(\"JsonValue5\", config[\"CommonKey1:CommonKey2:JsonKey7\"]);\n\n            Assert.Equal(\"XmlValue1\", config[\"XmlKey1\"]);\n            Assert.Equal(\"XmlValue2\", config[\"XmlKey2:XmlKey3\"]);\n            Assert.Equal(\"XmlValue3\", config[\"XmlKey2:XmlKey4\"]);\n            Assert.Equal(\"XmlValue4\", config[\"XmlKey2:XmlKey5:XmlKey6\"]);\n\n            File.Delete(jsonConfigFilePath);\n            File.Delete(xmlConfigFilePath);\n        }\n\n        [Fact]\n        public void CanEnumerateProviders()\n        {\n            // Arrange\n            var config = CreateBuilder()\n                .AddIniFile(_iniFile, optional: true, reloadOnChange: true)\n                .AddJsonFile(_jsonFile, optional: true, reloadOnChange: true)\n                .AddXmlFile(_xmlFile, optional: true, reloadOnChange: true)\n                .Build();\n\n            var providers = config.Providers;\n            Assert.Equal(3, providers.Count());\n            Assert.NotNull(providers.Single(p => p is JsonConfigurationProvider));\n            Assert.NotNull(providers.Single(p => p is XmlConfigurationProvider));\n            Assert.NotNull(providers.Single(p => p is IniConfigurationProvider));\n        }\n\n        public void Dispose()\n        {\n            _fileProvider.Dispose();\n            _fileSystem.Dispose();\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.FunctionalTests/DisposableFileSystem.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public class DisposableFileSystem : IDisposable\n    {\n        public DisposableFileSystem()\n        {\n            RootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());\n            Directory.CreateDirectory(RootPath);\n            DirectoryInfo = new DirectoryInfo(RootPath);\n        }\n\n        public string RootPath { get; }\n\n        public DirectoryInfo DirectoryInfo { get; }\n\n        public DisposableFileSystem CreateFolder(string path)\n        {\n            Directory.CreateDirectory(Path.Combine(RootPath, path));\n            return this;\n        }\n\n        public DisposableFileSystem WriteFile(string path, string text = \"temp\")\n        {\n            File.WriteAllText(Path.Combine(RootPath, path), text);\n            return this;\n        }\n\n        public DisposableFileSystem DeleteFile(string path)\n        {\n            File.Delete(Path.Combine(RootPath, path));\n            return this;\n        }\n\n        public DisposableFileSystem CreateFiles(params string[] fileRelativePaths)\n        {\n            foreach (var path in fileRelativePaths)\n            {\n                var fullPath = Path.Combine(RootPath, path);\n                Directory.CreateDirectory(Path.GetDirectoryName(fullPath));\n\n                File.WriteAllText(\n                    fullPath,\n                    string.Format(\"Automatically generated for testing on {0:yyyy}/{0:MM}/{0:dd} {0:hh}:{0:mm}:{0:ss}\", DateTime.UtcNow));\n            }\n\n            return this;\n        }\n\n        public void Dispose()\n        {\n            try\n            {\n                Directory.Delete(RootPath, true);\n            }\n            catch\n            {\n                // Don't throw if this fails.\n            }\n        }\n    }\n}"
  },
  {
    "path": "test/Config.FunctionalTests/test.xml",
    "content": "<settings XmlKey1=\"XmlValue1\">\n  <!-- Comments -->\n  <XmlKey2 XmlKey3=\"XmlValue2\">\n    <!-- Comments -->\n    <XmlKey4>XmlValue3</XmlKey4>\n    <XmlKey5 Name=\"XmlKey6\">XmlValue4</XmlKey5>\n  </XmlKey2>\n  <CommonKey1 Name=\"CommonKey2\" XmlKey7=\"XmlValue5\">\n    <!-- Comments -->\n    <CommonKey3 CommonKey4=\"XmlValue6\" />\n  </CommonKey1>\n</settings>"
  },
  {
    "path": "test/Config.Ini.Test/Config.Ini.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Ini.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Ini.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.Ini\\Config.Ini.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Ini.Test/IniConfigurationExtensionsTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Ini.Test\n{\n    public class IniConfigurationExtensionsTest\n    {\n        [Theory]\n        [InlineData(null)]\n        [InlineData(\"\")]\n        public void AddIniFile_ThrowsIfFilePathIsNullOrEmpty(string path)\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act and Assert\n            var ex = Assert.Throws<ArgumentException>(\n                () => IniConfigurationExtensions.AddIniFile(configurationBuilder, path));\n            Assert.Equal(\"path\", ex.ParamName);\n            Assert.StartsWith(\"File path must be a non-empty string.\", ex.Message);\n        }\n\n        [Fact]\n        public void AddIniFile_ThrowsIfFileDoesNotExistAtPath()\n        {\n            // Arrange\n            var path = \"file-does-not-exist.ini\";\n \n            // Act and Assert\n            var ex = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddIniFile(path).Build());\n            Assert.StartsWith($\"The configuration file '{path}' was not found and is not optional. The physical path is '\", ex.Message);\n        }\n\n        [Fact]\n        public void AddIniFile_DoesNotThrowsIfFileDoesNotExistAtPathAndOptional()\n        {\n            // Arrange\n            var path = \"file-does-not-exist.ini\";\n\n            // Act and Assert\n            new ConfigurationBuilder().AddIniFile(path, optional: true).Build();\n        }\n\n    }\n}\n"
  },
  {
    "path": "test/Config.Ini.Test/IniConfigurationTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Ini.Test\n{\n    public class IniConfigurationTest\n    {\n        [Fact]\n        public void LoadKeyValuePairsFromValidIniFile()\n        {\n            var ini = @\"[DefaultConnection]\nConnectionString=TestConnectionString\nProvider=SqlClient\n[Data:Inventory]\nConnectionString=AnotherTestConnectionString\nSubHeader:Provider=MySql\";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"TestConnectionString\", iniConfigSrc.Get(\"defaultconnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", iniConfigSrc.Get(\"DEFAULTCONNECTION:PROVIDER\"));\n            Assert.Equal(\"AnotherTestConnectionString\", iniConfigSrc.Get(\"Data:Inventory:CONNECTIONSTRING\"));\n            Assert.Equal(\"MySql\", iniConfigSrc.Get(\"Data:Inventory:SubHeader:Provider\"));\n        }\n\n        [Fact]\n        public void LoadMethodCanHandleEmptyValue()\n        {\n            var ini = @\"DefaultKey=\";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(string.Empty, iniConfigSrc.Get(\"DefaultKey\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromValidIniFileWithQuotedValues()\n        {\n            var ini = \"[DefaultConnection]\\n\" +\n                      \"ConnectionString=\\\"TestConnectionString\\\"\\n\" +\n                      \"Provider=\\\"SqlClient\\\"\\n\" +\n                      \"[Data:Inventory]\\n\" +\n                      \"ConnectionString=\\\"AnotherTestConnectionString\\\"\\n\" +\n                      \"Provider=\\\"MySql\\\"\";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"TestConnectionString\", iniConfigSrc.Get(\"DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", iniConfigSrc.Get(\"DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", iniConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", iniConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void DoubleQuoteIsPartOfValueIfNotPaired()\n        {\n            var ini = \"[ConnectionString]\\n\" +\n                      \"DefaultConnection=\\\"TestConnectionString\\n\" +\n                      \"Provider=SqlClient\\\"\";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"\\\"TestConnectionString\", iniConfigSrc.Get(\"ConnectionString:DefaultConnection\"));\n            Assert.Equal(\"SqlClient\\\"\", iniConfigSrc.Get(\"ConnectionString:Provider\"));\n        }\n\n        [Fact]\n        public void DoubleQuoteIsPartOfValueIfAppearInTheMiddleOfValue()\n        {\n            var ini = \"[ConnectionString]\\n\" +\n                      \"DefaultConnection=Test\\\"Connection\\\"String\\n\" +\n                      \"Provider=Sql\\\"Client\";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"Test\\\"Connection\\\"String\", iniConfigSrc.Get(\"ConnectionString:DefaultConnection\"));\n            Assert.Equal(\"Sql\\\"Client\", iniConfigSrc.Get(\"ConnectionString:Provider\"));\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromValidIniFileWithoutSectionHeader()\n        {\n            var ini = @\"\n            DefaultConnection:ConnectionString=TestConnectionString\n            DefaultConnection:Provider=SqlClient\n            Data:Inventory:ConnectionString=AnotherTestConnectionString\n            Data:Inventory:Provider=MySql\n            \";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"TestConnectionString\", iniConfigSrc.Get(\"DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", iniConfigSrc.Get(\"DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", iniConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", iniConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportAndIgnoreComments()\n        {\n            var ini = @\"\n            ; Comments\n            [DefaultConnection]\n            # Comments\n            ConnectionString=TestConnectionString\n            / Comments\n            Provider=SqlClient\n            [Data:Inventory]\n            ConnectionString=AnotherTestConnectionString\n            Provider=MySql\n            \";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n\n            iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini));\n\n            Assert.Equal(\"TestConnectionString\", iniConfigSrc.Get(\"DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", iniConfigSrc.Get(\"DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", iniConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", iniConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenFoundInvalidLine()\n        {\n            var ini = @\"\nConnectionString\n            \";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n            var expectedMsg = Resources.FormatError_UnrecognizedLineFormat(\"ConnectionString\");\n\n            var exception = Assert.Throws<FormatException>(() => iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenFoundBrokenSectionHeader()\n        {\n            var ini = @\"\n[ConnectionString\nDefaultConnection=TestConnectionString\n            \";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n            var expectedMsg = Resources.FormatError_UnrecognizedLineFormat(\"[ConnectionString\");\n\n            var exception = Assert.Throws<FormatException>(() => iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingNullAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddIniFile(path: null));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingEmptyStringAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddIniFile(string.Empty));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenKeyIsDuplicated()\n        {\n            var ini = @\"\n            [Data:DefaultConnection]\n            ConnectionString=TestConnectionString\n            Provider=SqlClient\n            [Data]\n            DefaultConnection:ConnectionString=AnotherTestConnectionString\n            Provider=MySql\n            \";\n            var iniConfigSrc = new IniConfigurationProvider(new IniConfigurationSource());\n            var expectedMsg = Resources.FormatError_KeyIsDuplicated(\"Data:DefaultConnection:ConnectionString\");\n\n            var exception = Assert.Throws<FormatException>(() => iniConfigSrc.Load(TestStreamHelpers.StringToStream(ini)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void IniConfiguration_Throws_On_Missing_Configuration_File()\n        {\n            var exception = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddIniFile(\"NotExistingConfig.ini\").Build());\n\n            // Assert\n            Assert.StartsWith($\"The configuration file 'NotExistingConfig.ini' was not found and is not optional. The physical path is '\", exception.Message);\n        }\n\n        [Fact]\n        public void IniConfiguration_Does_Not_Throw_On_Optional_Configuration()\n        {\n            var config = new ConfigurationBuilder().AddIniFile(\"NotExistingConfig.ini\", optional: true).Build();\n        }\n    }\n}"
  },
  {
    "path": "test/Config.Json.Test/ArrayTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System.Linq;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Json.Test\n{\n    public class ArrayTest\n    {\n        [Fact]\n        public void ArraysAreConvertedToKeyValuePairs()\n        {\n            var json = @\"{\n                'ip': [\n                    '1.2.3.4',\n                    '7.8.9.10',\n                    '11.12.13.14'\n                ]\n            }\";\n\n            var jsonConfigSource = new JsonConfigurationProvider(new JsonConfigurationSource());\n            jsonConfigSource.Load(TestStreamHelpers.StringToStream(json));\n            \n            Assert.Equal(\"1.2.3.4\", jsonConfigSource.Get(\"ip:0\"));\n            Assert.Equal(\"7.8.9.10\", jsonConfigSource.Get(\"ip:1\"));\n            Assert.Equal(\"11.12.13.14\", jsonConfigSource.Get(\"ip:2\"));\n        }\n\n        [Fact]\n        public void ArrayOfObjects()\n        {\n            var json = @\"{\n                'ip': [\n                    {\n                        'address': '1.2.3.4',\n                        'hidden': false\n                    },\n                    {\n                        'address': '5.6.7.8',\n                        'hidden': true\n                    }\n                ]\n            }\";\n\n            var jsonConfigSource = new JsonConfigurationProvider(new JsonConfigurationSource());\n            jsonConfigSource.Load(TestStreamHelpers.StringToStream(json));\n\n            Assert.Equal(\"1.2.3.4\", jsonConfigSource.Get(\"ip:0:address\"));\n            Assert.Equal(\"False\", jsonConfigSource.Get(\"ip:0:hidden\"));\n            Assert.Equal(\"5.6.7.8\", jsonConfigSource.Get(\"ip:1:address\"));\n            Assert.Equal(\"True\", jsonConfigSource.Get(\"ip:1:hidden\"));\n        }\n\n        [Fact]\n        public void NestedArrays()\n        {\n            var json = @\"{\n                'ip': [\n                    [ \n                        '1.2.3.4',\n                        '5.6.7.8'\n                    ],\n                    [ \n                        '9.10.11.12',\n                        '13.14.15.16'\n                    ],\n                ]\n            }\";\n\n            var jsonConfigSource = new JsonConfigurationProvider(new JsonConfigurationSource());\n            jsonConfigSource.Load(TestStreamHelpers.StringToStream(json));\n\n            Assert.Equal(\"1.2.3.4\", jsonConfigSource.Get(\"ip:0:0\"));\n            Assert.Equal(\"5.6.7.8\", jsonConfigSource.Get(\"ip:0:1\"));\n            Assert.Equal(\"9.10.11.12\", jsonConfigSource.Get(\"ip:1:0\"));\n            Assert.Equal(\"13.14.15.16\", jsonConfigSource.Get(\"ip:1:1\"));\n        }\n\n        [Fact]\n        public void ImplicitArrayItemReplacement()\n        {\n            var json1 = @\"{\n                'ip': [\n                    '1.2.3.4',\n                    '7.8.9.10',\n                    '11.12.13.14'\n                ]\n            }\";\n\n            var json2 = @\"{\n                'ip': [\n                    '15.16.17.18'\n                ]\n            }\";\n\n            var jsonConfigSource1 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json1) };\n            var jsonConfigSource2 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json2) };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(jsonConfigSource1);\n            configurationBuilder.Add(jsonConfigSource2);\n            var config = configurationBuilder.Build();\n\n            Assert.Equal(3, config.GetSection(\"ip\").GetChildren().Count());\n            Assert.Equal(\"15.16.17.18\", config[\"ip:0\"]);\n            Assert.Equal(\"7.8.9.10\", config[\"ip:1\"]);\n            Assert.Equal(\"11.12.13.14\", config[\"ip:2\"]);\n        }\n\n        [Fact]\n        public void ExplicitArrayReplacement()\n        {\n            var json1 = @\"{\n                'ip': [\n                    '1.2.3.4',\n                    '7.8.9.10',\n                    '11.12.13.14'\n                ]\n            }\";\n\n            var json2 = @\"{\n                'ip': {\n                    '1': '15.16.17.18'\n                }\n            }\";\n\n            var jsonConfigSource1 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json1) };\n            var jsonConfigSource2 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json2) };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(jsonConfigSource1);\n            configurationBuilder.Add(jsonConfigSource2);\n            var config = configurationBuilder.Build();\n\n            Assert.Equal(3, config.GetSection(\"ip\").GetChildren().Count());\n            Assert.Equal(\"1.2.3.4\", config[\"ip:0\"]);\n            Assert.Equal(\"15.16.17.18\", config[\"ip:1\"]);\n            Assert.Equal(\"11.12.13.14\", config[\"ip:2\"]);\n        }\n\n        [Fact]\n        public void ArrayMerge()\n        {\n            var json1 = @\"{\n                'ip': [\n                    '1.2.3.4',\n                    '7.8.9.10',\n                    '11.12.13.14'\n                ]\n            }\";\n\n            var json2 = @\"{\n                'ip': {\n                    '3': '15.16.17.18'\n                }\n            }\";\n\n            var jsonConfigSource1 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json1) };\n            var jsonConfigSource2 = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json2) };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(jsonConfigSource1);\n            configurationBuilder.Add(jsonConfigSource2);\n            var config = configurationBuilder.Build();\n\n            Assert.Equal(4, config.GetSection(\"ip\").GetChildren().Count());\n            Assert.Equal(\"1.2.3.4\", config[\"ip:0\"]);\n            Assert.Equal(\"7.8.9.10\", config[\"ip:1\"]);\n            Assert.Equal(\"11.12.13.14\", config[\"ip:2\"]);\n            Assert.Equal(\"15.16.17.18\", config[\"ip:3\"]);\n        }\n\n        [Fact]\n        public void ArraysAreKeptInFileOrder()\n        {\n            var json = @\"{\n                'setting': [\n                    'b',\n                    'a',\n                    '2'\n                ]\n            }\";\n\n            var jsonConfigSource = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json) };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(jsonConfigSource);\n            var config = configurationBuilder.Build();\n\n            var configurationSection = config.GetSection(\"setting\");\n            var indexConfigurationSections = configurationSection.GetChildren().ToArray();\n\n            Assert.Equal(3, indexConfigurationSections.Count());\n            Assert.Equal(\"b\", indexConfigurationSections[0].Value);\n            Assert.Equal(\"a\", indexConfigurationSections[1].Value);\n            Assert.Equal(\"2\", indexConfigurationSections[2].Value);\n        }\n\n        [Fact]\n        public void PropertiesAreSortedByNumberOnlyFirst()\n        {\n            var json = @\"{\n                'setting': {\n                    'hello': 'a',\n                    'bob': 'b',\n                    '42': 'c',\n                    '4':'d',\n                    '10': 'e',\n                    '1text': 'f',\n                }\n            }\";\n\n            var jsonConfigSource = new JsonConfigurationSource { FileProvider = TestStreamHelpers.StringToFileProvider(json) };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(jsonConfigSource);\n            var config = configurationBuilder.Build();\n\n            var configurationSection = config.GetSection(\"setting\");\n            var indexConfigurationSections = configurationSection.GetChildren().ToArray();\n\n            Assert.Equal(6, indexConfigurationSections.Count());\n            Assert.Equal(\"4\", indexConfigurationSections[0].Key);\n            Assert.Equal(\"10\", indexConfigurationSections[1].Key);\n            Assert.Equal(\"42\", indexConfigurationSections[2].Key);\n            Assert.Equal(\"1text\", indexConfigurationSections[3].Key);\n            Assert.Equal(\"bob\", indexConfigurationSections[4].Key);\n            Assert.Equal(\"hello\", indexConfigurationSections[5].Key);\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Json.Test/Config.Json.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Json.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Json.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.Json\\Config.Json.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Json.Test/JsonConfigurationExtensionsTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Json\n{\n    public class JsonConfigurationExtensionsTest\n    {\n        [Theory]\n        [InlineData(null)]\n        [InlineData(\"\")]\n        public void AddJsonFile_ThrowsIfFilePathIsNullOrEmpty(string path)\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act and Assert\n            var ex = Assert.Throws<ArgumentException>(() => JsonConfigurationExtensions.AddJsonFile(configurationBuilder, path));\n            Assert.Equal(\"path\", ex.ParamName);\n            Assert.StartsWith(\"File path must be a non-empty string.\", ex.Message);\n        }\n\n        [Fact]\n        public void AddJsonFile_ThrowsIfFileDoesNotExistAtPath()\n        {\n            // Arrange\n            var path = \"file-does-not-exist.json\";\n\n            // Act and Assert\n            var ex = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddJsonFile(path).Build());\n            Assert.StartsWith($\"The configuration file '{path}' was not found and is not optional. The physical path is '\", ex.Message);\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Json.Test/JsonConfigurationTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing Microsoft.Extensions.Configuration.Json;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration\n{\n    public class JsonConfigurationTest\n    {\n        private JsonConfigurationProvider LoadProvider(string json)\n        {\n            var p = new JsonConfigurationProvider(new JsonConfigurationSource { Optional = true });\n            p.Load(TestStreamHelpers.StringToStream(json));\n            return p;\n        }\n\n        [Fact]\n        public void LoadKeyValuePairsFromValidJson()\n        {\n            var json = @\"\n{\n    'firstname': 'test',\n    'test.last.name': 'last.name',\n        'residential.address': {\n            'street.name': 'Something street',\n            'zipcode': '12345'\n        }\n}\";\n            var jsonConfigSrc = LoadProvider(json);\n\n            Assert.Equal(\"test\", jsonConfigSrc.Get(\"firstname\"));\n            Assert.Equal(\"last.name\", jsonConfigSrc.Get(\"test.last.name\"));\n            Assert.Equal(\"Something street\", jsonConfigSrc.Get(\"residential.address:STREET.name\"));\n            Assert.Equal(\"12345\", jsonConfigSrc.Get(\"residential.address:zipcode\"));\n        }\n\n        [Fact]\n        public void LoadMethodCanHandleEmptyValue()\n        {\n            var json = @\"\n{\n    'name': ''\n}\";\n            var jsonConfigSrc = LoadProvider(json);\n            Assert.Equal(string.Empty, jsonConfigSrc.Get(\"name\"));\n        }\n\n        [Fact]\n        public void LoadWithCulture()\n        {\n            var previousCulture = CultureInfo.CurrentCulture;\n\n            try\n            {\n                CultureInfo.CurrentCulture = new CultureInfo(\"fr-FR\");\n\n                var json = @\"\n{\n    'number': 3.14\n}\";\n                var jsonConfigSrc = LoadProvider(json);\n                Assert.Equal(\"3.14\", jsonConfigSrc.Get(\"number\"));\n            }\n            finally\n            {\n                CultureInfo.CurrentCulture = previousCulture;\n            }\n        }\n\n        [Fact]\n        public void NonObjectRootIsInvalid()\n        {\n            var json = @\"'test'\";\n\n            var exception = Assert.Throws<FormatException>(\n                () => LoadProvider(json));\n\n            Assert.NotNull(exception.Message);\n        }\n\n        [Fact]\n        public void SupportAndIgnoreComments()\n        {\n            var json = @\"/* Comments */\n                {/* Comments */\n                \"\"name\"\": /* Comments */ \"\"test\"\",\n                \"\"address\"\": {\n                    \"\"street\"\": \"\"Something street\"\", /* Comments */\n                    \"\"zipcode\"\": \"\"12345\"\"\n                }\n            }\";\n            var jsonConfigSrc = LoadProvider(json);\n            Assert.Equal(\"test\", jsonConfigSrc.Get(\"name\"));\n            Assert.Equal(\"Something street\", jsonConfigSrc.Get(\"address:street\"));\n            Assert.Equal(\"12345\", jsonConfigSrc.Get(\"address:zipcode\"));\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenUnexpectedEndFoundBeforeFinishParsing()\n        {\n            var json = @\"{\n                'name': 'test',\n                'address': {\n                    'street': 'Something street',\n                    'zipcode': '12345'\n                }\n            /* Missing a right brace here*/\";\n            var exception = Assert.Throws<FormatException>(() => LoadProvider(json));\n            Assert.NotNull(exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenMissingCurlyBeforeFinishParsing()\n        {\n            var json = @\"\n            {\n              'Data': {\n            \";\n\n            var exception = Assert.Throws<FormatException>(() => LoadProvider(json));\n            Assert.Contains(\"Could not parse the JSON file.\", exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingNullAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddJsonFile(path: null));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingEmptyStringAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddJsonFile(string.Empty));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void JsonConfiguration_Throws_On_Missing_Configuration_File()\n        {\n            var config = new ConfigurationBuilder().AddJsonFile(\"NotExistingConfig.json\", optional: false);\n            var exception = Assert.Throws<FileNotFoundException>(() => config.Build());\n\n            // Assert\n            Assert.StartsWith($\"The configuration file 'NotExistingConfig.json' was not found and is not optional. The physical path is '\", exception.Message);\n        }\n\n        [Fact]\n        public void JsonConfiguration_Does_Not_Throw_On_Optional_Configuration()\n        {\n            var config = new ConfigurationBuilder().AddJsonFile(\"NotExistingConfig.json\", optional: true).Build();\n        }\n\n        [Fact]\n        public void ThrowFormatExceptionWhenFileIsEmpty()\n        {\n            var exception = Assert.Throws<FormatException>(() => LoadProvider(@\"\"));\n        }\n    }\n}"
  },
  {
    "path": "test/Config.KeyPerFile.Test/Config.KeyPerFile.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.KeyPerFile.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.KeyPerFile.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.KeyPerFile\\Config.KeyPerFile.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.KeyPerFile.Test/KeyPerFileTests.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Primitives;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.KeyPerFile.Test\n{\n    public class KeyPerFileTests\n    {\n        [Fact]\n        public void DoesNotThrowWhenOptionalAndNoSecrets()\n        {\n            new ConfigurationBuilder().AddKeyPerFile(o => o.Optional = true).Build();\n        }\n\n        [Fact]\n        public void DoesNotThrowWhenOptionalAndDirectoryDoesntExist()\n        {\n            new ConfigurationBuilder().AddKeyPerFile(\"nonexistent\", true).Build();\n        }\n\n        [Fact]\n        public void ThrowsWhenNotOptionalAndDirectoryDoesntExist()\n        {\n            var e = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddKeyPerFile(\"nonexistent\", false).Build());\n            Assert.Contains(\"The path must be absolute.\", e.Message);\n        }\n\n        [Fact]\n        public void CanLoadMultipleSecrets()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o => o.FileProvider = testFileProvider)\n                .Build();\n\n            Assert.Equal(\"SecretValue1\", config[\"Secret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n\n        [Fact]\n        public void CanLoadMultipleSecretsWithDirectory()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"),\n                new TestFile(\"directory\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o => o.FileProvider = testFileProvider)\n                .Build();\n\n            Assert.Equal(\"SecretValue1\", config[\"Secret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n\n        [Fact]\n        public void CanLoadNestedKeys()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"Secret0__Secret1__Secret2__Key\", \"SecretValue2\"),\n                new TestFile(\"Secret0__Secret1__Key\", \"SecretValue1\"),\n                new TestFile(\"Secret0__Key\", \"SecretValue0\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o => o.FileProvider = testFileProvider)\n                .Build();\n\n            Assert.Equal(\"SecretValue0\", config[\"Secret0:Key\"]);\n            Assert.Equal(\"SecretValue1\", config[\"Secret0:Secret1:Key\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret0:Secret1:Secret2:Key\"]);\n        }\n\n        [Fact]\n        public void CanIgnoreFilesWithDefault()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"ignore.Secret0\", \"SecretValue0\"),\n                new TestFile(\"ignore.Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o => o.FileProvider = testFileProvider)\n                .Build();\n\n            Assert.Null(config[\"ignore.Secret0\"]);\n            Assert.Null(config[\"ignore.Secret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n\n        [Fact]\n        public void CanTurnOffDefaultIgnorePrefixWithCondition()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"ignore.Secret0\", \"SecretValue0\"),\n                new TestFile(\"ignore.Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o =>\n                {\n                    o.FileProvider = testFileProvider;\n                    o.IgnoreCondition = null;\n                })\n                .Build();\n\n            Assert.Equal(\"SecretValue0\", config[\"ignore.Secret0\"]);\n            Assert.Equal(\"SecretValue1\", config[\"ignore.Secret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n\n        [Fact]\n        public void CanIgnoreAllWithCondition()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"Secret0\", \"SecretValue0\"),\n                new TestFile(\"Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o =>\n                {\n                    o.FileProvider = testFileProvider;\n                    o.IgnoreCondition = s => true;\n                })\n                .Build();\n\n            Assert.Empty(config.AsEnumerable());\n        }\n\n        [Fact]\n        public void CanIgnoreFilesWithCustomIgnore()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"meSecret0\", \"SecretValue0\"),\n                new TestFile(\"meSecret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o =>\n                {\n                    o.FileProvider = testFileProvider;\n                    o.IgnorePrefix = \"me\";\n                })\n                .Build();\n\n            Assert.Null(config[\"meSecret0\"]);\n            Assert.Null(config[\"meSecret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n\n        [Fact]\n        public void CanUnIgnoreDefaultFiles()\n        {\n            var testFileProvider = new TestFileProvider(\n                new TestFile(\"ignore.Secret0\", \"SecretValue0\"),\n                new TestFile(\"ignore.Secret1\", \"SecretValue1\"),\n                new TestFile(\"Secret2\", \"SecretValue2\"));\n\n            var config = new ConfigurationBuilder()\n                .AddKeyPerFile(o =>\n                {\n                    o.FileProvider = testFileProvider;\n                    o.IgnorePrefix = null;\n                })\n                .Build();\n\n            Assert.Equal(\"SecretValue0\", config[\"ignore.Secret0\"]);\n            Assert.Equal(\"SecretValue1\", config[\"ignore.Secret1\"]);\n            Assert.Equal(\"SecretValue2\", config[\"Secret2\"]);\n        }\n    }\n\n    class TestFileProvider : IFileProvider\n    {\n        IDirectoryContents _contents;\n        \n        public TestFileProvider(params IFileInfo[] files)\n        {\n            _contents = new TestDirectoryContents(files);\n        }\n\n        public IDirectoryContents GetDirectoryContents(string subpath)\n        {\n            return _contents;\n        }\n\n        public IFileInfo GetFileInfo(string subpath)\n        {\n            throw new NotImplementedException();\n        }\n\n        public IChangeToken Watch(string filter)\n        {\n            throw new NotImplementedException();\n        }\n    }\n\n    class TestDirectoryContents : IDirectoryContents\n    {\n        List<IFileInfo> _list;\n\n        public TestDirectoryContents(params IFileInfo[] files)\n        {\n            _list = new List<IFileInfo>(files);\n        }\n\n        public bool Exists\n        {\n            get\n            {\n                return true;\n            }\n        }\n\n        public IEnumerator<IFileInfo> GetEnumerator()\n        {\n            return _list.GetEnumerator();\n        }\n\n        IEnumerator IEnumerable.GetEnumerator()\n        {\n            return GetEnumerator();\n        }\n    }\n\n    //TODO: Probably need a directory and file type.\n    class TestFile : IFileInfo\n    {\n        private string _name;\n        private string _contents;\n\n        public bool Exists\n        {\n            get\n            {\n                return true;\n            }\n        }\n\n        public bool IsDirectory\n        {\n            get;\n        }\n\n        public DateTimeOffset LastModified\n        {\n            get\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        public long Length\n        {\n            get\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        public string Name\n        {\n            get\n            {\n                return _name;\n            }\n        }\n\n        public string PhysicalPath\n        {\n            get\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        public TestFile(string name)\n        {\n            _name = name;\n            IsDirectory = true;\n        }\n\n        public TestFile(string name, string contents)\n        {\n            _name = name;\n            _contents = contents;\n        }\n\n        public Stream CreateReadStream()\n        {\n            if(IsDirectory)\n            {\n                throw new InvalidOperationException(\"Cannot create stream from directory\");\n            }\n\n            return new MemoryStream(Encoding.UTF8.GetBytes(_contents));\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Test/Config.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.FileExtensions\\Config.FileExtensions.csproj\" />\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Test/ConfigurationPathComparerTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public class ConfigurationPathComparerTest\n    {\n        [Fact]\n        public void CompareWithNull()\n        {\n            ComparerTest(null, null, 0);\n            ComparerTest(null, \"a\", -1);\n            ComparerTest(\"b\", null, 1);\n        }\n\n        [Fact]\n        public void CompareWithSameLength()\n        {\n            ComparerTest(\"a\", \"a\", 0);\n            ComparerTest(\"a\", \"A\", 0);\n\n            ComparerTest(\"aB\", \"Ab\", 0);\n        }\n\n        [Fact]\n        public void CompareWithDifferentLengths()\n        {\n            ComparerTest(\"a\", \"aa\", -1);\n            ComparerTest(\"aa\", \"a\", 1);\n        }\n\n        [Fact]\n        public void CompareWithLetters()\n        {\n            ComparerTest(\"a\", \"b\", -1);\n            ComparerTest(\"b\", \"a\", 1);\n        }\n\n        [Fact]\n        public void CompareWithNumbers()\n        {\n            ComparerTest(\"000\", \"0\", 0);\n            ComparerTest(\"001\", \"1\", 0);\n\n            ComparerTest(\"1\", \"1\", 0);\n\n            ComparerTest(\"1\", \"10\", -1);\n            ComparerTest(\"10\", \"1\", 1);\n\n            ComparerTest(\"2\", \"10\", -1);\n            ComparerTest(\"10\", \"2\", 1);\n        }\n\n        [Fact]\n        public void CompareWithNumbersAndLetters()\n        {\n            ComparerTest(\"1\", \"a\", -1);\n            ComparerTest(\"a\", \"1\", 1);\n\n            ComparerTest(\"100\", \"a\", -1);\n            ComparerTest(\"a\", \"100\", 1);\n        }\n\n        [Fact]\n        public void CompareWithNonNumbers()\n        {\n            ComparerTest(\"1a\", \"100\", 1);\n            ComparerTest(\"100\", \"1a\", -1);\n\n            ComparerTest(\"100a\", \"100\", 1);\n            ComparerTest(\"100\", \"100a\", -1);\n\n            ComparerTest(\"a100\", \"100\", 1);\n            ComparerTest(\"100\", \"a100\", -1);\n\n            ComparerTest(\"1a\", \"a\", -1);\n            ComparerTest(\"a\", \"1a\", 1);\n        }\n\n        [Fact]\n        public void CompareIdenticalPaths()\n        {\n            ComparerTest(\"abc:DEF:0:a100\", \"ABC:DEF:0:a100\", 0);\n        }\n\n        [Fact]\n        public void CompareDifferentPaths()\n        {\n            ComparerTest(\"abc:def\", \"ghi:2\", -1);\n            ComparerTest(\"ghi:2\", \"abc:def\", 1);\n        }\n\n        [Fact]\n        public void ComparePathsWithCommonPart()\n        {\n            ComparerTest(\"abc:def:XYQ\", \"abc:def:XYZ\", -1);\n            ComparerTest(\"abc:def:XYZ\", \"abc:def:XYQ\", 1);\n        }\n\n        [Fact]\n        public void ComparePathsWithCommonPartButShorter()\n        {\n            ComparerTest(\"abc:def\", \"abc:def:ghi\", -1);\n            ComparerTest(\"abc:def:ghi\", \"abc:def\", 1);\n        }\n\n        [Fact]\n        public void ComparePathsWithIndicesAtTheEnd()\n        {\n            ComparerTest(\"abc:def:2\", \"abc:def:10\", -1);\n            ComparerTest(\"abc:def:10\", \"abc:def:2\", 1);\n\n            ComparerTest(\"abc:def:10\", \"abc:def:22\", -1);\n            ComparerTest(\"abc:def:22\", \"abc:def:10\", 1);\n        }\n\n        [Fact]\n        public void ComparePathsWithIndicesInside()\n        {\n            ComparerTest(\"abc:def:1000:jkl\", \"abc:def:ghi:jkl\", -1);\n            ComparerTest(\"abc:def:ghi:jkl\", \"abc:def:1000:jkl\", 1);\n\n            ComparerTest(\"abc:def:10:jkl\", \"abc:def:22:jkl\", -1);\n            ComparerTest(\"abc:def:22:jkl\", \"abc:def:10:jkl\", 1);\n        }\n\n        private static void ComparerTest(string a, string b, int expectedSign)\n        {\n            var result = ConfigurationKeyComparer.Instance.Compare(a, b);\n            Assert.Equal(expectedSign, Math.Sign(result));\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Test/ConfigurationPathTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public class ConfigurationPathTest\n    {\n        [Fact]\n        public void CombineWithEmptySegmentLeavesDelimiter()\n        {\n            Assert.Equal(\"parent:\", ConfigurationPath.Combine(\"parent\", \"\"));\n            Assert.Equal(\"parent::\", ConfigurationPath.Combine(\"parent\", \"\", \"\"));\n            Assert.Equal(\"parent:::key\", ConfigurationPath.Combine(\"parent\", \"\", \"\", \"key\"));\n        }\n\n        [Fact]\n        public void GetLastSegmenGetSectionKeyTests()\n        {\n            Assert.Null(ConfigurationPath.GetSectionKey(null));\n            Assert.Equal(\"\", ConfigurationPath.GetSectionKey(\"\"));\n            Assert.Equal(\"\", ConfigurationPath.GetSectionKey(\":::\"));\n            Assert.Equal(\"c\", ConfigurationPath.GetSectionKey(\"a::b:::c\"));\n            Assert.Equal(\"\", ConfigurationPath.GetSectionKey(\"a:::b:\"));\n            Assert.Equal(\"key\", ConfigurationPath.GetSectionKey(\"key\"));\n            Assert.Equal(\"key\", ConfigurationPath.GetSectionKey(\":key\"));\n            Assert.Equal(\"key\", ConfigurationPath.GetSectionKey(\"::key\"));\n            Assert.Equal(\"key\", ConfigurationPath.GetSectionKey(\"parent:key\"));\n        }\n\n        [Fact]\n        public void GetParentPathTests()\n        {\n            Assert.Null(ConfigurationPath.GetParentPath(null));\n            Assert.Null(ConfigurationPath.GetParentPath(\"\"));\n            Assert.Equal(\"::\", ConfigurationPath.GetParentPath(\":::\"));\n            Assert.Equal(\"a::b::\", ConfigurationPath.GetParentPath(\"a::b:::c\"));\n            Assert.Equal(\"a:::b\", ConfigurationPath.GetParentPath(\"a:::b:\"));\n            Assert.Null(ConfigurationPath.GetParentPath(\"key\"));\n            Assert.Equal(\"\", ConfigurationPath.GetParentPath(\":key\"));\n            Assert.Equal(\":\", ConfigurationPath.GetParentPath(\"::key\"));\n            Assert.Equal(\"parent\", ConfigurationPath.GetParentPath(\"parent:key\"));\n        }\n\n    }\n}\n"
  },
  {
    "path": "test/Config.Test/ConfigurationTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.Extensions.Configuration.Memory;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public class ConfigurationTest\n    {\n        [Fact]\n        public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProviders()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Mem2:KeyInMem2\", \"ValueInMem2\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Mem3:KeyInMem3\", \"ValueInMem3\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            var memVal1 = config[\"mem1:keyinmem1\"];\n            var memVal2 = config[\"Mem2:KeyInMem2\"];\n            var memVal3 = config[\"MEM3:KEYINMEM3\"];\n\n            // Assert\n            Assert.Contains(memConfigSrc1, configurationBuilder.Sources);\n            Assert.Contains(memConfigSrc2, configurationBuilder.Sources);\n            Assert.Contains(memConfigSrc3, configurationBuilder.Sources);\n\n            Assert.Equal(\"ValueInMem1\", memVal1);\n            Assert.Equal(\"ValueInMem2\", memVal2);\n            Assert.Equal(\"ValueInMem3\", memVal3);\n\n            Assert.Equal(\"ValueInMem1\", config[\"mem1:keyinmem1\"]);\n            Assert.Equal(\"ValueInMem2\", config[\"Mem2:KeyInMem2\"]);\n            Assert.Equal(\"ValueInMem3\", config[\"MEM3:KEYINMEM3\"]);\n            Assert.Null(config[\"NotExist\"]);\n        }\n\n        [Fact]\n        public void CanChainConfiguration()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Mem2:KeyInMem2\", \"ValueInMem2\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Mem3:KeyInMem3\", \"ValueInMem3\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            var chained = new ConfigurationBuilder().AddConfiguration(config).Build();\n            var memVal1 = chained[\"mem1:keyinmem1\"];\n            var memVal2 = chained[\"Mem2:KeyInMem2\"];\n            var memVal3 = chained[\"MEM3:KEYINMEM3\"];\n\n            // Assert\n\n            Assert.Equal(\"ValueInMem1\", memVal1);\n            Assert.Equal(\"ValueInMem2\", memVal2);\n            Assert.Equal(\"ValueInMem3\", memVal3);\n\n            Assert.Null(chained[\"NotExist\"]);\n        }\n\n        [Theory]\n        [InlineData(true)]\n        [InlineData(false)]\n        public void ChainedAsEnumerateFlattensIntoDictionaryTest(bool removePath)\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Mem1\", \"Value1\"},\n                {\"Mem1:\", \"NoKeyValue1\"},\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"},\n                {\"Mem1:KeyInMem1:Deep1\", \"ValueDeep1\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Mem2\", \"Value2\"},\n                {\"Mem2:\", \"NoKeyValue2\"},\n                {\"Mem2:KeyInMem2\", \"ValueInMem2\"},\n                {\"Mem2:KeyInMem2:Deep2\", \"ValueDeep2\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Mem3\", \"Value3\"},\n                {\"Mem3:\", \"NoKeyValue3\"},\n                {\"Mem3:KeyInMem3\", \"ValueInMem3\"},\n                {\"Mem3:KeyInMem3:Deep3\", \"ValueDeep3\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            var config = new ConfigurationBuilder()\n                .AddConfiguration(configurationBuilder.Build())\n                .Add(memConfigSrc3)\n                .Build();\n            var dict = config.AsEnumerable(makePathsRelative: removePath).ToDictionary(k => k.Key, v => v.Value);\n\n            // Assert\n            Assert.Equal(\"Value1\", dict[\"Mem1\"]);\n            Assert.Equal(\"NoKeyValue1\", dict[\"Mem1:\"]);\n            Assert.Equal(\"ValueDeep1\", dict[\"Mem1:KeyInMem1:Deep1\"]);\n            Assert.Equal(\"ValueInMem2\", dict[\"Mem2:KeyInMem2\"]);\n            Assert.Equal(\"Value2\", dict[\"Mem2\"]);\n            Assert.Equal(\"NoKeyValue2\", dict[\"Mem2:\"]);\n            Assert.Equal(\"ValueDeep2\", dict[\"Mem2:KeyInMem2:Deep2\"]);\n            Assert.Equal(\"Value3\", dict[\"Mem3\"]);\n            Assert.Equal(\"NoKeyValue3\", dict[\"Mem3:\"]);\n            Assert.Equal(\"ValueInMem3\", dict[\"Mem3:KeyInMem3\"]);\n            Assert.Equal(\"ValueDeep3\", dict[\"Mem3:KeyInMem3:Deep3\"]);\n        }\n\n        [Theory]\n        [InlineData(true)]\n        [InlineData(false)]\n        public void AsEnumerateFlattensIntoDictionaryTest(bool removePath)\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Mem1\", \"Value1\"},\n                {\"Mem1:\", \"NoKeyValue1\"},\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"},\n                {\"Mem1:KeyInMem1:Deep1\", \"ValueDeep1\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Mem2\", \"Value2\"},\n                {\"Mem2:\", \"NoKeyValue2\"},\n                {\"Mem2:KeyInMem2\", \"ValueInMem2\"},\n                {\"Mem2:KeyInMem2:Deep2\", \"ValueDeep2\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Mem3\", \"Value3\"},\n                {\"Mem3:\", \"NoKeyValue3\"},\n                {\"Mem3:KeyInMem3\", \"ValueInMem3\"},\n                {\"Mem3:KeyInMem3:Deep3\", \"ValueDeep3\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n            var config = configurationBuilder.Build();\n            var dict = config.AsEnumerable(makePathsRelative: removePath).ToDictionary(k => k.Key, v => v.Value);\n\n            // Assert\n            Assert.Equal(\"Value1\", dict[\"Mem1\"]);\n            Assert.Equal(\"NoKeyValue1\", dict[\"Mem1:\"]);\n            Assert.Equal(\"ValueDeep1\", dict[\"Mem1:KeyInMem1:Deep1\"]);\n            Assert.Equal(\"ValueInMem2\", dict[\"Mem2:KeyInMem2\"]);\n            Assert.Equal(\"Value2\", dict[\"Mem2\"]);\n            Assert.Equal(\"NoKeyValue2\", dict[\"Mem2:\"]);\n            Assert.Equal(\"ValueDeep2\", dict[\"Mem2:KeyInMem2:Deep2\"]);\n            Assert.Equal(\"Value3\", dict[\"Mem3\"]);\n            Assert.Equal(\"NoKeyValue3\", dict[\"Mem3:\"]);\n            Assert.Equal(\"ValueInMem3\", dict[\"Mem3:KeyInMem3\"]);\n            Assert.Equal(\"ValueDeep3\", dict[\"Mem3:KeyInMem3:Deep3\"]);\n        }\n\n        [Fact]\n        public void AsEnumerateStripsKeyFromChildren()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Mem1\", \"Value1\"},\n                {\"Mem1:\", \"NoKeyValue1\"},\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"},\n                {\"Mem1:KeyInMem1:Deep1\", \"ValueDeep1\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Mem2\", \"Value2\"},\n                {\"Mem2:\", \"NoKeyValue2\"},\n                {\"Mem2:KeyInMem2\", \"ValueInMem2\"},\n                {\"Mem2:KeyInMem2:Deep2\", \"ValueDeep2\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Mem3\", \"Value3\"},\n                {\"Mem3:\", \"NoKeyValue3\"},\n                {\"Mem3:KeyInMem3\", \"ValueInMem3\"},\n                {\"Mem3:KeyInMem4\", \"ValueInMem4\"},\n                {\"Mem3:KeyInMem3:Deep3\", \"ValueDeep3\"},\n                {\"Mem3:KeyInMem3:Deep4\", \"ValueDeep4\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            var dict = config.GetSection(\"Mem1\").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value);\n            Assert.Equal(3, dict.Count);\n            Assert.Equal(\"NoKeyValue1\", dict[\"\"]);\n            Assert.Equal(\"ValueInMem1\", dict[\"KeyInMem1\"]);\n            Assert.Equal(\"ValueDeep1\", dict[\"KeyInMem1:Deep1\"]);\n\n            var dict2 = config.GetSection(\"Mem2\").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value);\n            Assert.Equal(3, dict2.Count);\n            Assert.Equal(\"NoKeyValue2\", dict2[\"\"]);\n            Assert.Equal(\"ValueInMem2\", dict2[\"KeyInMem2\"]);\n            Assert.Equal(\"ValueDeep2\", dict2[\"KeyInMem2:Deep2\"]);\n\n            var dict3 = config.GetSection(\"Mem3\").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value);\n            Assert.Equal(5, dict3.Count);\n            Assert.Equal(\"NoKeyValue3\", dict3[\"\"]);\n            Assert.Equal(\"ValueInMem3\", dict3[\"KeyInMem3\"]);\n            Assert.Equal(\"ValueInMem4\", dict3[\"KeyInMem4\"]);\n            Assert.Equal(\"ValueDeep3\", dict3[\"KeyInMem3:Deep3\"]);\n            Assert.Equal(\"ValueDeep4\", dict3[\"KeyInMem3:Deep4\"]);\n        }\n\n\n        [Fact]\n        public void NewConfigurationProviderOverridesOldOneWhenKeyIsDuplicated()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n                {\n                    {\"Key1:Key2\", \"ValueInMem1\"}\n                };\n            var dic2 = new Dictionary<string, string>()\n                {\n                    {\"Key1:Key2\", \"ValueInMem2\"}\n                };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n\n            var config = configurationBuilder.Build();\n\n            // Assert\n            Assert.Equal(\"ValueInMem2\", config[\"Key1:Key2\"]);\n        }\n\n        public class TestMemorySourceProvider : MemoryConfigurationProvider, IConfigurationSource\n        {\n            public TestMemorySourceProvider(Dictionary<string, string> initialData) \n                : base(new MemoryConfigurationSource { InitialData = initialData })\n            { }\n\n            public IConfigurationProvider Build(IConfigurationBuilder builder)\n            {\n                return this;\n            }\n        }\n\n        [Fact]\n        public void SettingValueUpdatesAllConfigurationProviders()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>()\n            {\n                {\"Key1\", \"Value1\"},\n                {\"Key2\", \"Value2\"}\n            };\n\n            var memConfigSrc1 = new TestMemorySourceProvider(dict);\n            var memConfigSrc2 = new TestMemorySourceProvider(dict);\n            var memConfigSrc3 = new TestMemorySourceProvider(dict);\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            // Act\n            config[\"Key1\"] = \"NewValue1\";\n            config[\"Key2\"] = \"NewValue2\";\n\n            var memConfigProvider1 = memConfigSrc1.Build(configurationBuilder);\n            var memConfigProvider2 = memConfigSrc2.Build(configurationBuilder);\n            var memConfigProvider3 = memConfigSrc3.Build(configurationBuilder);\n\n            // Assert\n            Assert.Equal(\"NewValue1\", config[\"Key1\"]);\n            Assert.Equal(\"NewValue1\", memConfigProvider1.Get(\"Key1\"));\n            Assert.Equal(\"NewValue1\", memConfigProvider2.Get(\"Key1\"));\n            Assert.Equal(\"NewValue1\", memConfigProvider3.Get(\"Key1\"));\n            Assert.Equal(\"NewValue2\", config[\"Key2\"]);\n            Assert.Equal(\"NewValue2\", memConfigProvider1.Get(\"Key2\"));\n            Assert.Equal(\"NewValue2\", memConfigProvider2.Get(\"Key2\"));\n            Assert.Equal(\"NewValue2\", memConfigProvider3.Get(\"Key2\"));\n        }\n\n        [Fact]\n        public void CanGetConfigurationSection()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Data:DB1:Connection1\", \"MemVal1\"},\n                {\"Data:DB1:Connection2\", \"MemVal2\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"DataSource:DB2:Connection\", \"MemVal3\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"Data\", \"MemVal4\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            // Act\n            var configFocus = config.GetSection(\"Data\");\n\n            var memVal1 = configFocus[\"DB1:Connection1\"];\n            var memVal2 = configFocus[\"DB1:Connection2\"];\n            var memVal3 = configFocus[\"DB2:Connection\"];\n            var memVal4 = configFocus[\"Source:DB2:Connection\"];\n            var memVal5 = configFocus.Value;\n\n            // Assert\n            Assert.Equal(\"MemVal1\", memVal1);\n            Assert.Equal(\"MemVal2\", memVal2);\n            Assert.Equal(\"MemVal4\", memVal5);\n\n            Assert.Equal(\"MemVal1\", configFocus[\"DB1:Connection1\"]);\n            Assert.Equal(\"MemVal2\", configFocus[\"DB1:Connection2\"]);\n            Assert.Null(configFocus[\"DB2:Connection\"]);\n            Assert.Null(configFocus[\"Source:DB2:Connection\"]);\n            Assert.Equal(\"MemVal4\", configFocus.Value);\n        }\n\n        [Fact]\n        public void CanGetConnectionStrings()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"ConnectionStrings:DB1:Connection1\", \"MemVal1\"},\n                {\"ConnectionStrings:DB1:Connection2\", \"MemVal2\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"ConnectionStrings:DB2:Connection\", \"MemVal3\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n\n            var config = configurationBuilder.Build();\n\n            // Act\n            var memVal1 = config.GetConnectionString(\"DB1:Connection1\");\n            var memVal2 = config.GetConnectionString(\"DB1:Connection2\");\n            var memVal3 = config.GetConnectionString(\"DB2:Connection\");\n\n            // Assert\n            Assert.Equal(\"MemVal1\", memVal1);\n            Assert.Equal(\"MemVal2\", memVal2);\n            Assert.Equal(\"MemVal3\", memVal3);\n        }\n\n        [Fact]\n        public void CanGetConfigurationChildren()\n        {\n            // Arrange\n            var dic1 = new Dictionary<string, string>()\n            {\n                {\"Data:DB1:Connection1\", \"MemVal1\"},\n                {\"Data:DB1:Connection2\", \"MemVal2\"}\n            };\n            var dic2 = new Dictionary<string, string>()\n            {\n                {\"Data:DB2Connection\", \"MemVal3\"}\n            };\n            var dic3 = new Dictionary<string, string>()\n            {\n                {\"DataSource:DB3:Connection\", \"MemVal4\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dic1 };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dic2 };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dic3 };\n\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            // Act\n            var configSections = config.GetSection(\"Data\").GetChildren().ToList();\n\n            // Assert\n            Assert.Equal(2, configSections.Count());\n            Assert.Equal(\"MemVal1\", configSections.FirstOrDefault(c => c.Key == \"DB1\")[\"Connection1\"]);\n            Assert.Equal(\"MemVal2\", configSections.FirstOrDefault(c => c.Key == \"DB1\")[\"Connection2\"]);\n            Assert.Equal(\"MemVal3\", configSections.FirstOrDefault(c => c.Key == \"DB2Connection\").Value);\n            Assert.False(configSections.Exists(c => c.Key == \"DB3\"));\n            Assert.False(configSections.Exists(c => c.Key == \"DB3\"));\n        }\n\n        [Fact]\n        public void SourcesReturnsAddedConfigurationProviders()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>()\n            {\n                {\"Mem:KeyInMem\", \"MemVal\"}\n            };\n            var memConfigSrc1 = new MemoryConfigurationSource { InitialData = dict };\n            var memConfigSrc2 = new MemoryConfigurationSource { InitialData = dict };\n            var memConfigSrc3 = new MemoryConfigurationSource { InitialData = dict };\n\n            var srcSet = new HashSet<IConfigurationSource>()\n            {\n                memConfigSrc1,\n                memConfigSrc2,\n                memConfigSrc3\n            };\n\n            var configurationBuilder = new ConfigurationBuilder();\n\n            // Act\n            configurationBuilder.Add(memConfigSrc1);\n            configurationBuilder.Add(memConfigSrc2);\n            configurationBuilder.Add(memConfigSrc3);\n\n            var config = configurationBuilder.Build();\n\n            // Assert\n            Assert.Equal(new[] { memConfigSrc1, memConfigSrc2, memConfigSrc3 }, configurationBuilder.Sources);\n        }\n\n        [Fact]\n        public void SetValueThrowsExceptionNoSourceRegistered()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            var expectedMsg = Resources.Error_NoSources;\n\n            // Act\n            var ex = Assert.Throws<InvalidOperationException>(() => config[\"Title\"] = \"Welcome\");\n\n            // Assert\n            Assert.Equal(expectedMsg, ex.Message);\n        }\n\n        [Fact]\n        public void SameReloadTokenIsReturnedRepeatedly()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            // Act\n            var token1 = config.GetReloadToken();\n            var token2 = config.GetReloadToken();\n\n            // Assert\n            Assert.Same(token1, token2);\n        }\n\n        [Fact]\n        public void DifferentReloadTokenReturnedAfterReloading()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            // Act\n            var token1 = config.GetReloadToken();\n            var token2 = config.GetReloadToken();\n            config.Reload();\n            var token3 = config.GetReloadToken();\n            var token4 = config.GetReloadToken();\n\n            // Assert\n            Assert.Same(token1, token2);\n            Assert.Same(token3, token4);\n            Assert.NotSame(token1, token3);\n        }\n\n        [Fact]\n        public void TokenTriggeredWhenReloadOccurs()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            // Act\n            var token1 = config.GetReloadToken();\n            var hasChanged1 = token1.HasChanged;\n            config.Reload();\n            var hasChanged2 = token1.HasChanged;\n\n            // Assert\n            Assert.False(hasChanged1);\n            Assert.True(hasChanged2);\n        }\n\n        [Fact]\n        public void MultipleCallbacksCanBeRegisteredToReload()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            // Act\n            var token1 = config.GetReloadToken();\n            var called1 = 0;\n            token1.RegisterChangeCallback(_ => called1++, state: null);\n            var called2 = 0;\n            token1.RegisterChangeCallback(_ => called2++, state: null);\n\n            // Assert\n            Assert.Equal(0, called1);\n            Assert.Equal(0, called2);\n\n            config.Reload();\n            Assert.Equal(1, called1);\n            Assert.Equal(1, called2);\n\n            var token2 = config.GetReloadToken();\n            var cleanup1 = token2.RegisterChangeCallback(_ => called1++, state: null);\n            token2.RegisterChangeCallback(_ => called2++, state: null);\n\n            cleanup1.Dispose();\n\n            config.Reload();\n            Assert.Equal(1, called1);\n            Assert.Equal(2, called2);\n        }\n\n        [Fact]\n        public void NewTokenAfterReloadIsNotChanged()\n        {\n            // Arrange\n            var configurationBuilder = new ConfigurationBuilder();\n            var config = configurationBuilder.Build();\n\n            // Act\n            var token1 = config.GetReloadToken();\n            var hasChanged1 = token1.HasChanged;\n            config.Reload();\n            var hasChanged2 = token1.HasChanged;\n            var token2 = config.GetReloadToken();\n            var hasChanged3 = token2.HasChanged;\n\n            // Assert\n            Assert.False(hasChanged1);\n            Assert.True(hasChanged2);\n            Assert.False(hasChanged3);\n            Assert.NotSame(token1, token2);\n        }\n\n        [Fact]\n        public void KeyStartingWithColonMeansFirstSectionHasEmptyName()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>\n            {\n                [\":Key2\"] = \"value\"\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dict);\n            var config = configurationBuilder.Build();\n\n            // Act\n            var children = config.GetChildren().ToArray();\n\n            // Assert\n            Assert.Single(children);\n            Assert.Equal(string.Empty, children.First().Key);\n            Assert.Single(children.First().GetChildren());\n            Assert.Equal(\"Key2\", children.First().GetChildren().First().Key);\n        }\n\n        [Fact]\n        public void KeyWithDoubleColonHasSectionWithEmptyName()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>\n            {\n                [\"Key1::Key3\"] = \"value\"\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dict);\n            var config = configurationBuilder.Build();\n\n            // Act\n            var children = config.GetChildren().ToArray();\n\n            // Assert\n            Assert.Single(children);\n            Assert.Equal(\"Key1\", children.First().Key);\n            Assert.Single(children.First().GetChildren());\n            Assert.Equal(string.Empty, children.First().GetChildren().First().Key);\n            Assert.Single(children.First().GetChildren().First().GetChildren());\n            Assert.Equal(\"Key3\", children.First().GetChildren().First().GetChildren().First().Key);\n        }\n\n        [Fact]\n        public void KeyEndingWithColonMeansLastSectionHasEmptyName()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>\n            {\n                [\"Key1:\"] = \"value\"\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dict);\n            var config = configurationBuilder.Build();\n\n            // Act\n            var children = config.GetChildren().ToArray();\n\n            // Assert\n            Assert.Single(children);\n            Assert.Equal(\"Key1\", children.First().Key);\n            Assert.Single(children.First().GetChildren());\n            Assert.Equal(string.Empty, children.First().GetChildren().First().Key);\n        }\n\n        [Fact]\n        public void SectionWithValueExists()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>()\n            {\n                {\"Mem1\", \"Value1\"},\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"},\n                {\"Mem1:KeyInMem1:Deep1\", \"ValueDeep1\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dict);\n            var config = configurationBuilder.Build();\n\n            // Act\n            var sectionExists1 = config.GetSection(\"Mem1\").Exists();\n            var sectionExists2 = config.GetSection(\"Mem1:KeyInMem1\").Exists();\n            var sectionNotExists = config.GetSection(\"Mem2\").Exists();\n\n            // Assert\n            Assert.True(sectionExists1);\n            Assert.True(sectionExists2);\n            Assert.False(sectionNotExists);\n        }\n\n        [Fact]\n        public void SectionWithChildrenExists()\n        {\n            // Arrange\n            var dict = new Dictionary<string, string>()\n            {\n                {\"Mem1:KeyInMem1\", \"ValueInMem1\"},\n                {\"Mem1:KeyInMem1:Deep1\", \"ValueDeep1\"},\n                {\"Mem2:KeyInMem2:Deep1\", \"ValueDeep2\"}\n            };\n            var configurationBuilder = new ConfigurationBuilder();\n            configurationBuilder.AddInMemoryCollection(dict);\n            var config = configurationBuilder.Build();\n\n            // Act\n            var sectionExists1 = config.GetSection(\"Mem1\").Exists();\n            var sectionExists2 = config.GetSection(\"Mem2\").Exists();\n            var sectionNotExists = config.GetSection(\"Mem3\").Exists();\n\n            // Assert\n            Assert.True(sectionExists1);\n            Assert.True(sectionExists2);\n            Assert.False(sectionNotExists);\n        }\n\n        [Fact]\n        public void NullSectionDoesNotExist()\n        {\n            // Arrange\n            // Act\n            var sectionExists = ConfigurationExtensions.Exists(null);\n\n            // Assert\n            Assert.False(sectionExists);\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Test.Common/Config.Test.Common.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Test.Common</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Test.Common</RootNamespace>\n    <TargetFramework>netstandard2.0</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config\\Config.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Physical\" Version=\"$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Test.Common/ConfigurationProviderExtensions.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public static class ConfigurationProviderExtensions\n    {\n        public static string Get(this IConfigurationProvider provider, string key)\n        {\n            string value;\n\n            if (!provider.TryGet(key, out value))\n            {\n                throw new InvalidOperationException(\"Key not found\");\n            }\n\n            return value;\n        }\n    }\n}"
  },
  {
    "path": "test/Config.Test.Common/TestStreamHelpers.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Primitives;\n\nnamespace Microsoft.Extensions.Configuration.Test\n{\n    public static class TestStreamHelpers\n    {\n        public static readonly string ArbitraryFilePath = \"Unit tests do not touch file system\";\n\n        public static IFileProvider StringToFileProvider(string str)\n        {\n            return new TestFileProvider(str);\n\n        }\n\n        private class TestFile : IFileInfo\n        {\n            private readonly string _data;\n\n            public TestFile(string str)\n            {\n                _data = str;\n            }\n\n            public bool Exists\n            {\n                get\n                {\n                    return true;\n                }\n            }\n\n            public bool IsDirectory\n            {\n                get\n                {\n                    return false;\n                }\n            }\n\n            public DateTimeOffset LastModified\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public long Length\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public string Name\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public string PhysicalPath\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            public Stream CreateReadStream()\n            {\n                return StringToStream(_data);\n            }\n        }\n\n        private class TestFileProvider : IFileProvider\n        {\n            private string _data;\n            public TestFileProvider(string str)\n            {\n                _data = str;\n            }\n\n            public IDirectoryContents GetDirectoryContents(string subpath)\n            {\n                throw new NotImplementedException();\n            }\n\n            public IFileInfo GetFileInfo(string subpath)\n            {\n                return new TestFile(_data);\n            }\n\n            public IChangeToken Watch(string filter)\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        public static Stream StringToStream(string str)\n        {\n            var memStream = new MemoryStream();\n            var textWriter = new StreamWriter(memStream);\n            textWriter.Write(str);\n            textWriter.Flush();\n            memStream.Seek(0, SeekOrigin.Begin);\n\n            return memStream;\n        }\n\n        public static string StreamToString(Stream stream)\n        {\n            stream.Seek(0, SeekOrigin.Begin);\n            var reader = new StreamReader(stream);\n\n            return reader.ReadToEnd();\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.UserSecrets.Test/Config.UserSecrets.Test.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.UserSecrets.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.UserSecrets.Test</RootNamespace>\n    <TargetFramework>netcoreapp2.2</TargetFramework>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\Config.UserSecrets\\Config.UserSecrets.csproj\" />\n\n    <AssemblyAttribute Include=\"System.Reflection.AssemblyMetadataAttribute\">\n      <_Parameter1>TargetFramework</_Parameter1>\n      <_Parameter2>$(TargetFramework)</_Parameter2>\n    </AssemblyAttribute>\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.UserSecrets.Test/ConfigurationExtensionTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Reflection;\nusing System.Text;\nusing Microsoft.Extensions.Configuration.UserSecrets;\nusing Microsoft.Extensions.Configuration.UserSecrets.Test;\nusing Newtonsoft.Json.Linq;\nusing Xunit;\n\n[assembly: UserSecretsId(ConfigurationExtensionTest.TestSecretsId)]\n\nnamespace Microsoft.Extensions.Configuration.UserSecrets.Test\n{\n    public class ConfigurationExtensionTest : IDisposable\n    {\n        public const string TestSecretsId = \"d6076a6d3ab24c00b2511f10a56c68cc\";\n\n        private List<string> _tmpDirectories = new List<string>();\n\n        private void SetSecret(string id, string key, string value)\n        {\n            var secretsFilePath = PathHelper.GetSecretsPathFromSecretsId(id);\n\n            var dir = Path.GetDirectoryName(secretsFilePath);\n            Directory.CreateDirectory(dir);\n            _tmpDirectories.Add(dir);\n\n            var secrets = new ConfigurationBuilder()\n                .AddJsonFile(secretsFilePath, optional: true)\n                .Build()\n                .AsEnumerable()\n                .Where(i => i.Value != null)\n                .ToDictionary(i => i.Key, i => i.Value, StringComparer.OrdinalIgnoreCase);\n\n            secrets[key] = value;\n\n            var contents = new JObject();\n            if (secrets != null)\n            {\n                foreach (var secret in secrets.AsEnumerable())\n                {\n                    contents[secret.Key] = secret.Value;\n                }\n            }\n\n            File.WriteAllText(secretsFilePath, contents.ToString(), Encoding.UTF8);\n        }\n\n        [Fact]\n        public void AddUserSecrets_FindsAssemblyAttribute()\n        {\n            var randValue = Guid.NewGuid().ToString();\n            var configKey = \"MyDummySetting\";\n\n            SetSecret(TestSecretsId, configKey, randValue);\n            var config = new ConfigurationBuilder()\n                .AddUserSecrets(typeof(ConfigurationExtensionTest).GetTypeInfo().Assembly)\n                .Build();\n\n            Assert.Equal(randValue, config[configKey]);\n        }\n\n        [Fact]\n        public void AddUserSecrets_FindsAssemblyAttributeFromType()\n        {\n            var randValue = Guid.NewGuid().ToString();\n            var configKey = \"MyDummySetting\";\n\n            SetSecret(TestSecretsId, configKey, randValue);\n            var config = new ConfigurationBuilder()\n                .AddUserSecrets<ConfigurationExtensionTest>()\n                .Build();\n\n            Assert.Equal(randValue, config[configKey]);\n        }\n\n        [Fact]\n        public void AddUserSecrets_ThrowsIfAssemblyAttributeFromType()\n        {\n            var ex = Assert.Throws<InvalidOperationException>(() =>\n                new ConfigurationBuilder().AddUserSecrets<string>());\n            Assert.Equal(Resources.FormatError_Missing_UserSecretsIdAttribute(typeof(string).GetTypeInfo().Assembly.GetName().Name),\n                ex.Message);\n\n            ex = Assert.Throws<InvalidOperationException>(() =>\n                new ConfigurationBuilder().AddUserSecrets(typeof(JObject).Assembly));\n            Assert.Equal(Resources.FormatError_Missing_UserSecretsIdAttribute(typeof(JObject).GetTypeInfo().Assembly.GetName().Name),\n                ex.Message);\n        }\n\n\n        [Fact]\n        public void AddUserSecrets_DoesNotThrowsIfOptional()\n        {\n            var config = new ConfigurationBuilder()\n                .AddUserSecrets<string>(optional: true)\n                .AddUserSecrets(typeof(List<>).Assembly, optional: true)\n                .Build();\n\n            Assert.Empty(config.AsEnumerable());\n        }\n\n        [Fact]\n        public void AddUserSecrets_With_SecretsId_Passed_Explicitly()\n        {\n            var userSecretsId = Guid.NewGuid().ToString();\n            SetSecret(userSecretsId, \"Facebook:AppSecret\", \"value1\");\n\n            var builder = new ConfigurationBuilder().AddUserSecrets(userSecretsId);\n            var configuration = builder.Build();\n\n            Assert.Equal(\"value1\", configuration[\"Facebook:AppSecret\"]);\n        }\n\n        [Fact]\n        public void AddUserSecrets_Does_Not_Fail_On_Non_Existing_File()\n        {\n            var userSecretsId = Guid.NewGuid().ToString();\n            var secretFilePath = PathHelper.GetSecretsPathFromSecretsId(userSecretsId);\n            var builder = new ConfigurationBuilder().AddUserSecrets(userSecretsId);\n\n            var configuration = builder.Build();\n            Assert.Null(configuration[\"Facebook:AppSecret\"]);\n            Assert.False(File.Exists(secretFilePath));\n        }\n\n        public void Dispose()\n        {\n            foreach (var dir in _tmpDirectories)\n            {\n                try\n                {\n                    if (Directory.Exists(dir))\n                    {\n                        Directory.Delete(dir, true);\n                    }\n                }\n                catch\n                {\n                    Console.WriteLine(\"Failed to delete \" + dir);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.UserSecrets.Test/MsBuildTargetTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing Xunit;\nusing Xunit.Abstractions;\n\nnamespace Microsoft.Extensions.Configuration.UserSecrets\n{\n    public class MsBuildTargetTest : IDisposable\n    {\n        private readonly string _tempDir;\n        private readonly DirectoryInfo _solutionRoot;\n        private readonly ITestOutputHelper _output;\n\n        public MsBuildTargetTest(ITestOutputHelper output)\n        {\n            _output = output;\n            _tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName());\n            Directory.CreateDirectory(_tempDir);\n\n            _solutionRoot = new DirectoryInfo(AppContext.BaseDirectory);\n            while (_solutionRoot != null)\n            {\n                if (File.Exists(Path.Combine(_solutionRoot.FullName, \"NuGet.config\")))\n                {\n                    break;\n                }\n\n                _solutionRoot = _solutionRoot.Parent;\n            }\n\n            if (_solutionRoot == null)\n            {\n                throw new FileNotFoundException(\"Could not identify solution root\");\n            }\n        }\n\n        [Theory]\n        [InlineData(\".csproj\", \".cs\")]\n        [InlineData(\".fsproj\", \".fs\")]\n        public void GeneratesAssemblyAttributeFile(string projectExt, string sourceExt)\n        {\n            var testTfm = typeof(MsBuildTargetTest).Assembly\n                .GetCustomAttributes<AssemblyMetadataAttribute>()\n                .First(f => f.Key == \"TargetFramework\")\n                .Value;\n            var target = Path.Combine(_solutionRoot.FullName, \"src\", \"Config.UserSecrets\", \"build\", \"netstandard2.0\", \"Microsoft.Extensions.Configuration.UserSecrets.targets\");\n            Directory.CreateDirectory(Path.Combine(_tempDir, \"obj\"));\n            var libName = \"Microsoft.Extensions.Configuration.UserSecrets.dll\";\n            File.Copy(Path.Combine(AppContext.BaseDirectory, libName), Path.Combine(_tempDir, libName));\n            File.Copy(target, Path.Combine(_tempDir, \"obj\", $\"test{projectExt}.usersecretstest.targets\")); // imitates how NuGet will import this target\n            var testProj = Path.Combine(_tempDir, \"test\" + projectExt);\n            // should represent a 'dotnet new' project\n            File.WriteAllText(testProj, $@\"\n<Project Sdk=\"\"Microsoft.NET.Sdk\"\">\n    <PropertyGroup>\n        <Version>1.0.0</Version>\n        <OutputType>Exe</OutputType>\n        <UserSecretsId>\n            xyz123\n        </UserSecretsId>\n        <TargetFramework>{testTfm}</TargetFramework>\n        <SignAssembly>false</SignAssembly>\n    </PropertyGroup>\n    <ItemGroup>\n        <Compile Include=\"\"Program.fs\"\" Condition=\"\"'$(Language)' == 'F#'\"\" />\n        <PackageReference Remove=\"\"Internal.AspNetCore.Sdk\"\" />\n        <Reference Include=\"\"$(MSBuildThisFileDirectory){libName}\"\" />\n    </ItemGroup>\n</Project>\n\");\n            _output.WriteLine($\"Tempdir = {_tempDir}\");\n\n            switch (projectExt)\n            {\n                case \".csproj\":\n                    File.WriteAllText(Path.Combine(_tempDir, \"Program.cs\"), \"public class Program { public static void Main(){}}\");\n                    break;\n                case \".fsproj\":\n                    File.WriteAllText(Path.Combine(_tempDir, \"Program.fs\"), @\"\nmodule SomeNamespace.SubNamespace\nopen System\n[<EntryPoint>]\nlet main argv =\n    printfn \"\"Hello World from F#!\"\"\n    0\n\");\n                    break;\n            }\n\n            var assemblyInfoFile = Path.Combine(_tempDir, $\"obj/Debug/{testTfm}/test.AssemblyInfo\" + sourceExt);\n\n            AssertDotNet(\"restore\");\n\n            Assert.False(File.Exists(assemblyInfoFile), $\"{assemblyInfoFile} should not exist but does\");\n\n            AssertDotNet(\"build --configuration Debug\");\n\n            Assert.True(File.Exists(assemblyInfoFile), $\"{assemblyInfoFile} should not exist but does not\");\n            var contents = File.ReadAllText(assemblyInfoFile);\n            Assert.Contains(\"assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute(\\\"xyz123\\\")\", contents);\n            var lastWrite = new FileInfo(assemblyInfoFile).LastWriteTimeUtc;\n\n            AssertDotNet(\"build --configuration Debug\");\n            // asserts that the target doesn't re-generate assembly file. Important for incremental build.\n            Assert.Equal(lastWrite, new FileInfo(assemblyInfoFile).LastWriteTimeUtc);\n        }\n\n        private void AssertDotNet(string args)\n        {\n            void LogData(object obj, DataReceivedEventArgs e)\n            {\n                _output.WriteLine(e.Data ?? string.Empty);\n            }\n\n            var processInfo = new ProcessStartInfo\n            {\n                FileName = \"dotnet\",\n                Arguments = args,\n                UseShellExecute = false,\n                WorkingDirectory = _tempDir,\n                RedirectStandardOutput = true,\n            };\n            var process = new Process()\n            {\n                EnableRaisingEvents = true,\n                StartInfo = processInfo\n            };\n            process.OutputDataReceived += LogData;\n            process.Start();\n            process.BeginOutputReadLine();\n            process.WaitForExit();\n            process.OutputDataReceived -= LogData;\n            Assert.Equal(0, process.ExitCode);\n        }\n\n        public void Dispose()\n        {\n            try\n            {\n                Directory.Delete(_tempDir, recursive: true);\n            }\n            catch\n            {\n                Console.Error.WriteLine($\"Failed to delete '{_tempDir}' during test cleanup\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.UserSecrets.Test/PathHelperTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.UserSecrets.Test\n{\n    public class PathHelperTest\n    {\n        [Fact]\n        public void Gives_Correct_Secret_Path()\n        {\n            var userSecretsId = \"abcxyz123\";\n            var actualSecretPath = PathHelper.GetSecretsPathFromSecretsId(userSecretsId);\n\n            var root = Environment.GetEnvironmentVariable(\"APPDATA\") ??         // On Windows it goes to %APPDATA%\\Microsoft\\UserSecrets\\\n                        Environment.GetEnvironmentVariable(\"HOME\");             // On Mac/Linux it goes to ~/.microsoft/usersecrets/\n\n            var expectedSecretPath = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(\"APPDATA\")) ?\n                Path.Combine(root, \"Microsoft\", \"UserSecrets\", userSecretsId, \"secrets.json\") :\n                Path.Combine(root, \".microsoft\", \"usersecrets\", userSecretsId, \"secrets.json\");\n\n            Assert.Equal(expectedSecretPath, actualSecretPath);\n        }\n\n        [Fact]\n        public void Throws_If_UserSecretId_Contains_Invalid_Characters()\n        {\n            foreach (var character in Path.GetInvalidPathChars().Concat(Path.GetInvalidFileNameChars()))\n            {\n                var id = \"Test\" + character;\n                Assert.Throws<InvalidOperationException>(() => PathHelper.GetSecretsPathFromSecretsId(id));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Xml.Test/Config.Xml.Test.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <AssemblyName>Microsoft.Extensions.Configuration.Xml.Test</AssemblyName>\n    <RootNamespace>Microsoft.Extensions.Configuration.Xml.Test</RootNamespace>\n    <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Config.Test.Common\\Config.Test.Common.csproj\" />\n    <ProjectReference Include=\"..\\..\\src\\Config.Xml\\Config.Xml.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.AspNetCore.Testing\" Version=\"$(MicrosoftAspNetCoreTestingPackageVersion)\" />\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"$(MicrosoftNETTestSdkPackageVersion)\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"$(XunitRunnerVisualstudioPackageVersion)\" />\n    <PackageReference Include=\"xunit\" Version=\"$(XunitPackageVersion)\" />\n  </ItemGroup>\n\n  <ItemGroup Condition=\" '$(TargetFramework)' == 'net461' \">\n    <Reference Include=\"System.Security\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "test/Config.Xml.Test/XmlConfigurationExtensionsTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Xml.Test\n{\n    public class XmlConfigurationExtensionsTest\n    {\n        [Fact]\n        public void AddXmlFile_ThrowsIfFileDoesNotExistAtPath()\n        {\n            var config = new ConfigurationBuilder().AddXmlFile(\"NotExistingConfig.xml\");\n\n            // Arrange\n            // Act and Assert\n            var ex = Assert.Throws<FileNotFoundException>(() => config.Build());\n            Assert.StartsWith($\"The configuration file 'NotExistingConfig.xml' was not found and is not optional. The physical path is '\", ex.Message);\n        }\n    }\n}\n"
  },
  {
    "path": "test/Config.Xml.Test/XmlConfigurationTest.cs",
    "content": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\nusing System;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Security.Cryptography.Xml;\nusing System.Xml;\nusing Microsoft.AspNetCore.Testing;\nusing Microsoft.AspNetCore.Testing.xunit;\nusing Microsoft.Extensions.Configuration.Test;\nusing Xunit;\n\nnamespace Microsoft.Extensions.Configuration.Xml.Test\n{\n    public class XmlConfigurationTest\n    {\n        [Fact]\n        public void LoadKeyValuePairsFromValidXml()\n        {\n            var xml = @\"\n                <settings>\n                    <Data.Setting>\n                        <DefaultConnection>\n                            <Connection.String>Test.Connection.String</Connection.String>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data.Setting>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"Test.Connection.String\", xmlConfigSrc.Get(\"DATA.SETTING:DEFAULTCONNECTION:CONNECTION.STRING\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"DATA.SETTING:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"data.setting:inventory:connectionstring\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data.setting:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void LoadMethodCanHandleEmptyValue()\n        {\n            var xml = @\"<?xml version=\"\"1.0\"\" encoding=\"\"UTF-8\"\"?>\n<?xml-stylesheet type=\"\"text/xsl\"\" href=\"\"style1.xsl\"\"?>\n<settings>\n    <?xml-stylesheet type=\"\"text/xsl\"\" href=\"\"style2.xsl\"\"?>\n    <Key1></Key1>\n    <Key2 Key3=\"\"\"\" />\n</settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(string.Empty, xmlConfigSrc.Get(\"Key1\"));\n            Assert.Equal(string.Empty, xmlConfigSrc.Get(\"Key2:Key3\"));\n        }\n\n        [Fact]\n        public void CommonAttributesContributeToKeyValuePairs()\n        {\n            var xml =\n@\"<settings Port=\"\"8008\"\">\n    <Data>\n        <DefaultConnection\n            ConnectionString=\"\"TestConnectionString\"\"\n            Provider=\"\"SqlClient\"\"/>\n        <Inventory\n            ConnectionString=\"\"AnotherTestConnectionString\"\"\n            Provider=\"\"MySql\"\"/>\n    </Data>\n</settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"8008\", xmlConfigSrc.Get(\"Port\"));\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportMixingChildElementsAndAttributes()\n        {\n            var xml =\n                @\"<settings Port='8008'>\n                    <Data>\n                        <DefaultConnection Provider='SqlClient'>\n                            <ConnectionString>TestConnectionString</ConnectionString>\n                        </DefaultConnection>\n                        <Inventory ConnectionString='AnotherTestConnectionString'>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"8008\", xmlConfigSrc.Get(\"Port\"));\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void NameAttributeContributesToPrefix()\n        {\n            var xml =\n                @\"<settings>\n                    <Data Name='DefaultConnection'>\n                        <ConnectionString>TestConnectionString</ConnectionString>\n                        <Provider>SqlClient</Provider>\n                    </Data>\n                    <Data Name='Inventory'>\n                        <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                        <Provider>MySql</Provider>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"DefaultConnection\", xmlConfigSrc.Get(\"Data:DefaultConnection:Name\"));\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"Inventory\", xmlConfigSrc.Get(\"Data:Inventory:Name\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void NameAttributeInRootElementContributesToPrefix()\n        {\n            var xml =\n                @\"<settings Name='Data'>\n                    <DefaultConnection>\n                        <ConnectionString>TestConnectionString</ConnectionString>\n                        <Provider>SqlClient</Provider>\n                    </DefaultConnection>\n                    <Inventory>\n                        <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                        <Provider>MySql</Provider>\n                    </Inventory>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"Data\", xmlConfigSrc.Get(\"Data:Name\"));\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportMixingNameAttributesAndCommonAttributes()\n        {\n            var xml =\n                @\"<settings>\n                    <Data Name='DefaultConnection'\n                          ConnectionString='TestConnectionString'\n                          Provider='SqlClient' />\n                    <Data Name='Inventory' ConnectionString='AnotherTestConnectionString'>\n                          <Provider>MySql</Provider>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"DefaultConnection\", xmlConfigSrc.Get(\"Data:DefaultConnection:Name\"));\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"Inventory\", xmlConfigSrc.Get(\"Data:Inventory:Name\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportCDATAAsTextNode()\n        {\n            var xml =\n                @\"<settings>\n                    <Data>\n                        <Inventory>\n                            <Provider><![CDATA[SpecialStringWith<>]]></Provider>\n                        </Inventory>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"SpecialStringWith<>\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportAndIgnoreComments()\n        {\n            var xml =\n                @\"<!-- Comments --> <settings>\n                    <Data> <!-- Comments -->\n                        <DefaultConnection>\n                            <ConnectionString><!-- Comments -->TestConnectionString</ConnectionString>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data>\n                </settings><!-- Comments -->\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportAndIgnoreXMLDeclaration()\n        {\n            var xml =\n                @\"<?xml version='1.0' encoding='UTF-8'?>\n                <settings>\n                    <Data>\n                        <DefaultConnection>\n                            <ConnectionString>TestConnectionString</ConnectionString>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        public void SupportAndIgnoreProcessingInstructions()\n        {\n            var xml =\n                @\"<?xml version='1.0' encoding='UTF-8'?>\n                <?xml-stylesheet type='text/xsl' href='style1.xsl'?>\n                    <settings>\n                        <?xml-stylesheet type='text/xsl' href='style2.xsl'?>\n                        <Data>\n                            <DefaultConnection>\n                                <ConnectionString>TestConnectionString</ConnectionString>\n                                <Provider>SqlClient</Provider>\n                            </DefaultConnection>\n                            <Inventory>\n                                <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                                <Provider>MySql</Provider>\n                            </Inventory>\n                        </Data>\n                    </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml));\n\n            Assert.Equal(\"TestConnectionString\", xmlConfigSrc.Get(\"Data:DefaultConnection:ConnectionString\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"Data:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"Data:Inventory:ConnectionString\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data:Inventory:Provider\"));\n        }\n\n        [Fact]\n        [ReplaceCulture]\n        public void ThrowExceptionWhenFindDTD()\n        {\n            var xml =\n                @\"<!DOCTYPE DefaultConnection[\n                    <!ELEMENT DefaultConnection (ConnectionString,Provider)>\n                    <!ELEMENT ConnectionString (#PCDATA)>\n                    <!ELEMENT Provider (#PCDATA)>\n                ]>\n                <settings>\n                    <Data>\n                        <DefaultConnection>\n                            <ConnectionString>TestConnectionString</ConnectionString>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n            var isMono = Type.GetType(\"Mono.Runtime\") != null;\n            var expectedMsg = isMono ? \"Document Type Declaration (DTD) is prohibited in this XML.  Line 1, position 10.\" : \"For security reasons DTD is prohibited in this XML document. \"\n                + \"To enable DTD processing set the DtdProcessing property on XmlReaderSettings \"\n                + \"to Parse and pass the settings into XmlReader.Create method.\";\n\n            var exception = Assert.Throws<System.Xml.XmlException>(() => xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenFindNamespace()\n        {\n            var xml =\n                @\"<settings xmlns:MyNameSpace='http://microsoft.com/wwa/mynamespace'>\n                    <MyNameSpace:Data>\n                        <DefaultConnection>\n                            <ConnectionString>TestConnectionString</ConnectionString>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </MyNameSpace:Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n            var expectedMsg = Resources.FormatError_NamespaceIsNotSupported(Resources.FormatMsg_LineInfo(1, 11));\n\n            var exception = Assert.Throws<FormatException>(() => xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingNullAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddXmlFile(path: null));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenPassingEmptyStringAsFilePath()\n        {\n            var expectedMsg = new ArgumentException(Resources.Error_InvalidFilePath, \"path\").Message;\n\n            var exception = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddXmlFile(string.Empty));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void ThrowExceptionWhenKeyIsDuplicated()\n        {\n            var xml =\n                @\"<settings>\n                    <Data>\n                        <DefaultConnection>\n                            <ConnectionString>TestConnectionString</ConnectionString>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                    </Data>\n                    <Data Name='DefaultConnection' ConnectionString='NewConnectionString'>\n                        <Provider>NewProvider</Provider>\n                    </Data>\n                </settings>\";\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n            var expectedMsg = Resources.FormatError_KeyIsDuplicated(\"Data:DefaultConnection:ConnectionString\",\n                Resources.FormatMsg_LineInfo(8, 52));\n\n            var exception = Assert.Throws<FormatException>(() => xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xml)));\n\n            Assert.Equal(expectedMsg, exception.Message);\n        }\n\n        [Fact]\n        public void XmlConfiguration_Throws_On_Missing_Configuration_File()\n        {\n            var ex = Assert.Throws<FileNotFoundException>(() => new ConfigurationBuilder().AddXmlFile(\"NotExistingConfig.xml\", optional: false).Build());\n            Assert.StartsWith($\"The configuration file 'NotExistingConfig.xml' was not found and is not optional. The physical path is '\", ex.Message);\n        }\n\n        [Fact]\n        public void XmlConfiguration_Does_Not_Throw_On_Optional_Configuration()\n        {\n            var config = new ConfigurationBuilder().AddXmlFile(\"NotExistingConfig.xml\", optional: true).Build();\n        }\n\n        [ConditionalFact]\n        [FrameworkSkipCondition(RuntimeFrameworks.Mono)]\n        public void LoadKeyValuePairsFromValidEncryptedXml()\n        {\n            var xml = @\"\n                <settings>\n                    <Data.Setting>\n                        <DefaultConnection>\n                            <Connection.String>Test.Connection.String</Connection.String>\n                            <Provider>SqlClient</Provider>\n                        </DefaultConnection>\n                        <Inventory>\n                            <ConnectionString>AnotherTestConnectionString</ConnectionString>\n                            <Provider>MySql</Provider>\n                        </Inventory>\n                    </Data.Setting>\n                </settings>\";\n\n            // This AES key will be used to encrypt the 'Inventory' element\n            var aes = Aes.Create();\n            aes.KeySize = 128;\n            aes.GenerateKey();\n\n            // Perform the encryption\n            var xmlDocument = new XmlDocument();\n            xmlDocument.LoadXml(xml);\n            var encryptedXml = new EncryptedXml(xmlDocument);\n            encryptedXml.AddKeyNameMapping(\"myKey\", aes);\n            var elementToEncrypt = (XmlElement)xmlDocument.SelectSingleNode(\"//Inventory\");\n            EncryptedXml.ReplaceElement(elementToEncrypt, encryptedXml.Encrypt(elementToEncrypt, \"myKey\"), content: false);\n\n            // Quick sanity check: the document should no longer contain an 'Inventory' element\n            Assert.Null(xmlDocument.SelectSingleNode(\"//Inventory\"));\n\n            // Arrange\n            var xmlConfigSrc = new XmlConfigurationProvider(new XmlConfigurationSource());\n            xmlConfigSrc.Decryptor = new XmlDocumentDecryptor(doc =>\n            {\n                var innerEncryptedXml = new EncryptedXml(doc);\n                innerEncryptedXml.AddKeyNameMapping(\"myKey\", aes);\n                return innerEncryptedXml;\n            });\n\n            // Act\n            xmlConfigSrc.Load(TestStreamHelpers.StringToStream(xmlDocument.OuterXml));\n\n            // Assert\n            Assert.Equal(\"Test.Connection.String\", xmlConfigSrc.Get(\"DATA.SETTING:DEFAULTCONNECTION:CONNECTION.STRING\"));\n            Assert.Equal(\"SqlClient\", xmlConfigSrc.Get(\"DATA.SETTING:DefaultConnection:Provider\"));\n            Assert.Equal(\"AnotherTestConnectionString\", xmlConfigSrc.Get(\"data.setting:inventory:connectionstring\"));\n            Assert.Equal(\"MySql\", xmlConfigSrc.Get(\"Data.setting:Inventory:Provider\"));\n        }\n    }\n}\n"
  },
  {
    "path": "test/Directory.Build.props",
    "content": "<Project>\n  <Import Project=\"..\\Directory.Build.props\" />\n\n  <PropertyGroup>\n    <DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>\n    <StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>\n\n    <StandardTestTfms Condition=\" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' \">$(StandardTestTfms);net461</StandardTestTfms>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Internal.AspNetCore.Sdk\" PrivateAssets=\"All\" Version=\"$(InternalAspNetCoreSdkPackageVersion)\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "version.props",
    "content": "﻿<Project>\n  <PropertyGroup>\n    <VersionPrefix>3.0.0</VersionPrefix>\n    <VersionSuffix>alpha1</VersionSuffix>\n    <PackageVersion Condition=\"'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' \">$(VersionPrefix)</PackageVersion>\n    <PackageVersion Condition=\"'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' \">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>\n    <BuildNumber Condition=\"'$(BuildNumber)' == ''\">t000</BuildNumber>\n    <FeatureBranchVersionPrefix Condition=\"'$(FeatureBranchVersionPrefix)' == ''\">a-</FeatureBranchVersionPrefix>\n    <VersionSuffix Condition=\"'$(VersionSuffix)' != '' And '$(FeatureBranchVersionSuffix)' != ''\">$(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\\w-]', '-'))</VersionSuffix>\n    <VersionSuffix Condition=\"'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''\">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>\n  </PropertyGroup>\n</Project>\n"
  }
]