/// <summary> /// Cancels the current transaction</summary> public virtual void Cancel() { if (InTransaction) { OnCancelled(); Cancelled.Raise(this, EventArgs.Empty); // rollback in reverse order for (int i = m_transactionOperations.Count - 1; i >= 0; i--) { m_transactionOperations[i].Undo(); } m_transactionOperations = null; m_transactionName = null; } m_transactionCancelled = true; }
protected void OnCancelled() { DebugUtil.Log("ContentsLoader OnCancelled"); Cancelled.Raise(this, null); }
/// <summary> /// Raises the Cancelled event</summary> /// <param name="e">Event args</param> protected virtual void OnCancelled(EventArgs e) { Cancelled.Raise(this, e); }
public void RaiseCancelled() { Cancelled.Raise(this, EventArgs.Empty); }
/// <summary> /// Raises the Cancelled event</summary> /// <param name="sender">Sender</param> /// <param name="e">Event args</param> protected virtual void OnCancelled(object sender, EventArgs e) { m_canceled = true; Cancelled.Raise(this, e); }