Exemplo n.º 1
0
        public AzureBlobService(IBlobStorageSettings settings, string containerName)
        {
            Debug.WriteLine(
                $"Azure Blob Storage Service getting database: {containerName}"
                + $"from connection: {settings.ConnectionString}"
                );
            _cdnRootUrl = Url.Combine(settings.CdnRoot, containerName);

            var service = new BlobServiceClient(settings.ConnectionString);

            _container = service.GetBlobContainerClient(containerName);
            _blobs     = _container.GetBlobClient("sample-blob");

            Debug.WriteLine($"Getting database was successful.");
        }
Exemplo n.º 2
0
		public void Configure(IBlobStorageSettings settings)
		{
			_containerName = settings.ContainerName.Value;
		}
Exemplo n.º 3
0
		public void Configure(IBlobStorageSettings settings)
		{
			_settings = settings;
		}
Exemplo n.º 4
0
		public AzureBlobStorage(CloudStorageAccount storageAccount)
		{
			_storageAccount = storageAccount;

			_settings = new BlobStorageSettings();
		}
Exemplo n.º 5
0
        public BlobStorageHelper(IBlobStorageSettings settings)
        {
            Throw.IfNull(settings, nameof(settings));

            _blobStorageSettings = settings;
        }
Exemplo n.º 6
0
 public FileStorageService(AppSettings appSettings, IBlobStorageSettings blobStorageSettings)
 {
     this.settings     = appSettings;
     this.blobSettings = blobStorageSettings;
 }
Exemplo n.º 7
0
        public BlobStorageHelper(IOptions <BlobStorageSettings> settings)
        {
            Throw.IfNull(settings, nameof(settings));

            _blobStorageSettings = settings.Value;
        }