using Newtonsoft.Json.Bson; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BITKit { public static partial class Extensions { public static IDictionary CreateOrAddIfEmety(this IDictionary self, TKey key, Func createFactory) { if (self.ContainsKey(key) is false) { self.Add(key, createFactory.Invoke()); } return self; } } }