Interface IAzureBlobProvider
Encapsulates functionality to interact with Azure blob storage.
Namespace: CrashCABN.DataAccess
Assembly: CrashCABN.DataAccess.Abstractions.dll
Syntax
public interface IAzureBlobProvider
Methods
View SourceBlobExistsAsync(Uri)
Checks if the blob exists for downloading.
Declaration
Task<bool> BlobExistsAsync(Uri blobUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | blobUri | The absolute blob URI. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if it exists. |
GetBlobStreamAndHashAsync(Uri)
Retrieves the blob stream for downloading and a content hash.
Declaration
Task<(Stream Stream, byte[] Hash)> GetBlobStreamAndHashAsync(Uri blobUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | blobUri | The absolute blob URI. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.IO.Stream, System.Byte[]>> | The stream for downloading and a content hash. |
GetBlobStreamAsync(Uri)
Retrieves the blob stream for downloading.
Declaration
Task<Stream> GetBlobStreamAsync(Uri blobUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | blobUri | The absolute blob URI. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | The stream for downloading. |
ListBlobsInPathAsync(Uri)
Lists the blobs in the given container path.
Declaration
IAsyncEnumerable<string> ListBlobsInPathAsync(Uri blobUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | blobUri | The full URL to the Azure storage container and folder to search in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IAsyncEnumerable<System.String> | An enumeration containing the full path of each blob. |
WriteBlobStreamAsync(Uri, Stream)
Uploads the stream to given the blob URI.
Declaration
Task WriteBlobStreamAsync(Uri blobUri, Stream content)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | blobUri | The absolute blob URI. |
System.IO.Stream | content | The stream for uploading. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |