public TryMakeDbug ( |
||
enumerator | The enumerator to create the command from. | |
command | The DBUG command that is defined within the token enumerator. | |
errorResponse | The error that indicates why the command could not be made. | |
return | bool |
public bool TryMakeDbug(TokenEnumerator enumerator, out SmtpCommand command, out SmtpResponse errorResponse)
{
Debug.Assert(enumerator.Peek() == new Token(TokenKind.Text, "DBUG"));
command = null;
errorResponse = null;
enumerator.Take();
enumerator.TakeWhile(TokenKind.Space);
if (enumerator.Count > 1)
{
_logger.LogVerbose("DBUG command can not have parameters (Tokens={0})", enumerator.Count);
errorResponse = SmtpResponse.SyntaxError;
return false;
}
command = DbugCommand.Instance;
return true;
}