public void Process(ParameterParser parameters, bool throwOnUnknownParameter)
        {
            foreach (Parameter parameter in parameters.Parameters)
            {
                IParameterProcessor parameterProcessor = GetProcessor(parameter.Name);

                if (parameterProcessor != null)
                {
                    parameterProcessor.SetParameter(parameter.Name, parameter.Value);
                }
                else if (throwOnUnknownParameter)
                {
                    throw new SmtpServerException(
                              new SmtpResponse(StandardSmtpResponseCode.SyntaxErrorInCommandArguments,
                                               "Parameter {0} is not recognised", parameter.Name));
                }
            }
        }
        public Task ProcessAsync(IConnection connection, ParameterParser parameters, bool throwOnUnknownParameter)
        {
            foreach (Parameter parameter in parameters.Parameters)
            {
                IParameterProcessor parameterProcessor = GetProcessor(parameter.Name);

                if (parameterProcessor != null)
                {
                    parameterProcessor.SetParameter(connection, parameter.Name, parameter.Value);
                }
                else if (throwOnUnknownParameter)
                {
                    throw new SmtpServerException(
                              new SmtpResponse(StandardSmtpResponseCode.SyntaxErrorInCommandArguments,
                                               "Parameter {0} is not recognised", parameter.Name));
                }
            }

            return(Task.CompletedTask);
        }