/// <summary> /// <see cref="IDevice.RemoveSegmentAsync(int, AsyncCallback, IAsyncResult)"/> /// </summary> /// <param name="segment"></param> /// <param name="callback"></param> /// <param name="result"></param> public override void RemoveSegmentAsync(int segment, AsyncCallback callback, IAsyncResult result) { if (blobs.TryRemove(segment, out BlobEntry blob)) { CloudPageBlob pageBlob = blob.GetPageBlob(); pageBlob.BeginDelete(ar => { try { pageBlob.EndDelete(ar); } catch (Exception) { // Can I do anything else other than printing out an error message? } callback(ar); }, result); } }