Table of Contents

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 BlobStorageServiceSettings

The 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

ILogger<StorageServiceBase>

_settings

The BlobStorageServiceSettings used to configure the storage service.

protected readonly BlobStorageServiceSettings _settings

Field Value

BlobStorageServiceSettings

Properties

InstanceName

The optional instance name of the storage service.

public string? InstanceName { get; set; }

Property Value

string

StorageAccountName

The name of the storage account.

public string? StorageAccountName { get; }

Property Value

string

StorageContainerName

public string? StorageContainerName { get; }

Property Value

string

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

accountName string

The storage account name.

accountKey string

The storage account key.

CreateClientFromConnectionString(string)

Creates a storage client from a connection string.

protected abstract void CreateClientFromConnectionString(string connectionString)

Parameters

connectionString string

The 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 string

The storage account name.