public void Enqueue(T item) { if (item == null) { return; } _queueIn.Enqueue(item); }
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) { if (this.PropertyChanged != null) { _propChangedQueue.Enqueue(e); if (ThreadSafeDispatcher == null || ThreadSafeDispatcher.CheckAccess()) { HandlePropertyChanged(); } else if (ShouldFirePropChangedDispatcher()) { ThreadSafeDispatcher.BeginInvoke(new HandleThreadSafeDelegate(HandlePropertyChanged)); } } }
protected virtual void OnItemPropertyChanging(ItemPropertyChangedEventArgs <T> e) { if (ItemPropertyChanging != null) { _itemChangingQueue.Enqueue(e); if (ThreadSafeDispatcher == null || ThreadSafeDispatcher.CheckAccess()) { HandleItemChanging(); } else if (ShouldFireItemPropertyChangingDispatcher()) { ThreadSafeDispatcher.BeginInvoke(new HandleThreadSafeDelegate(HandleItemChanging)); } } HookItemPropertyChanging(e.Item, e.PropertyName); }
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) { if (e == null || _disablePropertyChanges) { return; } HookPropertyChanged(e.PropertyName); _propChangedQueue.Enqueue(e); if (ThreadSafeDispatcher == null || ThreadSafeDispatcher.CheckAccess()) { HandlePropertyEvents(); } else if (ShouldFirePropEventsDispatcher()) { ThreadSafeDispatcher.BeginInvoke(new HandleThreadSafeDelegate(HandlePropertyEvents)); } }
protected virtual void OnPropertyChanging(PropertyChangingEventArgs e) { if (e == null || _disablePropertyChanges) { return; } if (this.PropertyChanging != null && e != null) { _propChangingQueue.Enqueue(e); if (ThreadSafeDispatcher == null || ThreadSafeDispatcher.CheckAccess()) { HandlePropertyEvents(); } else if (ShouldFirePropEventsDispatcher()) { ThreadSafeDispatcher.BeginInvoke(new HandleThreadSafeDelegate(HandlePropertyEvents)); } } }