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)
DELETE
s the BLOB of the specified ‘file’ name.
public static Task DeleteBlobAsync(string connectionString, string containerName, string fileName)
Parameters
connectionString
stringAzure BLOB Storage connection string
containerName
stringAzure BLOB Storage container name
fileName
stringBLOB ‘file’ name
Returns
Exceptions
DownloadBlobToStringAsync(string, string, string)
GET
s the BLOB of the specified ‘file’ name.
public static Task<string> DownloadBlobToStringAsync(string connectionString, string containerName, string fileName)
Parameters
connectionString
stringAzure BLOB Storage connection string
containerName
stringAzure BLOB Storage container name
fileName
stringBLOB ‘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
connectionString
stringAzure 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
accountName
stringAzure BLOB Storage account name
containerName
stringAzure 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
connectionString
stringAzure BLOB Storage connection string
containerName
stringAzure BLOB Storage container name
Returns
Exceptions
UploadBlobAsync(string, string, string, string)
PUT
s the BLOB of the specified ‘file’ name.
public static Task UploadBlobAsync(string connectionString, string containerName, string fileName, string content)
Parameters
connectionString
stringAzure BLOB Storage connection string
containerName
stringAzure BLOB Storage container name
fileName
stringBLOB ‘file’ name
content
stringThe string contents of the ‘file.’