private void ProcessXsoEventAvailable(NotificationManager.AsyncEvent evt, IBudget budget)
 {
     Interlocked.Increment(ref this.totalXsoEvents);
     this.EnqueueDiagOperation(NotificationManager.DiagnosticEvent.XsoEvent, new EventType?(evt.Event.EventType), new EventObjectType?(evt.Event.ObjectType), null);
     if (this.command == null)
     {
         AirSyncDiagnostics.TraceDebug <string>(ExTraceGlobals.ThreadingTracer, this, "XSO event available for {0}, but command is not available. Calling Kill", this.uniqueId);
         this.Kill();
         return;
     }
     budget.CheckOverBudget();
     this.command.Consume(evt.Event);
     AirSyncDiagnostics.TraceDebug <string>(ExTraceGlobals.ThreadingTracer, this, "XSO event available for {0}. calling Command.Consume", this.uniqueId);
 }
 private void ProcessTimeout(IBudget budget)
 {
     Interlocked.Increment(ref this.totalTimeouts);
     this.EnqueueDiagOperation(NotificationManager.DiagnosticEvent.HBTimeout);
     if (ExDateTime.UtcNow.CompareTo(this.lastTargetTime) >= 0)
     {
         if (this.command != null)
         {
             AirSyncDiagnostics.TraceDebug <string>(ExTraceGlobals.ThreadingTracer, this, "Timed out for {0}. calling command.HeartbeatCallback", this.uniqueId);
             budget.CheckOverBudget();
             this.command.HeartbeatCallback();
             return;
         }
         this.Kill();
         AirSyncDiagnostics.TraceDebug <string>(ExTraceGlobals.ThreadingTracer, this, "Timed out and killing {0}", this.uniqueId);
     }
 }