RogueEnumerable.cs 652 B

123456789101112131415161718192021222324252627
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. using System;
  3. using System.Collections.Generic;
  4. namespace ReactiveTests.Tests
  5. {
  6. class RogueEnumerable<T> : IEnumerable<T>
  7. {
  8. private readonly Exception _ex;
  9. public RogueEnumerable(Exception ex)
  10. {
  11. _ex = ex;
  12. }
  13. public IEnumerator<T> GetEnumerator()
  14. {
  15. throw _ex;
  16. }
  17. System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
  18. {
  19. throw new NotImplementedException();
  20. }
  21. }
  22. }