Esempio n. 1
0
        public async Task SendMessageAsync(QueueType queueType, string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                throw new ArgumentNullException(nameof(id));
            }

            var queueClient = queueFactory.GetQueueReference(queueType);
            await queueClient.SendMessageAsync(id);
        }
Esempio n. 2
0
        public void QueueWorkItem(string queueName, object entity)
        {
            var queue        = _factory.GetQueueReference(queueName);
            var queueMessage = new CloudQueueMessage(JsonConvert.SerializeObject(entity));

            queue.AddMessage(queueMessage);
        }