/// <summary> /// Helper method for raising the <see cref="MergeRequested">Merge Requested</see> event and returning whether any of the Event Handlers cancelled the operation /// </summary> /// <returns>True if the operation can continue, false if it should be aborted</returns> protected void RaiseMergeRequested(CancellableGraphEventArgs args) { CancellableGraphEventHandler d = this.MergeRequested; if (d != null) { d(this, args); } }
/// <summary> /// Helper method for raising the <see cref="MergeRequested">Merge Requested</see> event and returning whether any of the Event Handlers cancelled the operation. /// </summary> /// <returns>True if the operation can continue, false if it should be aborted.</returns> protected bool RaiseMergeRequested() { CancellableGraphEventHandler d = MergeRequested; if (d != null) { CancellableGraphEventArgs args = new CancellableGraphEventArgs(this); d(this, args); return(!args.Cancel); } else { return(true); } }
/// <summary> /// Event handler to help propogate Graph events from the underlying graph /// </summary> /// <param name="sender">Sender</param> /// <param name="args">Arguments</param> protected virtual void OnMergeRequested(Object sender, CancellableGraphEventArgs args) { this.RaiseMergeRequested(args); }
/// <summary> /// Helper method for raising the <see cref="MergeRequested">Merge Requested</see> event and returning whether any of the Event Handlers cancelled the operation /// </summary> /// <returns>True if the operation can continue, false if it should be aborted</returns> protected bool RaiseMergeRequested() { CancellableGraphEventHandler d = this.MergeRequested; if (d != null) { CancellableGraphEventArgs args = new CancellableGraphEventArgs(this); d(this, args); return !args.Cancel; } else { return true; } }
/// <summary> /// Event handler to help propogate Graph events from the underlying graph /// </summary> /// <param name="sender">Sender</param> /// <param name="args">Arguments</param> protected virtual void OnClearRequested(Object sender, CancellableGraphEventArgs args) { RaiseClearRequested(args); }