Beispiel #1
0
 public TwoKeys <TKey1, TKey2>[] KeysToArray()
 {
     KeyValuePair <TKey1, TKey2>[] keys    = llistaClau1.ToArray();
     TwoKeys <TKey1, TKey2>[]      twoKeys = new TwoKeys <TKey1, TKey2> [keys.Length];
     for (int i = 0; i < keys.Length; i++)
     {
         twoKeys[i] = new TwoKeys <TKey1, TKey2>(keys[i].Key, keys[i].Value);
     }
     return(twoKeys);
 }
Beispiel #2
0
        public TValue this[TwoKeys <TKey1, TKey2> key]
        {
            get
            {
                return(llista1[key.Key1]);
            }

            set
            {
                llista1[key.Key1] = value;
                llista2[llistaClau1[key.Key1]] = value;
            }
        }
Beispiel #3
0
 bool IDictionary <TwoKeys <TKey1, TKey2>, TValue> .TryGetValue(TwoKeys <TKey1, TKey2> key, out TValue value)
 {
     return(((IDictionary <TKey1, TValue>)llista1).TryGetValue(key.Key1, out value));
 }
Beispiel #4
0
 public bool Remove(TwoKeys <TKey1, TKey2> key)
 {
     return(Remove1(key.Key1));
 }
Beispiel #5
0
 public void Add(TwoKeys <TKey1, TKey2> key, TValue value)
 {
     Add(key.Key1, key.Key2, value);
 }
Beispiel #6
0
 public bool ContainsKey(TwoKeys <TKey1, TKey2> key)
 {
     return(llistaClau1.ContainsKey(key.Key1) && llistaClau2.ContainsKey(key.Key2));
 }