Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/GitHub.Api/Cache/CacheInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public interface ILocalConfigBranchDictionary : IDictionary<string, ConfigBranch

}

public interface IRemoteConfigBranchDictionary : IDictionary<string, IDictionary<string, ConfigBranch>>
public interface IRemoteConfigBranchDictionary : IDictionary<string, Dictionary<string, ConfigBranch>>
{

}
Expand Down
104 changes: 2 additions & 102 deletions src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,106 +310,6 @@ public void OnAfterDeserialize()
Add(remote, branchesDictionary);
}
}

IEnumerator<KeyValuePair<string, IDictionary<string, ConfigBranch>>> IEnumerable<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.GetEnumerator()
{
throw new NotImplementedException();
//return AsDictionary
// .Select(pair => new KeyValuePair<string, IDictionary<string, ConfigBranch>>(pair.Key, pair.Value.AsDictionary))
// .GetEnumerator();
}

void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Add(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
{
throw new NotImplementedException();
//Guard.ArgumentNotNull(item, "item");
//Guard.ArgumentNotNull(item.Value, "item.Value");
//
//var serializableDictionary = item.Value as SerializableDictionary<string, ConfigBranch>;
//if (serializableDictionary == null)
//{
// serializableDictionary = new SerializableDictionary<string, ConfigBranch>(item.Value);
//}
//
//Add(item.Key, serializableDictionary);
}

bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Contains(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
{
throw new NotImplementedException();
}

void ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.CopyTo(KeyValuePair<string, IDictionary<string, ConfigBranch>>[] array, int arrayIndex)
{
throw new NotImplementedException();
}

bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.Remove(KeyValuePair<string, IDictionary<string, ConfigBranch>> item)
{
throw new NotImplementedException();
}

bool ICollection<KeyValuePair<string, IDictionary<string, ConfigBranch>>>.IsReadOnly
{
get { throw new NotImplementedException(); }
}

void IDictionary<string, IDictionary<string, ConfigBranch>>.Add(string key, IDictionary<string, ConfigBranch> value)
{
throw new NotImplementedException();
}

bool IDictionary<string, IDictionary<string, ConfigBranch>>.TryGetValue(string key, out IDictionary<string, ConfigBranch> value)
{
value = null;

Dictionary<string, ConfigBranch> branches;
if (TryGetValue(key, out branches))
{
value = branches;
return true;
}

return false;
}

IDictionary<string, ConfigBranch> IDictionary<string, IDictionary<string, ConfigBranch>>.this[string key]
{
get
{
throw new NotImplementedException();
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
//IDictionary<string, ConfigBranch> value;
//if (!dictionary.TryGetValue(key, out value))
//{
// throw new KeyNotFoundException();
//}
//
//return value;
}
set
{
throw new NotImplementedException();
//var dictionary = (IDictionary<string, IDictionary<string, ConfigBranch>>)this;
//dictionary.Add(key, value);
}
}

ICollection<string> IDictionary<string, IDictionary<string, ConfigBranch>>.Keys
{
get
{
throw new NotImplementedException();
}
}

ICollection<IDictionary<string, ConfigBranch>> IDictionary<string, IDictionary<string, ConfigBranch>>.Values
{
get
{
return Values.Cast<IDictionary<string,ConfigBranch>>().ToArray();
}
}
}

[Serializable]
Expand Down Expand Up @@ -683,7 +583,7 @@ public void AddLocalBranch(string branch)

public void AddRemoteBranch(string remote, string branch)
{
IDictionary<string, ConfigBranch> branchList;
Dictionary<string, ConfigBranch> branchList;
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
{
if (!branchList.ContainsKey(branch))
Expand All @@ -706,7 +606,7 @@ public void AddRemoteBranch(string remote, string branch)

public void RemoveRemoteBranch(string remote, string branch)
{
IDictionary<string, ConfigBranch> branchList;
Dictionary<string, ConfigBranch> branchList;
if (RemoteConfigBranches.TryGetValue(remote, out branchList))
{
if (branchList.ContainsKey(branch))
Expand Down