Example #1
0
 void IDictionary.Remove(object key)
 {
     if (ReversibleSortedList <TKey, TValue> .IsCompatibleKey(key))
     {
         this.Remove((TKey)key);
     }
 }
Example #2
0
 internal Enumerator(ReversibleSortedList <K, V> ReversibleSortedList)
 {
     this._ReversibleSortedList = ReversibleSortedList;
     this.index   = 0;
     this.version = this._ReversibleSortedList.version;
     this.key     = default(K);
     this.value   = default(V);
 }
Example #3
0
 bool IDictionary.Contains(object key)
 {
     if (ReversibleSortedList <TKey, TValue> .IsCompatibleKey(key))
     {
         return(this.ContainsKey((TKey)key));
     }
     return(false);
 }
Example #4
0
        void IDictionary.Add(object key, object value)
        {
            ReversibleSortedList <TKey, TValue> .VerifyKey(key);

            ReversibleSortedList <TKey, TValue> .VerifyValueType(value);

            this.Add((TKey)key, (TValue)value);
        }
Example #5
0
        object IDictionary.this[object key]
        {
            get
            {
                if (ReversibleSortedList <TKey, TValue> .IsCompatibleKey(key))
                {
                    int num1 = this.IndexOfKey((TKey)key);
                    if (num1 >= 0)
                    {
                        return(this.values[num1]);
                    }
                }
                return(null);
            }
            set
            {
                ReversibleSortedList <TKey, TValue> .VerifyKey(key);

                ReversibleSortedList <TKey, TValue> .VerifyValueType(value);

                this[(TKey)key] = (TValue)value;
            }
        }
Example #6
0
 // Methods
 internal KeyList(ReversibleSortedList <K, V> dictionary)
 {
     this._dict = dictionary;
 }
Example #7
0
 // Methods
 internal ReversibleSortedListValueEnumerator(
     ReversibleSortedList <TKey, TValue> ReversibleSortedList)
 {
     this._ReversibleSortedList = ReversibleSortedList;
     this.version = ReversibleSortedList.version;
 }