TryParse() публичный Метод

Attempts to parse the input specified by the user into the Message.
public TryParse ( string input ) : ParseResult
input string The input from the user.
Результат ParseResult
Пример #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());
            }
        }
Пример #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());
     }
 }