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; } }
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); }