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

Commit 743ed7b

Browse files
Merge pull request #410 from github-for-unity/fixes/remote-config-branch
Cleanup in ApplicationCache
2 parents 974b6b1 + b32218b commit 743ed7b

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
@@ -310,106 +310,6 @@ public void OnAfterDeserialize()
310310
Add(remote, branchesDictionary);
311311
}
312312
}
313-
314-
IEnumerator<KeyValuePair<string, IDictionary<string, ConfigBranch>>> IEnumerable<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.GetEnumerator()
315-
{
316-
throw new NotImplementedException();
317-
//return AsDictionary
318-
// .Select(pair => new KeyValuePair<string, IDictionary<string, ConfigBranch>>(pair.Key, pair.Value.AsDictionary))
319-
// .GetEnumerator();
320-
}
321-
322-
void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Add(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
323-
{
324-
throw new NotImplementedException();
325-
//Guard.ArgumentNotNull(item, "item");
326-
//Guard.ArgumentNotNull(item.Value, "item.Value");
327-
//
328-
//var serializableDictionary = item.Value as SerializableDictionary<string, ConfigBranch>;
329-
//if (serializableDictionary == null)
330-
//{
331-
// serializableDictionary = new SerializableDictionary<string, ConfigBranch>(item.Value);
332-
//}
333-
//
334-
//Add(item.Key, serializableDictionary);
335-
}
336-
337-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Contains(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
338-
{
339-
throw new NotImplementedException();
340-
}
341-
342-
void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.CopyTo(KeyValuePair<string, IDictionary<string, ConfigBranch>>[] array, int arrayIndex)
343-
{
344-
throw new NotImplementedException();
345-
}
346-
347-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Remove(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
348-
{
349-
throw new NotImplementedException();
350-
}
351-
352-
bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.IsReadOnly
353-
{
354-
get { throw new NotImplementedException(); }
355-
}
356-
357-
void IDictionary<string, IDictionary<string, ConfigBranch>>.Add(string key, IDictionary<string, ConfigBranch> value)
358-
{
359-
throw new NotImplementedException();
360-
}
361-
362-
bool IDictionary<string, IDictionary<string, ConfigBranch>>.TryGetValue(string key, out IDictionary<string, ConfigBranch> value)
363-
{
364-
value = null;
365-
366-
Dictionary<string, ConfigBranch> branches;
367-
if (TryGetValue(key, out branches))
368-
{
369-
value = branches;
370-
return true;
371-
}
372-
373-
return false;
374-
}
375-
376-
IDictionary<string, ConfigBranch> IDictionary<string, IDictionary<string, ConfigBranch>>.this[string key]
377-
{
378-
get
379-
{
380-
throw new NotImplementedException();
381-
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
382-
//IDictionary<string, ConfigBranch> value;
383-
//if (!dictionary.TryGetValue(key, out value))
384-
//{
385-
// throw new KeyNotFoundException();
386-
//}
387-
//
388-
//return value;
389-
}
390-
set
391-
{
392-
throw new NotImplementedException();
393-
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
394-
//dictionary.Add(key, value);
395-
}
396-
}
397-
398-
ICollection<string> IDictionary<string, IDictionary<string, ConfigBranch>>.Keys
399-
{
400-
get
401-
{
402-
throw new NotImplementedException();
403-
}
404-
}
405-
406-
ICollection<IDictionary<string, ConfigBranch>> IDictionary<string, IDictionary<string, ConfigBranch>>.Values
407-
{
408-
get
409-
{
410-
return Values.Cast<IDictionary<string,ConfigBranch>>().ToArray();
411-
}
412-
}
413313
}
414314

415315
[Serializable]
@@ -683,7 +583,7 @@ public void AddLocalBranch(string branch)
683583

684584
public void AddRemoteBranch(string remote, string branch)
685585
{
686-
IDictionary<string, ConfigBranch> branchList;
586+
Dictionary<string, ConfigBranch> branchList;
687587
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
688588
{
689589
if (!branchList.ContainsKey(branch))
@@ -706,7 +606,7 @@ public void AddRemoteBranch(string remote, string branch)
706606

707607
public void RemoveRemoteBranch(string remote, string branch)
708608
{
709-
IDictionary<string, ConfigBranch> branchList;
609+
Dictionary<string, ConfigBranch> branchList;
710610
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
711611
{
712612
if (branchList.ContainsKey(branch))

0 commit comments

Comments
 (0)