public AzureBlobImageStorage(ILogger <AzureBlobImageStorage> logger, AzureBlobConfiguration blobConfiguration)
        {
            _logger = logger;

            _container = new(blobConfiguration.ConnectionString, blobConfiguration.ContainerName);

            logger.LogInformation($"Created {nameof(AzureBlobImageStorage)} for account {_container.AccountName} on container {_container.Name}");
        }
Beispiel #2
0
        public AzureBlobImageStorage(ILogger <AzureBlobImageStorage> logger, AzureBlobConfiguration blobConfiguration)
        {
            try
            {
                _logger = logger;

                _container = new(blobConfiguration.ConnectionString, blobConfiguration.ContainerName);

                logger.LogInformation($"Created {nameof(AzureBlobImageStorage)} for account {_container.AccountName} on container {_container.Name}");
            }
            catch (Exception e)
            {
                logger.LogError(e, $"Failed to create {nameof(AzureBlobImageStorage)}");
                throw;
            }
        }