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)); }
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); }