Show / Hide Table of Contents

Class InMemoryAzureBlobProvider

A simple in-memory mock implementation of functionality to interact with Azure blob storage.

Inheritance
System.Object
InMemoryAzureBlobProvider
Implements
IAzureBlobProvider
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CrashCABN.DataAccess
Assembly: CrashCABN.DataAccess.dll
Syntax
public class InMemoryAzureBlobProvider : IAzureBlobProvider

Methods

View Source

BlobExistsAsync(Uri)

Checks if the blob exists for downloading.

Declaration
public 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
public 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
public async 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
public 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

WriteBlobStream(Uri, Stream)

Declaration
public void WriteBlobStream(Uri blobUri, Stream content)
Parameters
Type Name Description
System.Uri blobUri
System.IO.Stream content
View Source

WriteBlobStreamAsync(Uri, Stream)

Uploads the stream to given the blob URI.

Declaration
public async 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.

View Source

WriteBlobString(Uri, String)

Declaration
public void WriteBlobString(Uri blobUri, string content)
Parameters
Type Name Description
System.Uri blobUri
System.String content

Implements

IAzureBlobProvider
  • View Source
In This Article
Back to top Generated by DocFX