Azure / azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
MIT License
711 stars 263 forks source link

Allow custom connection string names when using DurableClient #2807

Open bachuv opened 2 months ago

bachuv commented 2 months ago

Draft PR to check if CI tests pass.

This PR removes a couple of service registrations, IConnectionInfoResolver and IStorageAccountProvider, from the AddDurableClientFactory method. Before these changes, users were not able to set a custom connection string name when creating a client (example below) since the connection string name would always be set to the default, Storage.

public ClientFunction(IDurableClientFactory clientFactory, IConfiguration configuration)
{
    _client = clientFactory.CreateClient(new DurableClientOptions
    {
        ConnectionName = "CustomConnection",
        TaskHub = configuration["TaskHub"]
    });
}

resolves #issue_for_this_pr

Pull request checklist