/System.Reactive.Tests/System/ErrorScheduler.cs

https://github.com/gshackles/mono-reactive · C# · 27 lines · 26 code · 1 blank · 0 comment · 0 complexity · faa3c92e13a6953e42f0760794cdeed2 MD5 · raw file

  1. using System;
  2. using System.Linq;
  3. using System.Reactive;
  4. using System.Reactive.Disposables;
  5. using System.Reactive.Concurrency;
  6. using System.Reactive.Linq;
  7. using System.Reactive.Subjects;
  8. namespace System
  9. {
  10. class ErrorScheduler : IScheduler
  11. {
  12. public DateTimeOffset Now { get { return DateTimeOffset.Now; } }
  13. public IDisposable Schedule<TState> (TState state, Func<IScheduler, TState, IDisposable> action)
  14. {
  15. throw new MyException ();
  16. }
  17. public IDisposable Schedule<TState> (TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action)
  18. {
  19. throw new MyException ();
  20. }
  21. public IDisposable Schedule<TState> (TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
  22. {
  23. throw new MyException ();
  24. }
  25. }
  26. }