Show / Hide Table of Contents

Interface IAzureBlobProvider

Encapsulates functionality to interact with Azure blob storage.

Namespace: CrashCABN.DataAccess
Assembly: CrashCABN.DataAccess.Abstractions.dll
Syntax
public interface IAzureBlobProvider

Methods

View Source

BlobExistsAsync(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.

View Source

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.

View Source

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.

View Source

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.

View Source

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.

Extension Methods

IAzureBlobProviderExtensions.GetBlobStringAsync(IAzureBlobProvider, Uri)
IAzureBlobProviderExtensions.GetBlobStringAndHashAsync(IAzureBlobProvider, Uri)
IAzureBlobProviderExtensions.WriteBlobStringAsync(IAzureBlobProvider, Uri, String)
  • View Source
In This Article
Back to top Generated by DocFX