protected void OnCollectionChanged(NotifyCollectionChangedEventArgs args) { if (!this.FastIsCollectionChangedEmpty) { DispatchedEventHelper.Raise(this.SyncRoot, ref m_collectionChanged, this, args); } }
/// <summary> /// Raises the <see cref="DispatchedNotifyPropertyChangedObject.PropertyChanged"/> event. /// </summary> /// <param name="propertyName"> /// The name of the property that changed. /// </param> protected virtual void OnPropertyChanged(string propertyName) { Contract.Requires(propertyName != null, "propertyName"); Contract.Requires(!string.IsNullOrWhiteSpace(propertyName), "propertyName"); if (!DispatchedEventHelper.FastIsEmpty(ref m_propertyChanged)) { DispatchedEventHelper.Raise(this.SyncRoot, ref m_propertyChanged, this, new PropertyChangedEventArgs(propertyName)); } }