using Newtonsoft.Json; namespace Nop.Core.Configuration; /// /// Represents Azure Blob storage configuration parameters /// public partial class AzureBlobConfig : IConfig { /// /// Gets or sets connection string for Azure Blob storage /// public string ConnectionString { get; protected set; } = string.Empty; /// /// Gets or sets container name for Azure Blob storage /// public string ContainerName { get; protected set; } = string.Empty; /// /// Gets or sets end point for Azure Blob storage /// public string EndPoint { get; protected set; } = string.Empty; /// /// Gets or sets whether or the Container Name is appended to the AzureBlobStorageEndPoint when constructing the url /// public bool AppendContainerName { get; protected set; } = true; /// /// Gets or sets whether to store Data Protection Keys in Azure Blob Storage /// public bool StoreDataProtectionKeys { get; protected set; } = false; /// /// Gets or sets the Azure container name for storing Data Prtection Keys (this container should be separate from the container used for media and should be Private) /// public string DataProtectionKeysContainerName { get; protected set; } = string.Empty; /// /// Gets or sets the Azure key vault ID used to encrypt the Data Protection Keys. (this is optional) /// public string DataProtectionKeysVaultId { get; protected set; } = string.Empty; /// /// Gets a value indicating whether we should use Azure Blob storage /// [JsonIgnore] public bool Enabled => !string.IsNullOrEmpty(ConnectionString); /// /// Whether to use an Azure Key Vault to encrypt the Data Protection Keys /// [JsonIgnore] public bool DataProtectionKeysEncryptWithVault => !string.IsNullOrEmpty(DataProtectionKeysVaultId); }