Exemple #1
0
 private void OnFirstCompleted(ActionCompletedUnit ou)
 {
     Result.InnerResults.Add(ou.Action.Result);
     if (!SecondAction.Token.IsStateActive)
     {
         SetStateCompleted(ou);
     }
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 protected virtual void OnCompletedInternal(ActionCompletedUnit ou)
 {
 }