* add GrpcSample, GrpcClient; update DaprClient
* disable TLS for grpc server
* implement deposit and withdraw method for grpcsample
* implement event handler for deposit and withdraw
* edit readme for grpcsample
* improve readme
* fix @amanbha requested changes
* fix or improve readme @vinayada1 reviewed
* use parameter in DaprClient to switch invocation of routing or grpcsample service
* add separate editorconfig file into samples directory
* add license header into grpcsample
* fix TypeConverters to use internal access modifier; remove useless code; fix Console to logger; fix typo; fix using statement location
* throw a exception when account is not found for BankingService Withdraw invocation
* remove TypeConverters dependence
* use config for rpc-exception argument
* fix comment of @vinayada1
* updated documentation for parameters usage
* fix additional comments from @vinayada1
* Update Readme.md
* fix DaprClient's compile error
Co-authored-by: Yongguang Zhu <Yongguang.Zhu@microsoft.com>
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Implement dependency injection for Actors
Fixes: #171
This change allows Actors to accept dependency-injected services through
constructor parameters.
There are numerous breaking changes in this PR that are visible to user
code. In most cases these are simplifications.
For example the Actor base class accepted 3 constructor parameters,
which meant that every subclass (every actor type) also had 3 constructor
parameters. This isn't fun and becomes way less fun now that users can
add their own constructor parameters in a meaningful way.
As another example, we had multiple places where "runtime options" lived
that had different interaction patterns. Now there's a single options
type and you interactive with it through UseActors(...).
* address PR feedback
* React to API change
* Rename and cleanup of HTTPExtension
Fixes: #421
This change renames `HTTPExtension`->`HttpInvocationOptions`. This is more
idiomatic in .NET and reflects existing naming conventions (options or
settings for parameters).
Also changes to use the `System.Net.Http.HttpMethod` type for the http
method, and globally prefer the term `method` over `verb`. Every .NET
API that I'm aware of uses 'method', as does rfc7231.
* One more rename
* 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>
Removes generation of documentation files for samples and tests. This is
a vestige from using the older Stylecop tool in this repo, which needs
the doc files to inspect.
The deleterious effect of this is getting warnings about missing
documentation on samples, and forcing contributors and maintainers to
write nonsense comments to workaround the warning.
Also removed references to stylecop, since we no longer use it.
* Prepping for multi pubsub
* Add pubsub name, some cleanup
* multi pubsub changes
Co-authored-by: Aman Bhardwaj <amanbha@microsoft.com>
Co-authored-by: LM <lemai>
* 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>
* Added invoke example for RoutingSample.
* Added .NET samples for Service Invokation vis POST, GET and Events.
* Removed unused code.
* comments changed
* Removed obsolete method InvokeMethodOnHttpServiceAsync
* Code samples simplified
* Added curl for Linux and MacOS
Co-authored-by: Damir Dobric <ddobric@daenet.com>
* 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>
* Updated samples/Actor to show Timer and Reminder functionality
* Updated ActorClient. Changed deregistration of TImer and Reminder at the end of the program
Co-authored-by: Leon Mai <lemai@microsoft.com>
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
* Including state Store name in the APIs to support multi state store scenario in SDK
* correcting the typo in the comment.
* Respective Changes to the tests
* Changes in StateAttribute and Binder classes to support state store name
* Changes in StateEntryModelBinderTests
* StoreName changes in the Integration test app
* fixing build issues
* Fixing integration tests
* Addressing review comments.
* Addressing review comments
* Updating samples to use correct state store name as generated by dapr cli.
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
* Placing new proto file from dapr repo, generated from multistate store change
* Resolving code review comments - fixing the sample code.
Tested the sample with the changes.