Пример #1
0
 private void OnChannelStateChanged(ChannelStateChangedEventArgs eventArgs)
 {
     if (this.ChannelStateChanged != null)
     {
         this.ChannelStateChanged(this, eventArgs);
     }
 }
Пример #2
0
 private void OnChannelStateChanged(object sender, ChannelStateChangedEventArgs e)
 {
     if (e.NewState == ChannelState.Attached)
     {
         this.SendQueuedMessages();
     }
     else if (e.NewState == ChannelState.Detached || e.NewState == ChannelState.Failed)
     {
         this.FailQueuedMessages(e.Reason);
     }
 }