示例#1
0
 public AzureBlobStorageRepository(IAzureBlobStorageInitializer initializer, ILogger logger)
 {
     _logger = logger;
     try
     {
         _cloudBlobContainer = initializer.Initialize();
     }
     catch (Exception ex)
     {
         logger.LogError($"container not initialized due to:{ex.Message}");
         throw new ArgumentNullException("Storage unavailable");
     }
 }
示例#2
0
 private static IAzureBlobStorageRepository GetAzureBlobStorageRepository(IAzureBlobStorageInitializer azureBlobStorageInitializer,
                                                                          ILogger logger)
 {
     return(new AzureBlobStorageRepository(azureBlobStorageInitializer, logger));
 }