示例#1
0
        /// <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);
            }
        }
示例#2
0
        /// <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);
            }
        }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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;
     }
 }
示例#5
0
 /// <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);
 }