Esempio n. 1
0
 /// <summary>
 /// Cancels the token that is associated to
 /// the channel send and receive tasks.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Transport_Closing(object sender, DeferralEventArgs e)
 {
     using (e.GetDeferral())
     {
         _channelCancellationTokenSource.Cancel();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Cancels the token that is associated to the channel send and receive tasks.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Transport_Closing(object sender, DeferralEventArgs e)
 {
     using (e.GetDeferral())
     {
         if (!_consumerCts.IsCancellationRequested)
         {
             _consumerCts.Cancel();
         }
     }
 }