Пример #1
0
 private void ReleaseChannel()
 {
     if (_proxy != null)
     {
         _proxy.InnerChannel.Opened       -= ConnectionOpened;
         _proxy.InnerChannel.Opening      -= OnChannelOpening;
         _proxy.ProcessMessagesCompleted  -= MessageSent;
         _proxy.StartApplicationCompleted -= StartApplicationCompleted;
         _proxy.StopApplicationCompleted  -= StopApplicationCompleted;
         _proxy.GetPendingEventCompleted  -= OnGetPendingEventCompleted;
         _proxy.InnerChannel.Faulted      -= OnChannelFaulted;
         _proxy.CloseAsync();
         _proxy            = null;
         _connectionOpened = false;
     }
 }