From 9f2c87420f70b70e007148a06957219f219ba3b9 Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-lf Date: Fri, 26 Jan 2024 09:39:38 -0800 Subject: [PATCH] SNOW-990111: Refactor hash set to list --- .../Configuration/EasyLoggingConfigParser.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs b/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs index 7b59afa21..27fa3a88e 100644 --- a/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs +++ b/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs @@ -70,18 +70,10 @@ private void Validate(ClientConfig config) private void CheckForUnknownFields(string fileContent) { // Parse the specified config file and get the key-value pairs from the "common" section - HashSet knownProperties = new HashSet(); -#if NET471 - foreach (var property in typeof(ClientConfigCommonProps).GetProperties()) - { - var jsonPropertyAttribute = property.GetCustomAttribute(); - knownProperties.Add(jsonPropertyAttribute.PropertyName); - } -#else + List knownProperties = new List(); knownProperties = typeof(ClientConfigCommonProps).GetProperties() .Select(property => property.GetCustomAttribute().PropertyName) - .ToHashSet(); -#endif + .ToList(); JObject.Parse(fileContent).GetValue("common", StringComparison.OrdinalIgnoreCase)? .Cast()