Exemple #1
0
 public static CKeyValuePair <TKey, TValue> First <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     if (rIndexedDict.Count == 0)
     {
         return(null);
     }
     return(new CKeyValuePair <TKey, TValue>(rIndexedDict.FirstKey(), rIndexedDict.FirstValue()));
 }
Exemple #2
0
 public static bool Remove <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict, TKey key)
 {
     rIndexedDict.Keys.Remove(key);
     return(rIndexedDict.Dict.Remove(key));
 }
Exemple #3
0
 public static void Clear <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     rIndexedDict.Dict.Clear();
     rIndexedDict.Keys.Clear();
 }
Exemple #4
0
 public static TValue FirstValue <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     return(rIndexedDict.Dict.FirstValue());
 }
Exemple #5
0
 public static TKey FirstKey <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     return(rIndexedDict.Dict.FirstKey());
 }
Exemple #6
0
 public static bool TryGetValue <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict, TKey rKey, out TValue rValue)
 {
     return(rIndexedDict.Dict.TryGetValue(rKey, out rValue));
 }