未验证 提交 9526c3a4 编写于 作者: L lindexi 提交者: GitHub

Remove the custom HashSet class (#3738)

上级 43adc20e
......@@ -3001,41 +3001,6 @@ public override void FindNamespace(SerializerContext context)
}
}
// need to implement our own Set class to alleviate ties to System.Core.dll
// HashSet<T> lives in System.Core.dll
class HashSet<T>
{
Dictionary<T, bool> dictionary;
public HashSet()
{
dictionary = new Dictionary<T, bool>();
}
public HashSet(IEqualityComparer<T> comparer)
{
dictionary = new Dictionary<T, bool>(comparer);
}
public bool Contains(T member)
{
return dictionary.ContainsKey(member);
}
public bool Add(T member)
{
if (Contains(member))
{
return false;
}
else
{
dictionary.Add(member, true);
return true;
}
}
}
private class PartiallyOrderedList<TKey, TValue> : IEnumerable<TValue>
where TValue : class
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册