using System; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; using InABox.Core; namespace comal.timesheets { public abstract class CoreDataModel : ICoreDataModel { #region INotifyPropertyChanged public event PropertyChangedEventHandler PropertyChanged; protected void DoPropertyChanged(object sender, PropertyChangedEventArgs args) { PropertyChanged?.Invoke(sender, args); } protected bool SetProperty(ref T field, T value, [CallerMemberName] string propertyName = null) { if (EqualityComparer.Default.Equals(field, value)) return false; field = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); return true; } #endregion // Use "new" to replace this with your actual columns public abstract Columns Columns { get; } public IColumns GetColumns() => Columns; } }