From 14e6d3e4d9b6c6c49891cbdfa921efbfd710b90a Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Tue, 7 Nov 2017 10:52:48 -0500 Subject: [PATCH] Cleanup in ApplicationCache --- src/GitHub.Api/Cache/CacheInterfaces.cs | 2 +- .../Editor/GitHub.Unity/ApplicationCache.cs | 104 +----------------- 2 files changed, 3 insertions(+), 103 deletions(-) diff --git a/src/GitHub.Api/Cache/CacheInterfaces.cs b/src/GitHub.Api/Cache/CacheInterfaces.cs index a303520fa..48fad4a55 100644 --- a/src/GitHub.Api/Cache/CacheInterfaces.cs +++ b/src/GitHub.Api/Cache/CacheInterfaces.cs @@ -62,7 +62,7 @@ public interface ILocalConfigBranchDictionary : IDictionary> + public interface IRemoteConfigBranchDictionary : IDictionary> { } diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs index 55c9ffd38..e531293b5 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs @@ -295,106 +295,6 @@ public void OnAfterDeserialize() Add(remote, branchesDictionary); } } - - IEnumerator>> IEnumerable>>.GetEnumerator() - { - throw new NotImplementedException(); - //return AsDictionary - // .Select(pair => new KeyValuePair>(pair.Key, pair.Value.AsDictionary)) - // .GetEnumerator(); - } - - void ICollection>>.Add(KeyValuePair> item) - { - throw new NotImplementedException(); - //Guard.ArgumentNotNull(item, "item"); - //Guard.ArgumentNotNull(item.Value, "item.Value"); - // - //var serializableDictionary = item.Value as SerializableDictionary; - //if (serializableDictionary == null) - //{ - // serializableDictionary = new SerializableDictionary(item.Value); - //} - // - //Add(item.Key, serializableDictionary); - } - - bool ICollection>>.Contains(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - void ICollection>>.CopyTo(KeyValuePair>[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - bool ICollection>>.Remove(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - bool ICollection>>.IsReadOnly - { - get { throw new NotImplementedException(); } - } - - void IDictionary>.Add(string key, IDictionary value) - { - throw new NotImplementedException(); - } - - bool IDictionary>.TryGetValue(string key, out IDictionary value) - { - value = null; - - Dictionary branches; - if (TryGetValue(key, out branches)) - { - value = branches; - return true; - } - - return false; - } - - IDictionary IDictionary>.this[string key] - { - get - { - throw new NotImplementedException(); - //var dictionary = (IDictionary>)this; - //IDictionary value; - //if (!dictionary.TryGetValue(key, out value)) - //{ - // throw new KeyNotFoundException(); - //} - // - //return value; - } - set - { - throw new NotImplementedException(); - //var dictionary = (IDictionary>)this; - //dictionary.Add(key, value); - } - } - - ICollection IDictionary>.Keys - { - get - { - throw new NotImplementedException(); - } - } - - ICollection> IDictionary>.Values - { - get - { - return Values.Cast>().ToArray(); - } - } } [Serializable] @@ -668,7 +568,7 @@ public void AddLocalBranch(string branch) public void AddRemoteBranch(string remote, string branch) { - IDictionary branchList; + Dictionary branchList; if (RemoteConfigBranches.TryGetValue(remote, out branchList)) { if (!branchList.ContainsKey(branch)) @@ -691,7 +591,7 @@ public void AddRemoteBranch(string remote, string branch) public void RemoveRemoteBranch(string remote, string branch) { - IDictionary branchList; + Dictionary branchList; if (RemoteConfigBranches.TryGetValue(remote, out branchList)) { if (branchList.ContainsKey(branch))