From 39c66558cfedfbb28b11c37cd43ef39adcbe1d26 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 10 Feb 2021 08:27:36 -0600 Subject: more docs --- .../EnvironmentVariableConfigurationSource.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs') diff --git a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs index 51ddf535..21775689 100644 --- a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs +++ b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs @@ -15,7 +15,6 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // -#pragma warning disable SA1649 // File name should match first type name namespace slskd.Configuration { using System; @@ -39,11 +38,8 @@ namespace slskd.Configuration /// The to which to add. /// A list of environment variable mappings. /// A prefix to prepend to all variable names. - /// - /// A value indicating whether configuration keys should be normalized (_, - removed, changed to lowercase). - /// /// The updated . - public static IConfigurationBuilder AddEnvironmentVariables(this IConfigurationBuilder builder, IEnumerable map, string prefix = null, bool normalizeKey = true) + public static IConfigurationBuilder AddEnvironmentVariables(this IConfigurationBuilder builder, IEnumerable map, string prefix = null) { if (builder == null) { @@ -54,7 +50,6 @@ namespace slskd.Configuration { s.Map = map ?? Enumerable.Empty(); s.Prefix = prefix ?? string.Empty; - s.NormalizeKey = normalizeKey; }); } @@ -81,11 +76,9 @@ namespace slskd.Configuration { Map = source.Map; Prefix = source.Prefix; - NormalizeKey = source.NormalizeKey; } private IEnumerable Map { get; set; } - private bool NormalizeKey { get; set; } private string Prefix { get; set; } /// @@ -97,11 +90,6 @@ namespace slskd.Configuration { var (name, type, key, _) = item; - if (NormalizeKey) - { - key = key?.Replace("_", string.Empty).Replace("-", string.Empty).ToLowerInvariant(); - } - if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(name)) { continue; @@ -154,5 +142,4 @@ namespace slskd.Configuration return new EnvironmentVariableConfigurationProvider(this); } } -} -#pragma warning restore SA1649 // File name should match first type name \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.3