Пример #1
0
 public void CancelActiveActions()
 {
     foreach (var target in targets)
     {
         var             tcs             = target.Value.ActionStates.LastOrDefault();
         TaskSourceState taskSourceState = tcs as TaskSourceState;
         if (taskSourceState != null)
         {
             taskSourceState.Cancel();
             continue;
         }
         var seqState = tcs as SequenceState;
         seqState?.Cancel();
     }
 }
Пример #2
0
 public void CancelActiveActions()
 {
     //this might be very slow when debugged is attached.
     foreach (var target in targets)
     {
         var             tcs             = target.Value.ActionStates.LastOrDefault();
         TaskSourceState taskSourceState = tcs as TaskSourceState;
         if (taskSourceState != null)
         {
             taskSourceState.Cancel();
             continue;
         }
         var seqState = tcs as SequenceState;
         seqState?.Cancel();
     }
 }