Esempio n. 1
0
        /// <summary>
        /// Handles MessageReceived event of _communicationChannel object.
        /// </summary>
        /// <param name="sender">Source of event</param>
        /// <param name="e">Event arguments</param>
        private void CommunicationChannel_MessageReceived(object sender, MessageEventArgs e)
        {
            if (e.Message is ScsPingMessage)
            {
                return;
            }

            OnMessageReceived(e.Message);
        }
Esempio n. 2
0
 /// <summary>
 /// Handles MessageSent event of _communicationChannel object.
 /// </summary>
 /// <param name="sender">Source of event</param>
 /// <param name="e">Event arguments</param>
 private void CommunicationChannel_MessageSent(object sender, MessageEventArgs e)
 {
     OnMessageSent(e.Message);
 }
Esempio n. 3
0
        /// <summary>
        /// Handles MessageReceived event of _communicationChannel object.
        /// </summary>
        /// <param name="sender">Source of event</param>
        /// <param name="e">Event arguments</param>
        private void CommunicationChannel_MessageReceived(object sender, MessageEventArgs e)
        {
            var message = e.Message;
            if (message is ScsPingMessage)
            {
                _communicationChannel.SendMessage(new ScsPingMessage { RepliedMessageId = message.MessageId });
                return;
            }

            OnMessageReceived(message);
        }