Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 14e6d3e

Browse files
Cleanup in ApplicationCache
1 parent 34b2cc8 commit 14e6d3e

File tree

2 files changed

+3
-103
lines changed

2 files changed

+3
-103
lines changed

src/GitHub.Api/Cache/CacheInterfaces.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public interface ILocalConfigBranchDictionary : IDictionary<string, ConfigBranch
6262

6363
}
6464

65-
public interface IRemoteConfigBranchDictionary : IDictionary<string, IDictionary<string, ConfigBranch>>
65+
public interface IRemoteConfigBranchDictionary : IDictionary<string, Dictionary<string, ConfigBranch>>
6666
{
6767

6868
}

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 2 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -295,106 +295,6 @@ public void OnAfterDeserialize()
295295
Add(remote, branchesDictionary);
296296
}
297297
}
298-
299-
IEnumerator<KeyValuePair<string, IDictionary<string, ConfigBranch>>> IEnumerable<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.GetEnumerator()
300-
{
301-
throw new NotImplementedException();
302-
//return AsDictionary
303-
// .Select(pair => new KeyValuePair<string, IDictionary<string, ConfigBranch>>(pair.Key, pair.Value.AsDictionary))
304-
// .GetEnumerator();
305-
}
306-
307-
void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Add(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
308-
{
309-
throw new NotImplementedException();
310-
//Guard.ArgumentNotNull(item, "item");
311-
//Guard.ArgumentNotNull(item.Value, "item.Value");
312-
//
313-
//var serializableDictionary = item.Value as SerializableDictionary<string, ConfigBranch>;
314-
//if (serializableDictionary == null)
315-
//{
316-
// serializableDictionary = new SerializableDictionary<string, ConfigBranch>(item.Value);
317-
//}
318-
//
319-
//Add(item.Key, serializableDictionary);
320-
}
321-
322-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Contains(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
323-
{
324-
throw new NotImplementedException();
325-
}
326-
327-
void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.CopyTo(KeyValuePair<string, IDictionary<string, ConfigBranch>>[] array, int arrayIndex)
328-
{
329-
throw new NotImplementedException();
330-
}
331-
332-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Remove(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
333-
{
334-
throw new NotImplementedException();
335-
}
336-
337-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.IsReadOnly
338-
{
339-
get { throw new NotImplementedException(); }
340-
}
341-
342-
void IDictionary<string, IDictionary<string, ConfigBranch>>.Add(string key, IDictionary<string, ConfigBranch> value)
343-
{
344-
throw new NotImplementedException();
345-
}
346-
347-
bool IDictionary<string, IDictionary<string, ConfigBranch>>.TryGetValue(string key, out IDictionary<string, ConfigBranch> value)
348-
{
349-
value = null;
350-
351-
Dictionary<string, ConfigBranch> branches;
352-
if (TryGetValue(key, out branches))
353-
{
354-
value = branches;
355-
return true;
356-
}
357-
358-
return false;
359-
}
360-
361-
IDictionary<string, ConfigBranch> IDictionary<string, IDictionary<string, ConfigBranch>>.this[string key]
362-
{
363-
get
364-
{
365-
throw new NotImplementedException();
366-
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
367-
//IDictionary<string, ConfigBranch> value;
368-
//if (!dictionary.TryGetValue(key, out value))
369-
//{
370-
// throw new KeyNotFoundException();
371-
//}
372-
//
373-
//return value;
374-
}
375-
set
376-
{
377-
throw new NotImplementedException();
378-
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
379-
//dictionary.Add(key, value);
380-
}
381-
}
382-
383-
ICollection<string> IDictionary<string, IDictionary<string, ConfigBranch>>.Keys
384-
{
385-
get
386-
{
387-
throw new NotImplementedException();
388-
}
389-
}
390-
391-
ICollection<IDictionary<string, ConfigBranch>> IDictionary<string, IDictionary<string, ConfigBranch>>.Values
392-
{
393-
get
394-
{
395-
return Values.Cast<IDictionary<string,ConfigBranch>>().ToArray();
396-
}
397-
}
398298
}
399299

400300
[Serializable]
@@ -668,7 +568,7 @@ public void AddLocalBranch(string branch)
668568

669569
public void AddRemoteBranch(string remote, string branch)
670570
{
671-
IDictionary<string, ConfigBranch> branchList;
571+
Dictionary<string, ConfigBranch> branchList;
672572
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
673573
{
674574
if (!branchList.ContainsKey(branch))
@@ -691,7 +591,7 @@ public void AddRemoteBranch(string remote, string branch)
691591

692592
public void RemoveRemoteBranch(string remote, string branch)
693593
{
694-
IDictionary<string, ConfigBranch> branchList;
594+
Dictionary<string, ConfigBranch> branchList;
695595
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
696596
{
697597
if (branchList.ContainsKey(branch))

0 commit comments

Comments
 (0)