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

Added overload for DaprClient DI registration #1289

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

WhitWaldo
Copy link
Contributor

Description

Today, an extension method enables easy DI registration of the DaprClient on an IServiceCollection, but it doesn't allow for an IServiceProvider to be passed in so values can be pulled from injected dependencies. Having this option has some benefits - for example, say I'm passing in configuration values via a JSON file or environment variables. I could trivially register the values for either in the service's IConfiguration (e.g. services.Configuration.AddEnvironmentVariables(); and recall via configuration.GetValue<string>("DAPR_HTTP_ENDPOINT"), but only if I can get an instance of the IConfiguration to get the values out of. That's not available in the DI registration extension today, so this PR contributes an overload that provides it.

Where today, we might use the following:

var builder = WebApplication.CreateBuilder(args);
var httpEndpoint = Environment.GetEnvironmentVariable("DAPR_HTTP_ENDPOINT");
builder.Services.AddDaprClient(opt => {
  opt.UseHttpEndpoint(httpEndpoint);
});

This additional overload would also enable the following:

var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddEnvironmentVariables("DAPR_");
builder.Services.AddDaprClient((serviceProvider, daprClient) => {
  var configuration = serviceProvider.GetRequiredService<IConfiguration>();
  var httpEndpoint = configuration.GetValue<string>("HTTP_ENDPOINT");
  daprClient.UseHttpEndpoint(httpEndpoint);
});

I use it here to inject a value out of environment variables, but it could just as easily be a secret out of an Azure Key Vault instance or a value passed from Azure App Configuration or anything else that's registered in the application.

I don't know that there's anywhere in the documentation this is specifically called out, but I'll give the docs another pass.

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: #1288

Checklist

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

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…o easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo requested review from a team as code owners May 15, 2024 06:28
@philliphoff
Copy link
Collaborator

philliphoff commented Jun 5, 2024

@WhitWaldo How would this interact with the AddDaprConfigurationStore() and AddDaprSecretStore() methods which, themselves, take a DaprClient argument? Would that end up in a circular-reference-like situation?

@WhitWaldo
Copy link
Contributor Author

@philliphoff I can't say I've ever really tried to inject something to use when configuring an IConfigurationBuilder before, so I've tried to research if this is something other configuration providers do. As you can bind to secrets in the Key Vault, I took at look at their extension methods and they don't have an overload for IServiceCollection either.

In theory, I think you'd be able to do something like:

public static IConfigurationBuilder AddDaprConfigurationStore(this IConfigurationBuilder builder, IServiceCollection serviceCollection)
{
  var daprClient = serviceCollection.BuildServiceProvider().GetRequiredService<DaprClient>();
  // Remainder..
}

And that would eliminate any circular dependencies as the DI provider would be scoped just to that method, but I don't know that I've ever seen anyone actually do something like that. I guess I've always seen configuration happen first, then an IConfiguration passed into other DI registrations as necessary, not vice versa.

Regardless, this PR wouldn't create any such circular dependency in the case of AddDaprConfigurationStore or AddDaprSecretStore as the DaprClient isn't being injected here and an instance would have to be built with the static method for either of those use cases.

It's potentially worth doing more research to see if there's anything out there by which configuration is performed using a DI-registered service, but again, I'm not aware of anything off the top of my head.

@WhitWaldo
Copy link
Contributor Author

I looked at the implementation for both the Azure Key Vault configuration provider extension methods and those for the Azure App Configuration provider and neither one incorporates a mechanism to utilize an injected service during configuration registration, so I think we'd be safe leaving the Dapr configuration extensions untouched (again, no circular dependencies as nothing gets injected to them).

@philliphoff philliphoff added this to the v1.14 milestone Jun 25, 2024
@philliphoff philliphoff merged commit 2e94bb1 into dapr:master Jun 25, 2024
12 checks passed
m3nax pushed a commit to m3nax/dapr-dotnet-sdk that referenced this pull request Jun 25, 2024
* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
@WhitWaldo WhitWaldo deleted the client-di-registration branch June 25, 2024 22:12
m3nax pushed a commit to m3nax/dapr-dotnet-sdk that referenced this pull request Jun 26, 2024
* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
philliphoff added a commit that referenced this pull request Jun 26, 2024
* up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated base image

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload for DaprClient DI registration (#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge `release-1.13` back into `master` (#1285)

* Update protos and related use for Dapr 1.13. (#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Init properties.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update artifact action versions. (#1240)

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Make recursive true as default (#1243)

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>

* Fix for secret key transformation in multi-value scenarios (#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
@marcduiker
Copy link
Contributor

@holopin-bot @WhitWaldo Thanks Whit!

Copy link

holopin-bot bot commented Aug 15, 2024

Congratulations @WhitWaldo, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/clzva0z1y01600cihk1fhjab7

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

m3nax added a commit to m3nax/dapr-dotnet-sdk that referenced this pull request Sep 3, 2024
* up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated base image

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload for DaprClient DI registration (dapr#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge `release-1.13` back into `master` (dapr#1285)

* Update protos and related use for Dapr 1.13. (dapr#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Init properties.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update artifact action versions. (dapr#1240)

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Make recursive true as default (dapr#1243)

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>

* Fix for secret key transformation in multi-value scenarios (dapr#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
m3nax added a commit to m3nax/dapr-dotnet-sdk that referenced this pull request Sep 4, 2024
* up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated base image

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload for DaprClient DI registration (dapr#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge `release-1.13` back into `master` (dapr#1285)

* Update protos and related use for Dapr 1.13. (dapr#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Init properties.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update artifact action versions. (dapr#1240)

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Make recursive true as default (dapr#1243)

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>

* Fix for secret key transformation in multi-value scenarios (dapr#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
WhitWaldo added a commit that referenced this pull request Oct 28, 2024
* Samples - Add k8s deployment yaml to DemoActor sample (#1308)

* up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated base image

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload for DaprClient DI registration (#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge `release-1.13` back into `master` (#1285)

* Update protos and related use for Dapr 1.13. (#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Init properties.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update artifact action versions. (#1240)

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Make recursive true as default (#1243)

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>

* Fix for secret key transformation in multi-value scenarios (#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Aligned nuget version

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Debug profile added

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Emitted DAPR001 Diagnostic warning

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added DAPR002 diagnostic

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Cleaun

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added base interface to ActorClient

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added ctor

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added nullable directive

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added null check for actorproxy ctor parameter

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved DiagnoticException in a dedicate cs file

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved generator costants to dedicated class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added ActorReference creation from the ActorBase class informations (#1277)

* Handled creation of ActorReference from Actor base class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated null check

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added unit test for GetActorReference from null actore and actor proxy

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test for ActorReference created inside Actor implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated description

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed test method naming

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added unit test for exception generated in case the type is not convertible to an ActorReference

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload to support SDK supplying query string on invoked URL (#1310)

* Refactored extensions and their tests into separate directories

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added overload to method invocation to allow query string parameters to be passed in via the SDK instead of being uncermoniously added to the end of the produced HttpRequestMessage URI

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added unit tests to support implementation

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Marking HttpExtensions as internal to prevent external usage and updating to work against Uri instead of HttpRequestMessage.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Updated unit tests to match new extension purpose

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Resolved an ambiguous method invocation wherein it was taking the query string and passing it as the payload for a request. Removed the offending method and reworked the remaining configurations so there's no API impact.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed actorProxy argument null check

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved ActorClientDesciptor into separta cs file

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved textual templates to dedicated class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated comments, property names

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added argument null check to SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added comments

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed obsolete testing packages https://github.com/dotnet/roslyn-sdk/blob/main/src/Microsoft.CodeAnalysis.Testing/README.md#obsolete-packages

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Adapted existing unit test to new source generated code

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added tests for SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated generation of ArgumentNullException

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated nullability

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed internal methods tests

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test to IEnumerableExtensions

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Unittested GetSyntaxKinds from Accessibility

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated assignment implementation of ctor body

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved unit test

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added implementation of method generation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed ArgumentNullException invocation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test for NameOfExpression

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed ActorProxy method invocation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Simplified proxy argument definition

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Explicit generic arguments of the proxy call during generation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Handled cancellation token with default value

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Configured eol used in NormalizeWhitespace function

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Normalized expected source

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved to constat the ActorProxyTypeName

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fix typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Created ActorProxyInvokeMethodAsync SyntaxFactoryHelper

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed custom concat implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* fix (#1329)

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* link to non-dapr endpoint howto (#1335)

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge 1.14 release branch back into `master`. (#1337)

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed merge errors
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated some summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added some missing summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved some summary text

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Handled review requests

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Changed SyntaxFactoryHelpers accessor to internal

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow access to injected services during DI registration of DaprClient
3 participants