Class StorageServiceBase
- Namespace
- FoundationaLLM.Common.Services.Storage
- Assembly
- FoundationaLLM.Common.dll
Provides access to storage.
public abstract class StorageServiceBase
- Inheritance
-
StorageServiceBase
- Derived
- Inherited Members
- Extension Methods
Constructors
StorageServiceBase(BlobStorageServiceSettings, ILogger<StorageServiceBase>)
Initializes a new instance of the StorageServiceBase with the specified settings and logger.
public StorageServiceBase(BlobStorageServiceSettings settings, ILogger<StorageServiceBase> logger)
Parameters
settings
BlobStorageServiceSettingsThe BlobStorageServiceSettings object with the settings.
logger
ILogger<StorageServiceBase>The logger used for logging.
StorageServiceBase(IOptions<BlobStorageServiceSettings>, ILogger<StorageServiceBase>)
Initializes a new instance of the StorageServiceBase with the specified options and logger.
public StorageServiceBase(IOptions<BlobStorageServiceSettings> storageOptions, ILogger<StorageServiceBase> logger)
Parameters
storageOptions
IOptions<BlobStorageServiceSettings>The options object containing the BlobStorageServiceSettings object with the settings.
logger
ILogger<StorageServiceBase>The logger used for logging.
Fields
_logger
The logger used for logging.
protected readonly ILogger<StorageServiceBase> _logger
Field Value
_settings
The BlobStorageServiceSettings used to configure the storage service.
protected readonly BlobStorageServiceSettings _settings
Field Value
Properties
InstanceName
The optional instance name of the storage service.
public string? InstanceName { get; set; }
Property Value
StorageAccountName
The name of the storage account.
public string? StorageAccountName { get; }
Property Value
StorageContainerName
public string? StorageContainerName { get; }
Property Value
Methods
CreateClientFromAccountKey(string, string)
Creates a storage client from an account name and an account key.
protected abstract void CreateClientFromAccountKey(string accountName, string accountKey)
Parameters
CreateClientFromConnectionString(string)
Creates a storage client from a connection string.
protected abstract void CreateClientFromConnectionString(string connectionString)
Parameters
connectionString
stringThe storage connection string.
CreateClientFromIdentity(string)
Create a storage client from an account name using the default identity for authentication.
protected abstract void CreateClientFromIdentity(string accountName)
Parameters
accountName
stringThe storage account name.