Esempio n. 1
0
        private void OnMessageProcessorChanged(object sender, MessageProcessorChangedEventArgs e)
        {
            if (e.OldProcessor != null)
            {
                e.OldProcessor.ConnectionEstablished -= OnConnectionEstablished;
                e.OldProcessor.ConnectionClosed      -= OnConnectionClosed;
                e.OldProcessor.ConnectingException   -= OnConnectingException;
            }

            if (e.NewProcessor != null)
            {
                e.NewProcessor.ConnectionEstablished += OnConnectionEstablished;
                e.NewProcessor.ConnectionClosed      += OnConnectionClosed;
                e.NewProcessor.ConnectingException   += OnConnectingException;
            }
        }
Esempio n. 2
0
 protected virtual void OnMessageProcessorChanged(MessageProcessorChangedEventArgs e)
 {
     if (MessageProcessorChanged != null)
         MessageProcessorChanged(this, e);
 }
Esempio n. 3
0
        private void OnMessageProcessorChanged(object sender, MessageProcessorChangedEventArgs e)
        {
            if (e.OldProcessor != null)
            {
                e.OldProcessor.ConnectionEstablished -= OnConnectionEstablished;
                e.OldProcessor.ConnectionClosed -= OnConnectionClosed;
                e.OldProcessor.ConnectingException -= OnConnectingException;
            }

            if (e.NewProcessor != null)
            {
                e.NewProcessor.ConnectionEstablished += OnConnectionEstablished;
                e.NewProcessor.ConnectionClosed += OnConnectionClosed;
                e.NewProcessor.ConnectingException += OnConnectingException;
            }
        }