/// <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(); } }
/// <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(); } } }