예제 #1
0
        public static FileSystemBuilder AddAzureBlobStorage(this FileSystemBuilder builder, string scheme, string containerName, string connectionString, bool detectContentType)
        {
            if (containerName == null)
            {
                throw new ArgumentNullException(nameof(containerName));
            }

            if (connectionString == null)
            {
                throw new ArgumentNullException(nameof(connectionString));
            }

            return(builder.AddAzureBlobStorage(scheme, opt =>
            {
                opt.ContainerName = containerName;
                opt.BobClientFactory = new AzureCloudBlobFactory(connectionString);
                opt.DetectContentType = detectContentType;
            }));
        }
예제 #2
0
 public static FileSystemBuilder AddAzureBlobStorage(this FileSystemBuilder builder, string containerName, string connectionString)
 => builder.AddAzureBlobStorage(AzureBlobStorageFileSystemDefaults.DefaultScheme, containerName, connectionString, detectContentType: true);
예제 #3
0
 public static FileSystemBuilder AddAzureBlobStorage(this FileSystemBuilder builder, Action <AzureBlobStorageFileSystemOptions> configureOptions)
 => builder.AddAzureBlobStorage(AzureBlobStorageFileSystemDefaults.DefaultScheme, configureOptions);