示例#1
0
        protected Task SendUnique(int count = 1)
        {
            var sends = new Task[count];

            for (var i = 0; i < count; i++)
            {
                sends[i] = Batch.AddMessageAsync(new CloudQueueMessage(Guid.NewGuid().ToString("N")));
            }
            return(Task.WhenAll(sends));
        }
示例#2
0
        protected async Task <List <string> > SendUnique(int count = 1)
        {
            var sends = new Task[count];
            var list  = new List <string>();

            for (var i = 0; i < count; i++)
            {
                var content = Guid.NewGuid().ToString("N");
                list.Add(content);
                sends[i] = Batch.AddMessageAsync(new CloudQueueMessage(content));
            }
            await Task.WhenAll(sends);

            return(list);
        }