Пример #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()));
 }
Пример #2
0
 public static bool Remove <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict, TKey key)
 {
     rIndexedDict.Keys.Remove(key);
     return(rIndexedDict.Dict.Remove(key));
 }
Пример #3
0
 public static void Clear <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     rIndexedDict.Dict.Clear();
     rIndexedDict.Keys.Clear();
 }
Пример #4
0
 public static TValue FirstValue <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     return(rIndexedDict.Dict.FirstValue());
 }
Пример #5
0
 public static TKey FirstKey <TKey, TValue>(this IndexedDict <TKey, TValue> rIndexedDict)
 {
     return(rIndexedDict.Dict.FirstKey());
 }
Пример #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));
 }