Class LocalBlobStorage
- Namespace
- TimeCockpit.Data.Database
- Assembly
- TimeCockpit.Data.dll
Implements access methods to local blob storage
public sealed class LocalBlobStorage : BlobStorage
- Inheritance
-
ObjectLocalBlobStorage
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
LocalBlobStorage(String, Guid)
Initializes a new instance of the LocalBlobStorage class
public LocalBlobStorage(string blobStoragePath, Guid clientReplicaId)
Parameters
blobStoragePathStringBase path under which blobs should be stored
clientReplicaIdGuidReplica id of the client to which this blob storage belongs
Properties
BlobStoragePath
Gets the base path under which blobs are stored
public string BlobStoragePath { get; }
Property Value
- String
Methods
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
containerNameStringName of the container
blobNameStringName of the blob
categoryNameStringName of the category to which the blob belongs
blobContentByte[]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
containerNameStringName of the container
blobNameStringName of the blob
categoryNameStringName of the category to which the blob belongs
blobContentByte[]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
containerNameStringName 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
containerNameStringName of the container
blobNameStringName of the blob
categoryNameStringName 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
containerNameStringName of the container
blobNameStringName of the blob
categoryNameStringName of the category to which the blob belongs
Returns
- Byte[]
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
containerNameStringName of the container
blobNameStringName of the blob
categoryNameStringName 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()