Class AzureBlobStorageRestApiUtility
- Namespace
- Songhay
- Assembly
- SonghayCore.dll
Shared REST routines for Azure BLOB Storage.
public static class AzureBlobStorageRestApiUtility
- Inheritance
-
AzureBlobStorageRestApiUtility
- Inherited Members
Methods
DeleteBlobAsync(string, string, string)
DELETEs the BLOB of the specified ‘file’ name.
public static Task DeleteBlobAsync(string connectionString, string containerName, string fileName)
Parameters
connectionStringstringAzure BLOB Storage connection string
containerNamestringAzure BLOB Storage container name
fileNamestringBLOB ‘file’ name
Returns
Exceptions
DownloadBlobToStringAsync(string, string, string)
GETs the BLOB of the specified ‘file’ name.
public static Task<string> DownloadBlobToStringAsync(string connectionString, string containerName, string fileName)
Parameters
connectionStringstringAzure BLOB Storage connection string
containerNamestringAzure BLOB Storage container name
fileNamestringBLOB ‘file’ name
Returns
Exceptions
GetCloudStorageMetadata(string)
Gets the conventional Azure BLOB Storage metadata from the specified connection string.
public static (string accountName, string accountKey, string apiVersion) GetCloudStorageMetadata(string connectionString)
Parameters
connectionStringstringAzure BLOB Storage connection string
Returns
- (string accountName, string accountKey, string apiVersion)
Returns conventional named tuple.
Exceptions
GetStorageUriBuilder(string, string)
Builds the URI for Azure BLOB Storage.
public static UriBuilder GetStorageUriBuilder(string accountName, string containerName)
Parameters
accountNamestringAzure BLOB Storage account name
containerNamestringAzure BLOB Storage container name
Returns
- UriBuilder
Returns the UriBuilder
ListContainerAsync(string, string)
Lists the contents of the specified BLOB container.
public static Task<string> ListContainerAsync(string connectionString, string containerName)
Parameters
connectionStringstringAzure BLOB Storage connection string
containerNamestringAzure BLOB Storage container name
Returns
Exceptions
UploadBlobAsync(string, string, string, string)
PUTs the BLOB of the specified ‘file’ name.
public static Task UploadBlobAsync(string connectionString, string containerName, string fileName, string content)
Parameters
connectionStringstringAzure BLOB Storage connection string
containerNamestringAzure BLOB Storage container name
fileNamestringBLOB ‘file’ name
contentstringThe string contents of the ‘file.’