From e576cb399ff881b65afd2b6948912df188fbaf0d Mon Sep 17 00:00:00 2001 From: Albie Date: Wed, 7 Dec 2022 08:02:37 +0000 Subject: [PATCH] add enum uppercase handling --- src/Methods.cs | 7 ++++++- src/Utils/ParameterUtils.cs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Methods.cs b/src/Methods.cs index 9e94edf..b139b19 100644 --- a/src/Methods.cs +++ b/src/Methods.cs @@ -77,6 +77,11 @@ public enum EnumHandlingMode /// /// Convert to lowercase string form /// - StringLower + StringLower, + + /// + /// Convert to uppercase string form + /// + StringUpper } } diff --git a/src/Utils/ParameterUtils.cs b/src/Utils/ParameterUtils.cs index d4f8ce8..d6123f8 100644 --- a/src/Utils/ParameterUtils.cs +++ b/src/Utils/ParameterUtils.cs @@ -67,6 +67,7 @@ internal static IEnumerable> GetParameter(object { EnumHandlingMode.Numeric => ((int)propertyValue).ToKeyValuePair(keyName, culture), EnumHandlingMode.StringLower => propertyValue.ToString().ToLower(culture).ToKeyValuePair(keyName, culture), + EnumHandlingMode.StringUpper => propertyValue.ToString().ToUpper(culture).ToKeyValuePair(keyName, culture), // default includes string handling _ => propertyValue.ToKeyValuePair(keyName, culture)