public static CloudQueueMessage CreateQueueMessageFromCorrelationId(Guid correlationid)
        {
            var msg = new GenericActionMessage();

            msg.CorrelationId = correlationid;
            return(new CloudQueueMessage(msg.ToString()));
        }
        protected async Task LodgeAcknowledgementMessageAsync(GenericActionMessage receivedMessage, string processName, string queueName)
        {
            Dependencies.DiagnosticLogging.Debug($"{processName}: Lodging acknowledgement message");
            var acct        = CreateStorageAccountReference();
            var queueClient = acct.CreateCloudQueueClient();
            var queueRef    = queueClient.GetQueueReference(queueName);
            var msg         = receivedMessage == null?GenericActionMessage.CreateNewQueueMessage() : GenericActionMessage.CreateQueueMessageFromExistingMessage(receivedMessage);

            await queueRef.AddMessageAsync(msg);

            Dependencies.DiagnosticLogging.Verbose($"{processName}: Acknowledgement message lodged.");
        }
 public static CloudQueueMessage CreateQueueMessageFromExistingMessage(GenericActionMessage msg)
 {
     return(CreateQueueMessageFromCorrelationId(msg.CorrelationId));
 }