Example #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;
     this.OnMessageReceived(e.Message);
 }
Example #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)
 {
     this.OnMessageSent(e.Message);
 }
Example #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)
 {
     IScsMessage message = e.Message;
     if (message is ScsPingMessage)
     {
         ICommunicationChannel communicationChannel = this._communicationChannel;
         ScsPingMessage scsPingMessage1 = new ScsPingMessage();
         scsPingMessage1.RepliedMessageId = message.MessageId;
         ScsPingMessage scsPingMessage2 = scsPingMessage1;
         communicationChannel.SendMessage((IScsMessage)scsPingMessage2);
     }
     else
         this.OnMessageReceived(message);
 }