提交 4be74485 编写于 作者: N Nick Guerrera

Remove #ifs that are no longer needed

上级 e2a2b65f
......@@ -9,10 +9,7 @@ internal partial class SpecializedCollections
{
private partial class Empty
{
internal class Set<T> : Collection<T>, ISet<T>
#if COMPILERCORE
, IReadOnlySet<T>
#endif
internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
{
public static readonly new Set<T> Instance = new Set<T>();
......
......@@ -9,10 +9,7 @@ internal partial class SpecializedCollections
{
private partial class ReadOnly
{
internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>
#if COMPILERCORE
, IReadOnlySet<T>
#endif
internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
where TUnderlying : ISet<T>
{
public Set(TUnderlying underlying)
......
......@@ -44,12 +44,10 @@ public static ISet<T> EmptySet<T>()
return Empty.Set<T>.Instance;
}
#if COMPILERCORE
public static IReadOnlySet<T> EmptyReadOnlySet<T>()
{
return Empty.Set<T>.Instance;
}
#endif
public static IDictionary<TKey, TValue> EmptyDictionary<TKey, TValue>()
{
......@@ -100,13 +98,11 @@ public static ISet<T> ReadOnlySet<T>(ISet<T> set)
: new ReadOnly.Set<ISet<T>, T>(set);
}
#if COMPILERCORE
public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T> set)
{
return set == null || set.Count == 0
? EmptyReadOnlySet<T>()
: new ReadOnly.Set<ISet<T>, T>(set);
}
#endif
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册