File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Aspire.Hosting.Azure.Storage Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 88using Azure . Identity ;
99using Azure . Provisioning ;
1010using Azure . Provisioning . Storage ;
11- using Azure . ResourceManager . Storage . Models ;
1211using Azure . Storage . Blobs ;
12+ using Microsoft . Extensions . DependencyInjection ;
1313//using Microsoft.Extensions.DependencyInjection;
1414
1515namespace Aspire . Hosting ;
@@ -214,14 +214,14 @@ public static IResourceBuilder<AzureBlobStorageResource> AddBlobs(this IResource
214214 blobServiceClient = CreateBlobServiceClient ( connectionString ) ;
215215 } ) ;
216216
217- // var healthCheckKey = $"{name}_blob_check";
218- // builder.ApplicationBuilder.Services.AddHealthChecks().AddAzureBlobStorage(sp =>
219- // {
220- // return blobServiceClient ?? throw new InvalidOperationException("BlobServiceClient is not initialized.");
221- // }, name: healthCheckKey);
217+ var healthCheckKey = $ "{ name } _blob_check";
218+ builder . ApplicationBuilder . Services . AddHealthChecks ( ) . AddAzureBlobStorage ( sp =>
219+ {
220+ return blobServiceClient ?? throw new InvalidOperationException ( "BlobServiceClient is not initialized." ) ;
221+ } , name : healthCheckKey ) ;
222222
223- return builder . ApplicationBuilder . AddResource ( resource ) ;
224- // .WithHealthCheck(healthCheckKey);
223+ return builder . ApplicationBuilder . AddResource ( resource )
224+ . WithHealthCheck ( healthCheckKey ) ;
225225
226226 static BlobServiceClient CreateBlobServiceClient ( string connectionString )
227227 {
You can’t perform that action at this time.
0 commit comments