Table of Contents

Class CloudBlobStorage

Namespace
TimeCockpit.Data.Database
Assembly
TimeCockpit.Data.dll

Implements access methods to local blob storage

public sealed class CloudBlobStorage : BlobStorage
Inheritance
Object
CloudBlobStorage
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Methods

Create(String, String, BlobStorageAccessType, Guid)

Creates a new instance of the CloudBlobStorage class.

public static CloudBlobStorage Create(string azureBlobStorageAccountName, string azureAccessKey, BlobStorageAccessType accessType, Guid clientReplicaId)

Parameters

azureBlobStorageAccountName String

Account name used to connect to azure blob storage service

azureAccessKey String

Either the account key used to connect to azure blob storage service or the shared access signature

accessType BlobStorageAccessType

The type of authentication used to access the blob storage service

clientReplicaId Guid

Replica id of the client to which this blob storage belongs

Returns

CloudBlobStorage

An instance of the CloudBlobStorage class.

CreateBlob(String, String, String, Byte[])

Creates or replaces a blob in the blob storage

protected override void CreateBlob(string containerName, string blobName, string categoryName, byte[] blobContent)

Parameters

containerName String

Name of the container

blobName String

Name of the blob

categoryName String

Name of the category to which the blob belongs

blobContent Byte[]

Content of the blob

CreateBlobAsync(String, String, String, Byte[])

Creates or replaces a blob in the blob storage

protected override Task CreateBlobAsync(string containerName, string blobName, string categoryName, byte[] blobContent)

Parameters

containerName String

Name of the container

blobName String

Name of the blob

categoryName String

Name of the category to which the blob belongs

blobContent Byte[]

Content of the blob

Returns

Task

The task representing the operation.

CreateContainer(String)

Creates a container in the blob storage

protected override void CreateContainer(string containerName)

Parameters

containerName String

Name of the container

DeleteBlob(String, String, String)

Delets a blob in the blob storage

protected override void DeleteBlob(string containerName, string blobName, string categoryName)

Parameters

containerName String

Name of the container

blobName String

Name of the blob

categoryName String

Name of the category to which the blob belongs

GetBlobContent(String, String, String)

Gets the content of a blob in the blob storage

protected override byte[] GetBlobContent(string containerName, string blobName, string categoryName)

Parameters

containerName String

Name of the container

blobName String

Name of the blob

categoryName String

Name of the category to which the blob belongs

Returns

Byte[]

Returns the content of the blob.

GetBlobContentAsync(String, String, String)

Gets the content of a blob in the blob storage asynchronously.

protected override Task<byte[]> GetBlobContentAsync(string containerName, string blobName, string categoryName)

Parameters

containerName String

Name of the container

blobName String

Name of the blob

categoryName String

Name of the category to which the blob belongs

Returns

Task<Byte[]>

Returns the content of the blob.

OpenCurrentContainer()

Opens the tenant's container which already exist.

public override void OpenCurrentContainer()

Remarks

This methods is used for the share access key authenticatio method, where the tenant needs to be created via a key and name pair. A data context which provides name and the shared access signature is nt allowed to create a tenant

OpenOrCreateCurrentContainer()

Creates the tenant's container if it does not already exist.

public override void OpenOrCreateCurrentContainer()