Exemplo n.º 1
0
 public void SetMaximumUndoCount(int count, object ownerKey = null)
 {
     ArgumentValidator.AssertGreaterThan(count, 0, "count");
     if (ownerKey == null)
     {
         this.taskCountMax = (long)count;
     }
     else
     {
         this.taskCountMaximums[ownerKey] = count;
     }
 }
Exemplo n.º 2
0
 public TaskResult Undo(int undoCount, object ownerKey = null)
 {
     ArgumentValidator.AssertGreaterThan(undoCount, 0, "undoCount");
     if (ownerKey == null)
     {
         return(this.Undo(undoCount));
     }
     for (int index = 0; index < undoCount; ++index)
     {
         TaskResult taskResult = this.Undo(ownerKey);
         if (taskResult != TaskResult.Completed)
         {
             return(taskResult);
         }
     }
     return(TaskResult.Completed);
 }