コード例 #1
0
        public static void GenSchedule0 <T>()
        {
            // var x = default(ValueTuple<T,T>);
            CurrentThreadScheduler s = null;

            s.Schedule <T>(default(T), null);
        }
コード例 #2
0
ファイル: Extensions.cs プロジェクト: ctaggart/Rx.NET
        //public static IDisposable ScheduleAbsolute(this TestScheduler scheduler, long time, Action action)
        //{
        //    return scheduler.ScheduleAbsolute(default(object), time, (scheduler1, state1) => { action(); return Disposable.Empty; });
        //}

        //public static IDisposable ScheduleRelative(this TestScheduler scheduler, long time, Action action)
        //{
        //    return scheduler.ScheduleRelative(default(object), time, (scheduler1, state1) => { action(); return Disposable.Empty; });
        //}

        public static void EnsureTrampoline(this CurrentThreadScheduler scheduler, Action action)
        {
            if (scheduler.ScheduleRequired)
            {
                scheduler.Schedule(action);
            }
            else
            {
                action();
            }
        }