Ejemplo n.º 1
0
    public static int test_0_rx_mixed_regress()
    {
        var v = new VirtualTimeScheduler <long, long> ();

        v.ScheduleAbsolute <Action> (null, 22);
        return(0);
    }
Ejemplo n.º 2
0
 public HotObservable(VirtualTimeScheduler <long, long> scheduler, IEnumerable <Recorded <Notification <T> > > messages)
 {
     Ensure.NotNull(scheduler, nameof(scheduler));
     Ensure.NotNull(messages, nameof(messages));
     _scheduler    = scheduler;
     Messages      = messages.ToList();
     Subscriptions = new List <Subscription>();
     foreach (var message in Messages)
     {
         var notification = message.Value;
         scheduler.ScheduleAbsolute(default(object), message.Time, (_, __) =>
         {
             var observers = _observers.ToArray();
             foreach (var observer in observers)
             {
                 notification.Accept(observer);
             }
             return(Disposable.Empty);
         });
     }
 }