Skip to content

Commit 54e13fa

Browse files
[FSSDK-11138] config parser update
1 parent 8de6a27 commit 54e13fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

OptimizelySDK/Utils/ConfigParser.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ public static Dictionary<string, T> GenerateMap(IEnumerable<T> entities,
3333
Func<T, string> getKey, bool clone
3434
)
3535
{
36-
return entities.ToDictionary(e => getKey(e), e => clone ? (T)e.Clone() : e);
36+
var dictionary = new Dictionary<string, T>();
37+
foreach (var entity in entities)
38+
{
39+
var key = getKey(entity);
40+
dictionary[key] = clone ? (T)entity.Clone() : entity;
41+
}
42+
return dictionary;
3743
}
3844
}
3945
}

0 commit comments

Comments
 (0)