dapr / dotnet-sdk

Dapr SDK for .NET
Apache License 2.0
1.12k stars 340 forks source link

Customize DaprClient from workflow registration #1411

Open WhitWaldo opened 4 days ago

WhitWaldo commented 4 days ago

Description

While building out a proof of concept, I realized that there's no way to programmatically change anything about the DaprClient during first-time registration of a DaprWorkflowClient. Sure, if an envvar is set or the value is available from IConfiguration, the DaprClient will fallback to that, but if the developer wants to specify the values in their registration logic, the DaprClient defaults were used during registration.

This PR adds an optional argument to allow the user to pass a configuration delegate not unlike what they'd add to register the DaprClient from Dapr.Client.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: N/A

Checklist

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