You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
646 B
25 lines
646 B
5 years ago
|
// Needed for NET30
|
||
|
#if !NET_4_6
|
||
|
using System.Collections.Generic;
|
||
|
using System.Collections.ObjectModel;
|
||
|
using LinqInternal.Collections.ThreadSafe;
|
||
|
|
||
|
namespace LinqInternal.Collections
|
||
|
{
|
||
|
[System.Diagnostics.DebuggerNonUserCode]
|
||
|
internal sealed class EmptyCollection<T> : ReadOnlyCollection<T>, IReadOnlyCollection<T>
|
||
|
{
|
||
|
private static readonly EmptyCollection<T> _instance = new EmptyCollection<T>();
|
||
|
|
||
|
private EmptyCollection()
|
||
|
: base(ArrayReservoir<T>.EmptyArray)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public static EmptyCollection<T> Instance
|
||
|
{
|
||
|
get { return _instance; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#endif
|