WebApi + ClientApp, GraphQL, Reflection

This commit is contained in:
Boris Milašinović
2026-05-06 20:55:05 +02:00
parent 8f7c704a90
commit 4fb3de19f6
196 changed files with 10395 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
namespace Events.WebAPI.Util.Extensions;
public static class DictionaryExtensions
{
public static TValue GetOrCreate<TKey, TValue>(this Dictionary<TKey, TValue> dict, TKey key) where TValue : new() where TKey : notnull
{
if (!dict.ContainsKey(key))
{
var item = new TValue();
dict[key] = item;
return item;
}
else
{
return dict[key];
}
}
}