コード例 #1
0
 private void onStateEvent(StateMachineEvent @event)
 {
     if (@event is StateMachineDeadEnd || @event is StateMachineError)
     {
         completeCurrentSync();
     }
 }
コード例 #2
0
        private void onStateEvent(StateMachineEvent @event)
        {
            if (@event is StateMachineDeadEnd)
            {
                completeCurrentSync(new Success(State));
            }

            if (@event is StateMachineError error)
            {
                completeCurrentSync(new Error(error.Exception));
            }
        }