mscorlib(4.0.0.0) API with additions
EmptyEnumerable.cs
2 
3 namespace System.Linq.Parallel
4 {
5  internal class EmptyEnumerable<T> : ParallelQuery<T>
6  {
7  private static volatile EmptyEnumerable<T> s_instance;
8 
9  private static volatile EmptyEnumerator<T> s_enumeratorInstance;
10 
11  internal static EmptyEnumerable<T> Instance
12  {
13  get
14  {
15  if (s_instance == null)
16  {
17  s_instance = new EmptyEnumerable<T>();
18  }
19  return s_instance;
20  }
21  }
22 
23  private EmptyEnumerable()
24  : base(QuerySettings.Empty)
25  {
26  }
27 
28  public override IEnumerator<T> GetEnumerator()
29  {
30  if (s_enumeratorInstance == null)
31  {
32  s_enumeratorInstance = new EmptyEnumerator<T>();
33  }
34  return s_enumeratorInstance;
35  }
36  }
37 }
Definition: __Canon.cs:3
Specifies that instance members are to be included in the search.