public static OCRQueueMessage Parse(string messageString) { var splitString = messageString.Split('|'); var jobID = splitString[0]; string imageBlobName = splitString[1]; string recipientEmail = splitString[2]; if (string.IsNullOrEmpty(jobID)) { throw new FormatException("Job ID cannot be empty."); } if (string.IsNullOrEmpty(imageBlobName)) { throw new FormatException("Image blob name cannot be empty."); } if (string.IsNullOrEmpty(recipientEmail)) { throw new FormatException("Email address cannot be empty."); } var message = new OCRQueueMessage(Guid.Parse(jobID), imageBlobName, recipientEmail); return message; }
public static OCRQueueMessage Parse(string messageString) { var splitString = messageString.Split('|'); var jobID = splitString[0]; string imageBlobName = splitString[1]; string recipientEmail = splitString[2]; if (string.IsNullOrEmpty(jobID)) { throw new FormatException("Job ID cannot be empty."); } if (string.IsNullOrEmpty(imageBlobName)) { throw new FormatException("Image blob name cannot be empty."); } if (string.IsNullOrEmpty(recipientEmail)) { throw new FormatException("Email address cannot be empty."); } var message = new OCRQueueMessage(Guid.Parse(jobID), imageBlobName, recipientEmail); return(message); }
private static void CreateOCRQueueItem(Guid jobID, string blobName, string emailAddress) { var message = new OCRQueueMessage(jobID, blobName, emailAddress); var wrappedMessage = new CloudQueueMessage(message.ToString()); AzureQueues.OCRQueue.AddMessage(wrappedMessage); }