using System; using System.ComponentModel; using System.Linq; using System.Reactive.Linq; namespace AIStudio.Wpf.DiagramDesigner { //[Serializable] //public abstract class BindableBase : INotifyPropertyChanged //{ // #region INotifyPropertyChanged Implementation // /// // /// Occurs when any properties are changed on this object. // /// // public event PropertyChangedEventHandler PropertyChanged // { // add { this.propertyChanged += value; } // remove { this.propertyChanged -= value; } // } // protected event PropertyChangedEventHandler propertyChanged; // /// // /// A helper method that raises the PropertyChanged event for a property. // /// // /// The names of the properties that changed. // public virtual void NotifyChanged(params string[] propertyNames) // { // foreach (string name in propertyNames) // { // OnPropertyChanged(new PropertyChangedEventArgs(name)); // } // } // /// // /// Raises the PropertyChanged event. // /// // /// Event arguments. // protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) // { // if (this.propertyChanged != null) // { // this.propertyChanged(this, e); // } // } // #endregion // public IObservable WhenPropertyChanged // { // get // { // return Observable // .FromEventPattern( // h => this.propertyChanged += h, // h => this.propertyChanged -= h) // .Select(x => x.EventArgs.PropertyName); // } // } //} }