Neatened some stuff up, but it looks like this isn't used anywhere anymore

This commit is contained in:
Michael Becker 2014-11-14 08:25:10 -05:00
parent 5f62651a8e
commit 599e4e8c4b

View File

@ -1,25 +1,22 @@
using System;
using System.Collections.Generic;
namespace UniversalEditor.Collections.Generic
{
public class KeyValuePairList<TKey, TValue>
: System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<TKey, TValue>>
public class KeyValuePairList<TKey, TValue> : List<KeyValuePair<TKey, TValue>>
{
private Dictionary<TKey, KeyValuePair<TKey, TValue>> valuesByKey = new Dictionary<TKey, KeyValuePair<TKey, TValue>>();
private System.Collections.Generic.Dictionary<TKey, System.Collections.Generic.KeyValuePair<TKey, TValue>> valuesByKey = new System.Collections.Generic.Dictionary<TKey, System.Collections.Generic.KeyValuePair<TKey, TValue>>();
public System.Collections.Generic.KeyValuePair<TKey, TValue> Add (TKey key, TValue value)
public KeyValuePair<TKey, TValue> Add(TKey key, TValue value)
{
System.Collections.Generic.KeyValuePair<TKey, TValue> item = new System.Collections.Generic.KeyValuePair<TKey, TValue> (key, value);
base.Add (item);
valuesByKey.Add (key, item);
KeyValuePair<TKey, TValue> item = new KeyValuePair<TKey, TValue>(key, value);
base.Add(item);
valuesByKey.Add(key, item);
return item;
}
public System.Collections.Generic.KeyValuePair<TKey, TValue> this[TKey key]
public KeyValuePair<TKey, TValue> this[TKey key]
{
get
{
return valuesByKey[key];
}
get { return valuesByKey[key]; }
}
public bool Contains(TKey key)
{
@ -39,5 +36,4 @@ namespace UniversalEditor.Collections.Generic
valuesByKey.Remove(item.Key);
}
}
}
}