-
Notifications
You must be signed in to change notification settings - Fork 335
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
Fix Adds DaprClient in Dapr.AspNetCore from AddSingleton to TryAddSingleton #867
Conversation
…gleton Signed-off-by: zhenlei520 <wangzhenlei520@gmail.com>
@zhenlei520 - Thanks for opening this! Though I think this is already solved in the code: https://github.com/dapr/dotnet-sdk/pull/867/files#diff-6b7b1ed59d457676840fddee293b56b4f8354d2b5bbad4df9c8d8fb11103ff15R41 |
I am very happy to receive your reply, but I think there is a problem here. If you directly use the methods in the |
dotnet-sdk/src/Dapr.AspNetCore/DaprServiceCollectionExtensions.cs Lines 47 to 56 in 452ccad
I think this should be replaced by TryAddSingleton, or the AddDaprClient method should be provided by |
@zhenlei520 - Is the use case you're talking about adding Also, I don't think |
We left this out of |
Right now I have a package just for sending messages. In fact, I only need to handle the injection of |
Any news on this? |
Codecov Report
@@ Coverage Diff @@
## master #867 +/- ##
=======================================
Coverage 69.13% 69.13%
=======================================
Files 142 142
Lines 4649 4649
Branches 517 517
=======================================
Hits 3214 3214
Misses 1318 1318
Partials 117 117
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…gleton
Signed-off-by: zhenlei520 wangzhenlei520@gmail.com
Description
I hope that AddDaprClient can be changed to TryAddSingleton. Although the AddDaprClient method only adds DaprClient to the current class library once, if other class libraries also add DaprClient and then use Dapr.AspNetCore, DaprClient will be added again.