Stubs.cs 680 B

1234567891011121314151617181920212223
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. namespace System.Reactive
  3. {
  4. internal static class Stubs<T>
  5. {
  6. public static readonly Action<T> Ignore = _ => { };
  7. public static readonly Func<T, T> I = _ => _;
  8. }
  9. internal static class Stubs
  10. {
  11. public static readonly Action Nop = () => { };
  12. public static readonly Action<Exception> Throw = ex => { ex.Throw(); };
  13. }
  14. #if !NO_THREAD
  15. internal static class TimerStubs
  16. {
  17. public static readonly System.Threading.Timer Never = new System.Threading.Timer(_ => { });
  18. }
  19. #endif
  20. }