コード例 #1
0
        public TValue GetOrAdd(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey, Func <TWeakKey1, TWeakKey2, TStrongKey, TValue> valueFactory)
        {
            if (null == valueFactory)
            {
                throw new ArgumentNullException("valueFactory");
            }

            return(_internalDictionary.GetOrAdd(Stacktype.Create(weakKey1, weakKey2, strongKey), hr => valueFactory(hr.Item1, hr.Item2, hr.Item3)));
        }
コード例 #2
0
        public TValue GetOrAdd(TStrongKey strongKey, Func <TStrongKey, TValue> valueFactory)
        {
            if (null == valueFactory)
            {
                throw new ArgumentNullException("valueFactory");
            }

            return(_internalDictionary.GetOrAdd(Stacktype.Create(strongKey), ht => valueFactory(ht.Item1)));
        }
コード例 #3
0
 public TValue AddOrUpdate(TStrongKey strongKey, TValue addValue, Func <TStrongKey, TValue, TValue> updateValueFactory)
 {
     return
         (_internalDictionary.AddOrUpdate(
              Stacktype.Create(strongKey),
              addValue,
              (ht, v) => updateValueFactory(ht.Item1, v)
              )
         );
 }
コード例 #4
0
        public TValue AddOrUpdate(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey, TValue addValue, Func <TWeakKey1, TWeakKey2, TStrongKey, TValue, TValue> updateValueFactory)
        {
            if (null == updateValueFactory)
            {
                throw new ArgumentNullException("updateValueFactory");
            }

            return
                (_internalDictionary.AddOrUpdate(
                     Stacktype.Create(weakKey1, weakKey2, strongKey),
                     addValue,
                     (hr, v) => updateValueFactory(hr.Item1, hr.Item2, hr.Item3, v)
                     )
                );
        }
コード例 #5
0
 public bool TryAdd(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey, TValue value)
 {
     return(_internalDictionary.TryAdd(Stacktype.Create(weakKey1, weakKey2, strongKey), value));
 }
コード例 #6
0
 public TValue this[TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey]
 {
     get { return(_internalDictionary.GetItem(Stacktype.Create(weakKey1, weakKey2, strongKey))); }
     set { _internalDictionary.SetItem(Stacktype.Create(weakKey1, weakKey2, strongKey), value); }
 }
コード例 #7
0
 public bool ContainsKey(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey)
 {
     return(_internalDictionary.ContainsKey(Stacktype.Create(weakKey1, weakKey2, strongKey)));
 }
コード例 #8
0
 public TValue GetOrAdd(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TWeakKey3 weakKey3, TWeakKey4 weakKey4, TStrongKey strongKey, TValue value)
 {
     return(_internalDictionary.GetOrAdd(Stacktype.Create(weakKey1, weakKey2, weakKey3, weakKey4, strongKey), value));
 }
コード例 #9
0
 public TValue this[TStrongKey strongKey]
 {
     get { return(_internalDictionary.GetItem(Stacktype.Create(strongKey))); }
     set { _internalDictionary.SetItem(Stacktype.Create(strongKey), value); }
 }
コード例 #10
0
 public bool TryUpdate(TStrongKey strongKey, TValue newValue, TValue comparisonValue)
 {
     return(_internalDictionary.TryUpdate(Stacktype.Create(strongKey), newValue, comparisonValue));
 }
コード例 #11
0
 public bool TryRemove(TStrongKey strongKey, out TValue value)
 {
     return(_internalDictionary.TryRemove(Stacktype.Create(strongKey), out value));
 }
コード例 #12
0
 public bool TryAdd(TStrongKey strongKey, TValue value)
 {
     return(_internalDictionary.TryAdd(Stacktype.Create(strongKey), value));
 }
コード例 #13
0
 public TValue GetOrAdd(TStrongKey strongKey, TValue value)
 {
     return(_internalDictionary.GetOrAdd(Stacktype.Create(strongKey), value));
 }
コード例 #14
0
 public bool TryRemove(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey, out TValue value)
 {
     return(_internalDictionary.TryRemove(Stacktype.Create(weakKey1, weakKey2, strongKey), out value));
 }
コード例 #15
0
 protected override bool FromInternalKeyToStackKey(StrongKey <TStrongKey> internalKey, out Stacktype <TStrongKey> externalKey)
 {
     externalKey = Stacktype.Create(internalKey._element);
     return(true);
 }
コード例 #16
0
 public bool TryUpdate(TWeakKey1 weakKey1, TWeakKey2 weakKey2, TStrongKey strongKey, TValue newValue, TValue comparisonValue)
 {
     return(_internalDictionary.TryUpdate(Stacktype.Create(weakKey1, weakKey2, strongKey), newValue, comparisonValue));
 }
コード例 #17
0
 public bool ContainsKey(TStrongKey strongKey)
 {
     return(_internalDictionary.ContainsKey(Stacktype.Create(strongKey)));
 }