public void PutBlobEnforceNoOverwriteAsync() { BlobStorage.PutBlob(ContainerName, BlobName, 1, true); Assert.IsNull(BlobStorage.PutBlobAsync(ContainerName, BlobName, 6, false).Result, "#A01"); Assert.AreEqual(1, BlobStorage.GetBlobAsync <int>(ContainerName, BlobName).Result.Blob, "#A02"); }
public static Task <string> PutBlobAsync <T>(this IBlobStorageProvider provider, string containerName, string blobName, T item, string expectedEtag, IDataSerializer serializer = null) { return(provider.PutBlobAsync(containerName, blobName, item, typeof(T), true, expectedEtag, CancellationToken.None, serializer)); }
public static Task <string> PutBlobAsync <T>(this IBlobStorageProvider provider, string containerName, string blobName, T item, bool overwrite, IDataSerializer serializer = null) { return(provider.PutBlobAsync(containerName, blobName, item, typeof(T), overwrite, null, CancellationToken.None, serializer)); }
public static Task <string> PutBlobAsync <T>(this IBlobStorageProvider provider, IBlobLocationAndType <T> location, T item, string expectedEtag, IDataSerializer serializer = null) { return(provider.PutBlobAsync(location.ContainerName, location.Path, item, typeof(T), true, expectedEtag, CancellationToken.None, serializer)); }
public static Task <string> PutBlobAsync <T>(this IBlobStorageProvider provider, IBlobLocation location, T item, bool overwrite, CancellationToken cancellationToken, IDataSerializer serializer = null) { return(provider.PutBlobAsync(location.ContainerName, location.Path, item, typeof(T), overwrite, null, cancellationToken, serializer)); }
public static Task <string> PutBlobAsync(this IBlobStorageProvider provider, string containerName, string blobName, object item, Type type, bool overwrite, CancellationToken cancellationToken, IDataSerializer serializer = null) { return(provider.PutBlobAsync(containerName, blobName, item, type, overwrite, null, cancellationToken, serializer)); }