/// <summary> /// Begins an edit on an object. /// </summary> void IEditableObject.BeginEdit() { var eventArgs = new BeginEditEventArgs(this); _beginEditingEvent.SafeInvoke(this, eventArgs); OnBeginEdit(eventArgs); if (_backup != null) { return; } if (eventArgs.Cancel) { Log.Info("IEditableObject.BeginEdit is canceled by the event args"); return; } Log.Debug("IEditableObject.BeginEdit"); _backup = new BackupData(this); }
protected override void OnBeginEdit(BeginEditEventArgs e) { OnBeginEditCalled = true; }
/// <summary> /// Raises the <see cref="IEditableObject.BeginEdit"/> event. /// </summary> /// <param name="e">The <see cref="System.ComponentModel.BeginEditEventArgs"/> instance containing the event data.</param> protected virtual void OnBeginEdit(BeginEditEventArgs e) { }