예제 #1
0
        public async Task BlobCRUD()
        {
            string blobName = $"test{DateTime.UtcNow.Ticks}.json";

            string content = await _blobService.DownloadBlobContent(blobName);

            Assert.IsNull(content);

            await _blobService.UploadBlobContent(blobName, "test");

            content = await _blobService.DownloadBlobContent(blobName);

            Assert.AreEqual("test", content);

            await _blobService.UploadBlobContent(blobName, "test 2");

            content = await _blobService.DownloadBlobContent(blobName);

            Assert.AreEqual("test 2", content);

            await _blobService.DeleteBlob(blobName);

            content = await _blobService.DownloadBlobContent(blobName);

            Assert.IsNull(content);
        }
 private void DeleteBlob(Blob item)
 {
     // Remove it from the table view list and delete it
     items.Remove(item);
     tableView.ReloadData();
     Debug.Log("Removing blob: " + item.Name);
     StartCoroutine(blobService.DeleteBlob(DeleteBlobCompleted, container, item.Name));
 }
        protected async Task Delete(string uri)
        {
            try
            {
                await BlobService.DeleteBlob(uri);

                _uris.Remove(uri);
            } catch (Exception ex)
            {
                Telemetry.TrackException(ex);
            }
        }