using System; namespace CSLA.Core { /// /// This base class declares the IsDirtyChanged event /// to be NonSerialized so serialization will work. /// [Serializable()] public abstract class BindableBase { /// /// Declares a serialization-safe IsDirtyChanged event. /// [field: NonSerialized] public event EventHandler IsDirtyChanged; /// /// Call this method to raise the IsDirtyChanged event. /// virtual protected void OnIsDirtyChanged() { if (IsDirtyChanged != null) IsDirtyChanged(this, EventArgs.Empty); } } }