Yaircc.Net.IRC.ModeMessage.TryParse C# (CSharp) Method

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
        public override ParseResult TryParse(string input)
        {
            ParseResult retval;

            if (input.ToLower().StartsWithEither(new string[] { @"/ban", @"/unban" }))
            {
                retval = this.ParseBanCommand(input);
            }
            else if (input.ToLower().StartsWithEither(new string[] { @"/deop", @"/dehop", @"/op", @"/hop" }))
            {
                retval = this.ParseOpCommand(input);
            }
            else if (input.ToLower().StartsWithEither(new string[] { @"/except", @"/unexcept" }))
            {
                retval = this.ParseExceptCommand(input);
            }
            else if (input.StartsWith(@"/voice", StringComparison.OrdinalIgnoreCase))
            {
                retval = this.ParseVoiceCommand(input);
            }
            else
            {
                retval = this.ParseModeCommand(input);
            }

            return retval;
        }