Beispiel #1
0
        public void Add(TKey key, TValue item)
        {
#if BLOBHASHMAP_SAFE
            if (!data.TryAdd(key, item, false))
            {
                throw new ArgumentException($"An item with key {key} already exists", nameof(key));
            }
#else
            TryAdd(key, item);
#endif
        }
Beispiel #2
0
 public void Add(TKey key, TValue item) => data.TryAdd(key, item, true);