private void EndAction(Action action) { action.isRunning = false; ActionEnd actionEnd = action.End(this.actions); if (isSkipping && action.lastResult.skipAction != -10 && (action is ActionCheck || action is ActionCheckMultiple)) { // When skipping an ActionCheck that has already run, revert to previous result actionEnd = new ActionEnd(action.lastResult); } else { action.SetLastResult(new ActionEnd(actionEnd)); ReturnLastResultToSource(actionEnd, actions.IndexOf(action)); } if (action is ActionCheck || action is ActionCheckMultiple) { if (actionEnd.resultAction == ResultAction.Skip && actionEnd.skipAction == actions.IndexOf(action)) { // Looping on itself will cause a StackOverflowException, so delay slightly ProcessActionEnd(actionEnd, actions.IndexOf(action), true); return; } } ProcessActionEnd(actionEnd, actions.IndexOf(action)); }
private void EndAction(Action action) { action.isRunning = false; ActionEnd actionEnd = action.End(this.actions); if (isSkipping && action.lastResult.skipAction != -10 && (action is ActionCheck || action is ActionCheckMultiple)) { // When skipping an ActionCheck that has already run, revert to previous result actionEnd = new ActionEnd(action.lastResult); } else { action.SetLastResult(new ActionEnd(actionEnd)); ReturnLastResultToSource(actionEnd, actions.IndexOf(action)); } ProcessActionEnd(actionEnd, actions.IndexOf(action)); }