Example #1
0
 public Task PrePublish <T>(PublishContext <T> context)
     where T : class
 {
     Interlocked.CompareExchange(ref _activityStarted, 1, 0);
     _receiveIdleTimer.Restart();
     return(TaskUtil.Completed);
 }
        public Task PreReceive(ReceiveContext context)
        {
            Interlocked.CompareExchange(ref _activityDetected, 1, 0);
            _inactivityTimer.Restart();

            return(TaskUtil.Completed);
        }
Example #3
0
 Task ISendObserver.PreSend <T>(SendContext <T> context)
 {
     Interlocked.CompareExchange(ref _activityStarted, 1, 0);
     _receiveIdleTimer.Restart();
     return(TaskUtil.Completed);
 }
 Task IReceiveObserver.PreReceive(ReceiveContext context)
 {
     Interlocked.CompareExchange(ref _activityStarted, 1, 0);
     _receiveIdleTimer.Restart();
     return(TaskUtil.Completed);
 }