From 36ff958bcc54dee248989e9148da28bdecf6992a Mon Sep 17 00:00:00 2001 From: Donn Relacion Date: Mon, 4 Jul 2022 01:27:01 +0800 Subject: [PATCH] Fix missing case in string argument value. --- .../Implementation/StringArgumentValue.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ConfigurationProcessor.Core/Implementation/StringArgumentValue.cs b/src/ConfigurationProcessor.Core/Implementation/StringArgumentValue.cs index c0331cd..d34be44 100644 --- a/src/ConfigurationProcessor.Core/Implementation/StringArgumentValue.cs +++ b/src/ConfigurationProcessor.Core/Implementation/StringArgumentValue.cs @@ -35,6 +35,11 @@ public StringArgumentValue(IConfigurationSection section, string providedValue) { var argumentValue = Environment.ExpandEnvironmentVariables(providedValue); + if (toType == typeof(string)) + { + return providedValue; + } + var toTypeInfo = toType.GetTypeInfo(); if (toTypeInfo.IsGenericType && toType.GetGenericTypeDefinition() == typeof(Nullable<>)) {