+EA 23.75 - Plugin.BaseCore
January 11, 2025
1 file modified.
Important Changes
None.
ClassExtension
@@ -364,6 +364,16 @@ public static IList<TValue> Shuffle<TValue>(this IList<TValue> list)
cs
return fallback;
}
public static TValue TryGetValue<TKey, TValue>(this IDictionary<TKey, TValue> source, TKey key, TKey key_fallback)
{
TValue value = default(TValue);
if (key != null && source.TryGetValue(key, out value))
{
return value;
}
return source[key_fallback];
}
public static TValue GetOrCreate<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, Func<TValue> func = null)
{
TValue val = dict.TryGetValue(key);