ShouldCancel() public static method

Method that can be used by IOutput implementations to determine the appropriate value to send for the cancel return value in a call to SetProgress.
public static ShouldCancel ( ) : bool
return bool
Ejemplo n.º 1
0
 public virtual bool SetProgress(int progress)
 {
     if (Operation == null)
     {
         throw new InvalidOperationException("SetProgress called when no operation was supposed to be in progress");
     }
     _progress  = progress;
     _cancelled = _cancelled || OutputHelper.ShouldCancel();
     return(_cancelled);
 }
Ejemplo n.º 2
0
 public virtual bool IterationComplete()
 {
     if (Operation == null)
     {
         throw new InvalidOperationException("IterationComplete called when no operation was supposed to be in progress");
     }
     _iteration++;
     _progress  = 0;
     _cancelled = _cancelled || OutputHelper.ShouldCancel();
     return(_cancelled);
 }
Ejemplo n.º 3
0
 public bool IterationComplete()
 {
     _cancelled = _cancelled || OutputHelper.ShouldCancel();
     return(_cancelled);
 }
Ejemplo n.º 4
0
 public bool SetProgress(int progress)
 {
     _cancelled = _cancelled || OutputHelper.ShouldCancel();
     return(_cancelled);
 }
Ejemplo n.º 5
0
 public bool IterationComplete()
 {
     return(OutputHelper.ShouldCancel());
 }
Ejemplo n.º 6
0
 public bool SetProgress(int progress)
 {
     return(OutputHelper.ShouldCancel());
 }