| 123456789101112131415161718192021222324252627282930 |
- // Licensed to the .NET Foundation under one or more agreements.
- // The .NET Foundation licenses this file to you under the MIT License.
- // See the LICENSE file in the project root for more information.
- namespace System.Reactive
- {
- internal static class Stubs<T>
- {
- public static readonly Action<T> Ignore = static _ => { };
- public static readonly Func<T, T> I = static _ => _;
- }
- internal static class Stubs
- {
- public static readonly Action Nop = static () => { };
- public static readonly Action<Exception> Throw = static ex => { ex.Throw(); };
- }
- #if !NO_THREAD
- internal static class TimerStubs
- {
- #if NETSTANDARD1_3
- public static readonly System.Threading.Timer Never = new System.Threading.Timer(static _ => { }, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
- #else
- public static readonly System.Threading.Timer Never = new System.Threading.Timer(static _ => { });
- #endif
- }
- #endif
- }
|