private void PassEvents() { if (eventListener != null) { while (eventQueue.Any()) { ViewModelEvent viewModelEvent = eventQueue.Dequeue(); eventListener.OnViewModelEvent(viewModelEvent); } } }
public void RaiseEvent(ViewModelEvent viewModelEvent) { eventQueue.Enqueue(viewModelEvent); PassEvents(); }