예제 #1
0
        /// <summary>
        /// Method for notifying receipt of a new message.
        /// </summary>
        /// <param name="message">New message.</param>
        public void GetNewMessage(string message)
        {
            NewMessageToClientEventArgs e = new NewMessageToClientEventArgs(message);

            OnNewMessage(e);
        }
예제 #2
0
 /// <summary>
 /// Used to synchronously call the methods supported by the delegate object.
 /// </summary>
 /// <param name="newMessageToClientEventArgs"> Type to receive a message when an event occurs. </param>
 protected void OnNewMessage(NewMessageToClientEventArgs newMessageToClientEventArgs)
 {
     NewMessage?.Invoke(this, newMessageToClientEventArgs);
 }