예제 #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));
 }