Exemple #1
0
        public WorkflowMessage Dequeue()
        {
            if (_queue.TryDequeue(out string content))
            {
                return(WorkflowMessage.CreateFrom(this, GetId(), content, null));
            }

            return(null);
        }
Exemple #2
0
        public WorkflowMessage Dequeue()
        {
            TimeSpan visibility = TimeSpan.FromSeconds(5);

            var queueMessage = _queue.GetMessageAsync(visibility, null, null).Result;

            if (queueMessage == null)
            {
                return(null);
            }

            return(WorkflowMessage.CreateFrom(this, queueMessage.Id, queueMessage.AsString, queueMessage.PopReceipt));
        }