* 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>
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>
Fixes: #444
ActorId doesn't define a default constructor, and so it's not
deserializable via System.Text.Json.
This change implements a converter so that ActorId's API shape can work
with the serializer properly.
I added an integration test for ActorReference as well, but no library
changes we needed for that, ActorId was the blocker.
Fixes: #446
`async void` is almost always a bug in server-side programming. If these
tests were doing any networking then they would encounter concurrency
bugs or crash in the event of an exception.
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Makes sure we exclude the generated `coverage.json` files from git. We
don't want these to get accidentally committed if someone is running
coverage on their own machine.
Contributes to: #416
This change removes a mutable static instance - this is low-hanging
fruit design improvement and helps us make these features more flexible
in the future.
- remove references to specific VS versions (these will quickly become
stale and can be confusing because VS wants you to live on the latest
version).
- include mac/linux instructions
This is a hint to tools (and the CLI) about what version of the SDK is
required to work with the repo. This is set up to be as flexible as
possible. 3.1.100 is what's in our instructions already and is the
minimum version usable (since we target .NET Core 3.1).
This spooky XML boilerplate was needed on early versions of .NET Core,
but isn't required in modern versions (we require 3.1.1XX of the SDK
because we target .NET Core 3.1).
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.
This is a workaround for https://github.com/dotnet/sdk/issues/14019
which prevents the current prerelease dotnet SDK
`5.0.100-rc.1.20452.10` from successfully building the repo.
Users attempting to build with the bugged release will see a compiler
error related to the `System.IO.Pipelines` assembly.
The explicit reference to `System.IO.Pipelines` is harmless long term,
but can be removed when the underlying bug is fixed and shipped in a GA
release (likely 5.0.100 GA).
* 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>
* Add bulk get to client
* change params, return type, class to struct
* change IList to IReadOnlyList, make parallelism nullable
* change GetBulkItem to BulkStateItem