Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overload to AddAzureBlobStorage to supply your own BlobServiceClient from delegate #1845

Closed
wants to merge 14 commits into from

Conversation

willadsen
Copy link

BlobServiceClient

What this PR does / why we need it:
If the application needs to monitor a BlobServiceClient which is registered ie. using named instances (see https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection)

builder.Services.AddAzureClients(clientBuilder =>
{
    clientBuilder.AddBlobServiceClient(builder.Configuration.GetSection("PublicStorage"));
    clientBuilder.AddBlobServiceClient(builder.Configuration.GetSection("PrivateStorage"))
        .WithName("PrivateStorage");
});

then this PR tries to solve that issue by overloading the AddAzureBlobStorage extension method with a Func<IServiceProvider,BlobServiceClient> function argument to be able to supply your own way of resolving the BlobServiceClient instance.

Which issue(s) this PR fixes:
No issue created, should I make one?

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
Only if the user should wish to use these new methods

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing
  • End-to-end tests passing
  • Extended the documentation
  • Provided sample for the feature

@willadsen
Copy link
Author

willadsen commented Jun 29, 2023 via email

@sungam3r
Copy link
Collaborator

sungam3r commented Jul 3, 2023

@willadsen Thanks. I'm fine to merge after updating API approval file.

@sungam3r sungam3r mentioned this pull request Jul 7, 2023
@cieciurm
Copy link
Contributor

cieciurm commented Jul 9, 2023

Hi @willadsen,

Are you planning to finish up this PR this week?
I see there is very small changes required. Perhaps you could make it? 😄

@willadsen
Copy link
Author

Hi @willadsen,

Are you planning to finish up this PR this week?

I see there is very small changes required. Perhaps you could make it? 😄

Unfortunately no, as I am on vacation. It'll be a couple of weeks until I will be able to complete the PR. Feel free to complete it 😎

@sungam3r
Copy link
Collaborator

Superseded by #1889.

@sungam3r sungam3r closed this Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants