public IRequest Marshall(SendRawEmailRequest sendRawEmailRequest) { IRequest request = new DefaultRequest(sendRawEmailRequest, "AmazonSimpleEmailService"); request.Parameters.Add("Action", "SendRawEmail"); request.Parameters.Add("Version", "2010-12-01"); if (sendRawEmailRequest != null && sendRawEmailRequest.IsSetSource()) { request.Parameters.Add("Source", StringUtils.FromString(sendRawEmailRequest.Source)); } if (sendRawEmailRequest != null) { List <string> destinationsList = sendRawEmailRequest.Destinations; int destinationsListIndex = 1; foreach (string destinationsListValue in destinationsList) { request.Parameters.Add("Destinations.member." + destinationsListIndex, StringUtils.FromString(destinationsListValue)); destinationsListIndex++; } } if (sendRawEmailRequest != null) { RawMessage rawMessage = sendRawEmailRequest.RawMessage; if (rawMessage != null && rawMessage.IsSetData()) { request.Parameters.Add("RawMessage.Data", StringUtils.FromMemoryStream(rawMessage.Data)); } } return(request); }