コード例 #1
0
 public void FireEvents(IReadOnlyList <IEvent> events)
 {
     foreach (var @event in events.OfType <ChangeEvent <TState> >())
     {
         state = @event.NewState;
     }
     nested.FireEvents(events);
 }
コード例 #2
0
 private void OnNextUpdate(Update newUpdate)
 {
     lock (this)
     {
         queuedUpdates.Add(newUpdate);
         if (queuedUpdates.Count >= 1 && !running)
         {
             running = true;
             ThreadPool.QueueUserWorkItem(obj =>
             {
                 while (true)
                 {
                     List <Update> updates = null;
                     lock (this)
                     {
                         updates       = queuedUpdates;
                         queuedUpdates = new List <Update>();
                     }
                     if (updates.Count == 0)
                     {
                         OnUpdatesFinished();
                         lock (this)
                         {
                             if (queuedUpdates.Count != 0)
                             {
                                 continue;
                             }
                             else
                             {
                                 running = false;
                                 return;
                             }
                         }
                     }
                     foreach (var update in updates)
                     {
                         update.UserDefinedAction?.Invoke();
                         if (update.ExternalEvent != null)
                         {
                             currentElementState.FireEvents(new List <IEvent> {
                                 update.ExternalEvent
                             });
                         }
                     }
                 }
             });
         }
     }
 }
コード例 #3
0
 public void FireEvents(IReadOnlyList <IEvent> events)
 {
     child.FireEvents(events);
     overlay.FireEvents(events);
 }
コード例 #4
0
 public void FireEvents(IReadOnlyList <IEvent> events)
 {
     props.OnEvents?.Invoke(events, this);
     solidColourState.FireEvents(events);
     nestedState.FireEvents(events);
 }
コード例 #5
0
 public void FireEvents(IReadOnlyList <IEvent> events)
 {
     nestedState.FireEvents(events);
 }
コード例 #6
0
 public void FireEvents(IReadOnlyList <IEvent> events)
 {
     renderResult.FireEvents(events);
 }