Class LocalBlobStorage
Implements access methods to local blob storage
Inherited Members
Namespace: TimeCockpit.Data.Database
Assembly: TimeCockpit.Data.dll
Syntax
public sealed class LocalBlobStorage : BlobStorage
Constructors
LocalBlobStorage(String, Guid)
Initializes a new instance of the LocalBlobStorage class
Declaration
public LocalBlobStorage(string blobStoragePath, Guid clientReplicaId)
Parameters
Type | Name | Description |
---|---|---|
System.String | blobStoragePath | Base path under which blobs should be stored |
System.Guid | clientReplicaId | Replica id of the client to which this blob storage belongs |
Properties
BlobStoragePath
Gets the base path under which blobs are stored
Declaration
public string BlobStoragePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CreateBlob(String, String, String, Byte[])
Creates or replaces a blob in the blob storage
Declaration
protected override void CreateBlob(string containerName, string blobName, string categoryName, byte[] blobContent)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
System.String | blobName | Name of the blob |
System.String | categoryName | Name of the category to which the blob belongs |
System.Byte[] | blobContent | Content of the blob |
Overrides
CreateBlobAsync(String, String, String, Byte[])
Creates or replaces a blob in the blob storage
Declaration
protected override Task CreateBlobAsync(string containerName, string blobName, string categoryName, byte[] blobContent)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
System.String | blobName | Name of the blob |
System.String | categoryName | Name of the category to which the blob belongs |
System.Byte[] | blobContent | Content of the blob |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task representing the operation. |
Overrides
CreateContainer(String)
Creates a container in the blob storage
Declaration
protected override void CreateContainer(string containerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
Overrides
DeleteBlob(String, String, String)
Delets a blob in the blob storage
Declaration
protected override void DeleteBlob(string containerName, string blobName, string categoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
System.String | blobName | Name of the blob |
System.String | categoryName | Name of the category to which the blob belongs |
Overrides
GetBlobContent(String, String, String)
Gets the content of a blob in the blob storage
Declaration
protected override byte[] GetBlobContent(string containerName, string blobName, string categoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
System.String | blobName | Name of the blob |
System.String | categoryName | Name of the category to which the blob belongs |
Returns
Type | Description |
---|---|
System.Byte[] | Content of the blob |
Overrides
GetBlobContentAsync(String, String, String)
Gets the content of a blob in the blob storage asynchronously.
Declaration
protected override Task<byte[]> GetBlobContentAsync(string containerName, string blobName, string categoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | Name of the container |
System.String | blobName | Name of the blob |
System.String | categoryName | Name of the category to which the blob belongs |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Byte[]> | Returns the content of the blob. |
Overrides
OpenCurrentContainer()
Opens the tenant's container which already exist.
Declaration
public override void OpenCurrentContainer()
Overrides
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.
Declaration
public override void OpenOrCreateCurrentContainer()