using System;
using System.ComponentModel;

namespace InvExplorer
{
    /// <summary>
    /// Base data object class (implements INotifyPropertyChanged).
    /// </summary>
    public class BaseObject : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, e);
        }
        protected void OnPropertyChanged(string propName)
        {
            OnPropertyChanged(new PropertyChangedEventArgs(propName));
        }
        protected void OnPropertyChanged()
        {
            OnPropertyChanged(string.Empty);
        }
    }
}
