public Task <Checkpoint[]> GetCheckpointsAsync() { List <Task <Checkpoint> > checkpoints = new List <Task <Checkpoint> >(); foreach (var blob in _Container.ListBlobsAsync("Checkpoints/" + GetSetPart(), true, BlobListingDetails.None).GetAwaiter().GetResult().OfType <CloudBlockBlob>()) { checkpoints.Add(Checkpoint.LoadBlobAsync(blob, _Network)); } return(Task.WhenAll(checkpoints.ToArray())); }
public Task <Checkpoint> GetCheckpointAsync(string checkpointName) { var blob = _Container.GetBlockBlobReference("Checkpoints/" + GetSetPart(checkpointName)); return(Checkpoint.LoadBlobAsync(blob, _Network)); }