Skip to content

Commit 76cb322

Browse files
authored
Avoid duplicate dictionary lookup in GetConsolidatedList (#4551)
1 parent 59e6f8c commit 76cb322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Csla/Core/FieldManager/FieldDataManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ private static List<IPropertyInfo> GetConsolidatedList(
168168
_consolidatedLists.Add(type, cacheInstance);
169169
}
170170
#else
171-
if (_consolidatedLists.ContainsKey(type))
171+
if (_consolidatedLists.TryGetValue(type, out var list))
172172
{
173-
result = _consolidatedLists[type];
173+
result = list;
174174
}
175175
else
176176
{

0 commit comments

Comments
 (0)