Inheritance: SmtpCommand
Example #1
0
        /// <summary>
        /// Make an DBUG command from the given enumerator.
        /// </summary>
        /// <param name="command">The DBUG command that is defined within the token enumerator.</param>
        /// <param name="errorResponse">The error that indicates why the command could not be made.</param>
        /// <returns>Returns true if a command could be made, false if not.</returns>
        public bool TryMakeDbug(out SmtpCommand command, out SmtpResponse errorResponse)
        {
            Debug.Assert(Enumerator.Peek() == new Token(TokenKind.Text, "DBUG"));

            command       = null;
            errorResponse = null;

            Enumerator.Take();
            Enumerator.Skip(TokenKind.Space);

            if (TryMakeEnd() == false)
            {
                _options.Logger.LogVerbose("DBUG command can not have parameters.");

                errorResponse = SmtpResponse.SyntaxError;
                return(false);
            }

            command = new DbugCommand(_options);
            return(true);
        }
Example #2
0
 /// <summary>
 /// Visit an DBUG command.
 /// </summary>
 /// <param name="command">The command that is being visited.</param>
 protected virtual void Visit(DbugCommand command)
 {
 }