private void OnFirstCompleted(ActionCompletedUnit ou) { Result.InnerResults.Add(ou.Action.Result); if (!SecondAction.Token.IsStateActive) { SetStateCompleted(ou); } }
private void OnLastCompleted(ActionCompletedUnit ou) { OnCompleted(ou); //foreach (var action in Actions) //{ // Result.InnerResults.Add(action.Result); //} if (!_allowFailed && _hasFailed) { SetStateFailed(ou); } else { SetStateCompleted(ou); } }
private void OnCompleted(ActionCompletedUnit ou) { if (ou.Action.Result.State == ActionStates.Failed) { _hasFailed = true; } if (_onActionCompleted != null && ou.ActionItems.Count > 0) { _onActionCompleted((ActionBase)ou.ActionItems[0], ou.Action.Result); } if (_onActionCompletedNew != null && ou.ActionItems.Count > 0) { _onActionCompletedNew(this, ou.Action); } Result.InnerResults.Add(ou.Action.Result); OnCompletedInternal(ou); }
protected virtual void OnCompletedInternal(ActionCompletedUnit ou) { }