From 2c7f0ff35d4ff1be7d4839410aefa7fac658b096 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 7 Jan 2016 15:19:41 -0800 Subject: [PATCH] Remove IncludedConfigurationProvider since it's been added to Configuration repo --- .../Internal/IncludedConfigurationProvider.cs | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/Microsoft.AspNet.Hosting/Internal/IncludedConfigurationProvider.cs diff --git a/src/Microsoft.AspNet.Hosting/Internal/IncludedConfigurationProvider.cs b/src/Microsoft.AspNet.Hosting/Internal/IncludedConfigurationProvider.cs deleted file mode 100644 index 5feb23e761..0000000000 --- a/src/Microsoft.AspNet.Hosting/Internal/IncludedConfigurationProvider.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.AspNet.Hosting.Internal -{ - // TODO: Remove this once https://github.com/aspnet/Configuration/pull/349 gets merged - internal class IncludedConfigurationProvider : ConfigurationProvider - { - public IncludedConfigurationProvider(IConfiguration source) - { - if (source == null) - { - throw new ArgumentNullException(nameof(source)); - } - int pathStart = 0; - var section = source as IConfigurationSection; - if (section != null) - { - pathStart = section.Path.Length + 1; - } - foreach (var child in source.GetChildren()) - { - AddSection(child, pathStart); - } - } - - private void AddSection(IConfigurationSection section, int pathStart) - { - Data.Add(section.Path.Substring(pathStart), section.Value); - foreach (var child in section.GetChildren()) - { - AddSection(child, pathStart); - } - } - } -}