public void FireEvents(IReadOnlyList <IEvent> events) { foreach (var @event in events.OfType <ChangeEvent <TState> >()) { state = @event.NewState; } nested.FireEvents(events); }
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 }); } } } }); } } }
public void FireEvents(IReadOnlyList <IEvent> events) { child.FireEvents(events); overlay.FireEvents(events); }
public void FireEvents(IReadOnlyList <IEvent> events) { props.OnEvents?.Invoke(events, this); solidColourState.FireEvents(events); nestedState.FireEvents(events); }
public void FireEvents(IReadOnlyList <IEvent> events) { nestedState.FireEvents(events); }
public void FireEvents(IReadOnlyList <IEvent> events) { renderResult.FireEvents(events); }