diff --git a/BurnOutSharp/BurnOutSharp.csproj b/BurnOutSharp/BurnOutSharp.csproj index bce3162c..07b67cda 100644 --- a/BurnOutSharp/BurnOutSharp.csproj +++ b/BurnOutSharp/BurnOutSharp.csproj @@ -53,7 +53,6 @@ - diff --git a/BurnOutSharp/CaseInsensitiveDictionary.cs b/BurnOutSharp/CaseInsensitiveDictionary.cs deleted file mode 100644 index 0a577593..00000000 --- a/BurnOutSharp/CaseInsensitiveDictionary.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace BurnOutSharp -{ - internal class CaseInsensitiveDictionary : IDictionary - { - private Dictionary _dict = new Dictionary(); - - public TValue this[string key] - { - get - { - key = key.ToLower(); - if (_dict.ContainsKey(key)) - return _dict[key]; - throw new ArgumentException("Key could not be found in the dictionary"); - } - set - { - key = key.ToLower(); - _dict[key] = value; - } - } - - public ICollection Keys => _dict.Keys; - - public ICollection Values => _dict.Values; - - public int Count => _dict.Count; - - public bool IsReadOnly => false; - - public void Add(string key, TValue value) - { - key = key.ToLower(); - _dict[key] = value; - } - - public void Add(KeyValuePair item) - { - string key = item.Key.ToLower(); - _dict[key] = item.Value; ; - } - - public void Clear() - { - _dict.Clear(); - } - - public bool Contains(KeyValuePair item) - { - KeyValuePair temp = new KeyValuePair(item.Key.ToLower(), item.Value); - return _dict.Contains(temp); - } - - public bool ContainsKey(string key) - { - return _dict.ContainsKey(key.ToLower()); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - public IEnumerator> GetEnumerator() - { - return _dict.GetEnumerator(); - } - - public bool Remove(string key) - { - return _dict.Remove(key.ToLower()); - } - - public bool Remove(KeyValuePair item) - { - throw new NotImplementedException(); - } - - public bool TryGetValue(string key, out TValue value) - { - key = key.ToLower(); - return _dict.TryGetValue(key, out value); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _dict.GetEnumerator(); - } - } -}