* Unify DaprException classes
We have two classes called DaprException.
It makes way more sense for us to have DaprException in the Dapr.Client
project, and it also makes sense for Dapr.Actors to reference
Dapr.Client (it did not for some reason).
There's some additional cleanup of code related to
JsonSerializerOptions. The Actors code was not referencing the 5.0.0
version of the package, and so it's now got access to some new stuff,
so we could remove a polyfill.
* Throw DaprException for errors
Fixes: #516
This updates all of the locations in DaprClient that handle networking
or serialization to throw DaprException instead of the underlying
exception type. This allows for simpler error handling.
* Add one more unit test
We've had a list of linting-related messages piling up for a while now.
This change bulk-applies these suggestions with usually relate to
simplification or use or newer language features like ??=
The only changes I did manually here are:
Removing some usage of Task.GetAwaiter().GetResult() where it was
just laziness
Removing some dead code in methods and parameters of internal APIs.
* Handle cancelled cancellation token
* add UTs
* add secrets UT
* fix review comments
* invoke and await in one call
* fix await
* Add test for multiple calls to UseActors (#459)
Fixes: #411
The bug was actually addressed in PR #453 - this change adds a test that
verifies that we actually fixed it.
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
* use grpcChannelOptions ThrowOperationCanceledOnCancellation
* Add doc
* add link to doc
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Move to new invoke proto, specify contenttype in response to the dapr/config message, clarify sample
* Update for additional proto changes
* cr
Co-authored-by: LM <lemai>
* adding IDAprClient interface
* Adding DaprClientBuilder and adding methods for Publish
* updating the method name for publish
* Adding unit tests for publishevent api
* Removing individual clients for publish
* Renaming base class to DaprClient and implementation calss to DparClientGrpc
* Moving State api to grpc and adding helpers to unittest grpc calls.
* More DaprClient logic
* metadata, etag, options, etc are optional
* Revert "metadata, etag, options, etc are optional"
This reverts commit ea5dc12c5d.
* Default params, 2 new Try- methods, overload refactor for InvokeMethodAsync
* Move some classes/enums to different files. Documentation
* Code refactor and changing tests to use grpc
* Adding tests with state options
* Adding test for getting etag and state
* More refactoring and adding INvokeBinding test
* Fixing tests and tidying up things.
* Updating solutions for renamed project
* Updating projects for rename.
* Oneclient secret (#245)
* ADding Secret Apis
* Using Task for secret
* Format (#242)
* Updating samples.slm
* awaint the call to grpc in common method so that common error handling can be done there.
* Addressing review comments
* fixing test.sln
* updating prod.sln
* Addressing review comments from James.
* Add doc and example for method invocation on http app
* Updating arg validation.
* Updating example.
Co-authored-by: LM <lemai>
Co-authored-by: Carlos Mendible <cmendible@gmail.com>