Inheritance: IDisposable
Exemplo n.º 1
0
        void heartbeatTick()
        {
            Heartbeat heartbeat = (Heartbeat)TimerEvent.Current.State;

            heartbeat.Execute(Runtime);
        }
Exemplo n.º 2
0
 public HeartbeatReplyDispatcher(Heartbeat heartbeat)
 {
     _heartbeat = heartbeat;
 }
 public void UnregisterHeartbeat(Heartbeat heartbeat)
 {
     lock (_heartbeats)
     {
         var timerService = getTimerService();
         _heartbeats.Remove(heartbeat);
         timerService.RemoveEvent(_events[heartbeat]);
         _events.Remove(heartbeat);
     }
 }
 public HeartbeatReplyDispatcher(Heartbeat heartbeat)
 {
     _heartbeat = heartbeat;
 }
 public void RegisterHeartbeat(Heartbeat heartbeat)
 {
     lock (_heartbeats)
     {
         var timerService = getTimerService();
         _heartbeats.Add(heartbeat);
         TimerEvent evt = new TimerEvent(heartbeatTick, heartbeat.Interval, heartbeat);
         timerService.AddEvent(evt);
         _events.Add(heartbeat, evt);
     }
 }