コード例 #1
0
 /// <summary>
 /// Receives notification that a state machine has attained its endstate
 /// </summary>
 protected virtual void OnComplete(FsmStats stats, bool asPlanned)
 {
     CompletionCount++;
     if (Tracing.TraceCompletions())
     {
         Trace(FsmMessages.Completed(Id, stats, asPlanned));
         CompletionCount = 0;
     }
 }
コード例 #2
0
 public static AppMsg Completed(string machine, FsmStats stats, bool asPlanned)
 => appMsg($"{machine} executed for {stats.Runtime.Ms} ms and completed"
           + (asPlanned ? $" as planned after receiving {stats.ReceiptCount} events and experiencing {stats.TransitionCount} transitions" : " abnormally"),
           SeverityLevel.HiliteBL);