| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
using System; |
| 4 |
using System.Collections.Generic; |
| 5 |
|
| 6 |
namespace ReactiveTests.Dummies |
| 7 |
{ |
| 8 |
class DummyEnumerable<T> : IEnumerable<T> |
| 9 |
{ |
| 10 |
public static readonly DummyEnumerable<T> Instance = new DummyEnumerable<T>(); |
| 11 |
|
| 12 |
private DummyEnumerable() |
| 13 |
{ |
| 14 |
} |
| 15 |
|
| 16 |
public IEnumerator<T> GetEnumerator() |
| 17 |
{ |
| 18 |
throw new NotImplementedException(); |
| 19 |
} |
| 20 |
|
| 21 |
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() |
| 22 |
{ |
| 23 |
throw new NotImplementedException(); |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
class NullEnumeratorEnumerable<T> : IEnumerable<T> |
| 28 |
{ |
| 29 |
public static readonly NullEnumeratorEnumerable<T> Instance = new NullEnumeratorEnumerable<T>(); |
| 30 |
|
| 31 |
private NullEnumeratorEnumerable() |
| 32 |
{ |
| 33 |
} |
| 34 |
|
| 35 |
public IEnumerator<T> GetEnumerator() |
| 36 |
{ |
| 37 |
return null; |
| 38 |
} |
| 39 |
|
| 40 |
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() |
| 41 |
{ |
| 42 |
return GetEnumerator(); |
| 43 |
} |
| 44 |
} |
| 45 |
} |