TryParse() public method

Attempts to parse the input specified by the user into the Message.
public TryParse ( string input ) : ParseResult
input string The input from the user.
return ParseResult
Exemplo n.º 1
0
        /// <summary>
        /// Send a reply to a ping command.
        /// </summary>
        /// <param name="rawData">The raw ping command.</param>
        private void ReplyToPing(string rawData)
        {
            PongMessage pongMessage = new PongMessage(string.Empty);

            if (pongMessage.TryParse(rawData).Success)
            {
                this.Send(pongMessage.ToString());
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Send a reply to a ping command.
 /// </summary>
 /// <param name="rawData">The raw ping command.</param>
 private void ReplyToPing(string rawData)
 {
     PongMessage pongMessage = new PongMessage(string.Empty);
     if (pongMessage.TryParse(rawData).Success)
     {
         this.Send(pongMessage.ToString());
     }
 }