Exemplo n.º 1
0
 public static IAzureClientBuilder <BlobServiceClient, BlobClientOptions> AddBlobServiceClient(
     this AzureClientFactoryBuilder builder, string serviceUriOrConnectionString, bool preferMsi)
 {
     if (preferMsi && Uri.TryCreate(serviceUriOrConnectionString, UriKind.Absolute, out var serviceUri))
     {
         return(builder.AddBlobServiceClient(serviceUri));
     }
     return(builder.AddBlobServiceClient(serviceUriOrConnectionString));
 }
Exemplo n.º 2
0
        private static AzureClientFactoryBuilder AddBlobServiceClient(this AzureClientFactoryBuilder builder, IConfiguration configuration)
        {
            var blobStorageSettings = configuration.GetSection("BlobStorage").Get <BlobStorageSettings>();

            builder.AddBlobServiceClient(blobStorageSettings.ConnectionString);

            return(builder);
        }