Commit Graph

55 Commits

Author SHA1 Message Date
Phillip Hoff c07eb698ac
Source generated actor clients (#1165)
Signed-off-by: Phillip Hoff <phillip@orst.edu>
2024-02-16 11:35:29 -08:00
Whit Waldo ca2fab2567
Implementing Cryptography building block in .NET (#1217)
* Added method to DaprClient and GRPC implementation to call cryptography proto endpoints

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

* First pass at implementing all exposed Cryptography methods on Go interface

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

* Added examples for Cryptography block

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

* Added missing copyright statements

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

* Updated to properly support Crypto API this time

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

* Added copyright statements

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

* Removed deprecated examples as the subtle APIs are presently disabled

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

* Updated example to reflect new API shape

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

* Updated example and readme

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

* Added overloads for encrypting/decrypting streams instead of just fixed byte arrays. Added example demonstrating the same encrypting a file via a FileStream and decrypting from a MemoryStream.

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

* Added some unit tests to pair with the implementation

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

* Added null check for the stream argument

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

* Changed case of the arguments as they should read "plaintext" and not "plainText"

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

* Reduced number of encryption implementations by just wrapping byte array into memory stream

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

* Constrainted returned member types per review suggestion

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

* Updated methods to use ReadOnlyMemory<byte> instead of byte[] - updated implementations to use low-allocation spans where possible (though ToArray is necessary to wrap with MemoryStream).

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

* Updated to use encryption/decryption options instead of lots of method overload variations. Simplified gRPC implementation to use fewer methods. Applied argument name updates applied previously (plainText -> plaintext).

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

* Updated tests

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

* Removed unused reference

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

* Updated examples to reflect new method shapes. Downgraded package to .net 6 instead of .net 8 per review suggestion.

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

* Updated to reflect non-aliased values per review suggestion

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

* Update to ensure that both send/receive streams run at the same time instead of sequentially.

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

* Updated to support streamed results in addition to fixed byte arrays. Refactored implementation to minimize duplicative code.

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

* Updated example to fix compile issue

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

* Removed encrypt/decrypt methods that accepted streams and returned ReadOnlyMemory<byte>. Marked implementations that use this on the gRPC class as private instead.

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

* Added missing Obsolete attributes on Encrypt/Decrypt methods. Added overloads on decrypt methods that do not require a DecryptionOptions to be passed in.

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

* Updated encrypt/decrypt options so the streaming block size no longer uses a uint. Added validation in its place to ensure the value provided is never less than or equal to 0.

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

* Updated how validation works in the options to accommodate lack of the shorter variation in .NET 6

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

* Updated names of encrypt/decrypt streaming methods so everything uses just EncryptAsync or DecryptAsync

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

* Fixed regression that would have prevented data from being sent entirely to the sidecar. Also simplified operation per suggestion in review.

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

* Updated examples to reflect changed API

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

* Updated so IAsyncEnumerable methods (encrypt and decrypt) return IAsyncEnumerable<ReadOnlyMemory<byte>> instead of IAsyncEnumerable<byte[]>.

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

* Updated example to reflect change from IAsyncEnumerable<byte> to IAsyncEnumerable<ReadOnlyMemory<byte>>

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

* Avoiding allocation by using MemoryMarshal instead of .ToArray() to create MemoryStream from ReadOnlyMemory<byte>.

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

* Performance updates to minimize unnecessary byte array copies and eliminate unnecessary allocations.

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

* Removed unnecessary return from SendPlaintextStreamAsync and SendCiphertextStreamAsync methods

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

* Updated exception text to be more specific as to what's wrong with the input value.

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

* Minor tweak to prefer using using a Memory

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

* Deduplicated some of the Decrypt methods, simplifying the implementation

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

* Eliminated duplicate encryption method, simplifying implementation

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

* Updated to eliminate an unnecessary `await` and `async foreach`.

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

* Updated stream example to reflect the changes to the API shape

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

* Added notes about operations with stream-based data

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

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
2024-02-14 11:29:08 -08:00
Josh van Leeuwen 233c620b0f
Actor State TTL (#1164)
* Actor state TTL support

Signed-off-by: joshvanl <me@joshvanl.dev>
2024-01-08 15:06:20 -08:00
MregXN 7616bfad22
use daprWorkflowClient (#1212)
Signed-off-by: MregXN <mregxn@gmail.com>
2024-01-08 14:14:07 -08:00
Ryan Lettieri 10ef81873b
Adding cancel to workflow example and updating api references to beta (#1194)
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2023-11-29 14:39:56 -08:00
MregXN abcbf4f9a0
modify readme (#1192)
Signed-off-by: MregXN <mregxn@gmail.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-11-28 16:05:39 -08:00
MregXN bb3f97abfd
Modify broken links in README (#1190)
Signed-off-by: MregXN <mregxn@gmail.com>
2023-11-28 15:48:15 -08:00
Phillip Hoff 2332388155
Update actor reminder example. (#1179)
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-11-13 15:25:56 -08:00
Phillip Hoff 02ab25e937
Consolidate C# language version to 10. (#1180)
Signed-off-by: Phillip Hoff <phillip@orst.edu>
2023-11-13 15:20:01 -08:00
Ryan Lettieri 87329f62b1
Updating workflow collection to allow for use of API Token validation (#1141)
Updating workflow collection to allow for use of API Token validation

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2023-09-07 14:51:32 -07:00
Yash Nisar 17f849b175
Remove .NET Core 3.1 support and standardize on .NET 6 (#1045)
* Remove .NET Core 3.1 support and standardize on .NET 6

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

* Remove support for .NET 5 as well

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

---------

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
2023-08-24 11:04:02 -07:00
MonkeyTennis 574dc0cb3d
Rev'ed Grpc.Net.Client PackageReference version for Dapr dotnet-sdk (#1126)
Rev'ed Grpc.Net.Client PackageReference version for Dapr dotnet-sdk

Signed-off-by: Bradley Cotier <bcotier@microsoft.com>
2023-07-18 11:10:11 -07:00
Shubham Sharma 8e9db70c0f
Fix HTTP examples in Workflow Console App (#1107)
* Update demo.http;

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix input

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

---------

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-06-15 17:07:36 -07:00
Shivam Kumar ece9fbe0d4 adding get actor reminder API (#1103)
* get actor reminder API

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

* handling serialization better

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

---------

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
2023-06-13 16:17:59 +05:30
Shivam Kumar e7a71c423a
removing Obsolete attribute from config API classes (#1098)
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-05-24 14:05:33 -07:00
Chris Gillum a3e5106040
[Workflow] Add human approval to the workflow example (#1096)
* [Workflow] Add human approval to the workflow example

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Add RequestApprovalActivity to workflow

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback - explicit enum values

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

---------

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-05-24 10:43:54 -07:00
Chris Gillum e59c856b33
Proper workflow retry support in Dapr SDK (#1090)
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-05-19 09:22:13 -05:00
Chris Gillum 8152c7496a
[Workflow] Improve management API usability (#1087)
* [Workflow] Improve management API usability

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback and update E2E test

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

---------

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-05-12 15:44:33 -07:00
Chris Gillum 610632ae4b
Add WorkflowTaskFailedException for workflow error handling (#1086)
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-05-11 13:11:49 -07:00
Ryan Lettieri 5a57035f44
Workflow addition of Pause/Resume and Purge (#1080)
* Initial Push for new workflow methods

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating proto and cleaning up workflow functions

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating runtime ver

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating go ver

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating go ver

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Temp removal of new workflow stuff to see if the test passes without it

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Another fix attempt for workflow test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Attempting to change input for workflow E2E test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Commenting out pause/resume for testing

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Correcting assert statement on workflow purge

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing exception check

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing exception check on purge

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* added in testing for raise event in workflow

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Pointing to wip for pause/resume fixes

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* First round of addresing feedback for workflow

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Addressing feedback

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* addressing more feedback

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* fixing startup.cs for workflow test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* fixing startup.cs for workflow test again

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* changing variable type for workflow start

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Making code look nicer

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating workflow get for testing

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Checking against null updated time for workflow updated time

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding in a delay before getting info on the workflow

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding in a larger delay before getting info on the workflow

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Attempting to test against latest dapr dapr commit

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing other sleeps from workflow test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Addressing more feedback

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing assert statement on workflow purge test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

---------

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2023-05-09 12:40:15 -07:00
Chris Gillum b97af45c5f
Workflow SDK changes for v1.11 (#1059)
* Workflow SDK changes for v1.11

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback - round 1

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback - update doc comment

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

---------

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-03-29 15:56:04 -07:00
Yash Nisar f42b690f4c
Merging changes from 1.10 to master (#1047)
* Update DurableTask SDK dependency to get ARM64 compatibility (#1024) (#1025)

* Update DurableTask SDK dependency to get ARM64 compatibility

* Fix issue with gRPC address override behavior

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Initial Bulk Subscribe functionality (#1009)

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

* Workflow unit testing changes for 1.10 release (#1038)

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Fix issue with gRPC address override behavior

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Workflow SDK changes to enable unit testing

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-02-27 14:42:32 -08:00
Chris Gillum aa38b05af7
Enable unit testing for Dapr Workflows (#1035)
* Workflow SDK changes to enable unit testing

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Sample workflow unit testing project

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

---------

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
2023-02-16 11:55:21 -08:00
Ryan Lettieri 9dcae7b0e7
Improved workflows example program and added in statestore functionality. (#1020)
* Workflow Management - Initial Methods (#1003)

Initial work for workflows DotNET SDK

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Beefed up the workflows example program and added in statestore functionality

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Addressing a bunch of review comments

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to readme and demo for workflows

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Changed webapp to console app

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Update DurableTask SDK dependency to get ARM64 compatibility (#1024)

* Update DurableTask SDK dependency to get ARM64 compatibility

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Fix issue with gRPC address override behavior

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Remove Web APIs and web dependencies

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Renaming WorkflowWebApp to WorkflowConsoleApp

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Various updates to the sample app

- Replaced DaprClient with WorkflowEngineClient
- Removed unused etag logic
- Fixed incorrect usage of certain model types
- Cleaned up logs and console output
- Simplified program loop
- Cleaned up console output and added some coloring
- Added error handling in the console interactions
- Various other tweaks/simplifications/enhancements

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to README and demo http commands

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Make README copy/paste-able and some other minor tweaks

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding in Paul's devcontainer work

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* More README touch-ups

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* [docs] Add workflows to .NET client doc (#1019)

* add workflows to client page

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating workflows readme and example

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing README for letting users know which .NET is needed

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* moving using statements above the namespace

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

---------

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
2023-02-10 11:55:37 -08:00
Yash Nisar 6e77f12a39
Add support for repetition and ISO 8601 for reminders (#974)
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
2023-01-26 20:13:42 -08:00
Yash Nisar 1605ecd90e
Implement Bulk Publish functionality (#1001)
Closes https://github.com/dapr/dotnet-sdk/issues/958

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-01-26 11:34:09 -08:00
Chris Gillum 389de69180
Additional API surface area for Dapr Workflow authoring SDK (#1012)
* Additional API surface area

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* PR feedback

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Environment variable configuration

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Fix .NET TFMs and complete the README.md contents

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-01-24 15:41:56 -08:00
halspang 5a7e59fce3
Remove debug statement from configuration example (#949)
Signed-off-by: Hal Spang <halspang@microsoft.com>
2023-01-23 12:04:22 -08:00
halspang b8766b9df5
Add method to publish without client serialization (#1010)
This commit adds the ability to publish raw bytes instead of using
the serialization that is built into the client.

https://github.com/dapr/dotnet-sdk/issues/718

Signed-off-by: halspang <halspang@microsoft.com>
2023-01-23 11:41:37 -08:00
Tiago Alves Macambira 2aa4806c44
Workflow Authoring: initial methods (#981)
* Initial workflow sdk implementation

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Dapr Workflow initial methods for dotnet-sdk

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Handled mistake in the workflow name

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added common license header to .cs files

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed namespace to Dapr.Workflow

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Addressed docs related review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Reverted few changes to avoid compile time error

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Examples changes

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added readonly dictionary

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added .csproj to sln file with few minor comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Change nuget dependency and update folder structure

This commit re-adds commit d5b9189da5 but with DCO.

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Update Durable Task SDK version & simplify example

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Addresses some PR comments.

* Rename ActivityContext to WorkflowActivityContext
* Change example webapp port away from 8080x

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Addressing review comments.

* Rename workflow and activity in example to be more meangniful
* Add parameter documentation to some methods
* Use local project references when appropriate

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Adding more documentation

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Replaces custom AddSingletonIfNotPresent with std. TryAddSingleton

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Renames AddWorkflowsToRegistry to AddActivitiesToRegistry to better match what it does

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Add cancelation token overload for WorkflowContext.WaitForExternalEventAsync

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Renaming AddWorkflowsAndActivitiesToRegistry

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Defer launch URL and port to launchSettings.json

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: Amulya Varote <amulyavarote@microsoft.com>
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
2023-01-12 16:10:21 -08:00
Yash Nisar 1efe1fa30b
Add support for Bulk State, i.e. SaveBulkStateAsync(...) method (#962)
* Add support for Bulk State, i.e. SaveBulkStateAsync

Closes https://github.com/dapr/dotnet-sdk/issues/785

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

* Update examples to include support for Bulk State

Closes https://github.com/dapr/dotnet-sdk/issues/963

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
2022-10-31 11:06:27 -07:00
amulyavarote 56017dd94a
Changed distributedLock example to consider a new default port number (#966)
* Changed distributedLock example to consider a new default port number

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2022-10-24 13:10:46 -07:00
amulyavarote 5043b9f8c3
Configuration API changes to support dictionary type response (#943)
* Added config class changes

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed examples, extension files and tests to support dictionary

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2022-09-13 15:10:46 -07:00
Yash Nisar efacff4f58
Change log level to information in pubsub examples (#942)
Fixes https://github.com/dapr/dotnet-sdk/issues/936

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2022-09-01 14:06:50 -07:00
amulyavarote 2ab1b7cee0
Added new links to client folder in example (#938)
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
2022-08-25 15:48:41 -07:00
Yash Nisar e6ded69ca4
Add dead letter topic support (#929)
Closes https://github.com/dapr/dotnet-sdk/issues/897

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
2022-08-22 13:39:31 -07:00
Marcos Candeia a57375f343
Upgrade grpc.tools version to 2.47.0 for supporting arm64 architecture (#920)
* Upgrade grpc.tools version to 2.47.0 for supporting arm64 architecture

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Upgrade Grpc.* packages to version 2.47.0

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-08-10 12:43:50 -07:00
halspang 8bc7e90194
Add Actor Reminder/Timer TTL support (#912)
Add Actor Reminder/Timer TTL support

This commit adds the TTL field to Actor reminders/timers. This allows
reminders and timers to expire after a given TimeSpan instead of
having to be manually deleted.

https://github.com/dapr/dotnet-sdk/issues/788

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-08-03 11:56:53 -07:00
amulyavarote 016545ac0d
Added dotnet methods for Distributed Lock API (#886)
* Added dotnet methods for Distributed Lock API

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes in examples to make them real world - based on the PR review

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Fixed application log statements

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes to implement IDisposable

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added a sample test case for TryLockResponse

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments - 2

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Reworking the DistributedLock example

Signed-off-by: Hal Spang <halspang@microsoft.com>

Co-authored-by: Hal Spang <halspang@microsoft.com>
2022-06-29 10:23:37 -07:00
saber-wang 927daa48eb
add original topic metadata support (#876)
* add  original topic metadata support
Signed-off-by: saberwang <saberwang@hotmail.com>

* Add topicmetadata sample
Signed-off-by: saberwang <saberwang@hotmail.com>
2022-06-21 09:49:15 -07:00
halspang cda60cb382
Add Subscribe/Unsubscribe API support (#848)
Add Subscribe/Unsubscribe API support

This commit adds support for both the subscribe and unsubscribe
APIs for Darp's Configuration building block. The configuration can
now be exposed through the AspNet builder pattern or by making the
request directly with the DaprClient.

https://github.com/dapr/dotnet-sdk/issues/822

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-05-26 14:43:34 -07:00
halspang 3553899235
Update Google.Protobuf to 3.15 (#850)
Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-03-23 10:51:41 -07:00
halspang a6319dd4b6
Wait for sidecar in DaprSecretStoreConfiguration (#838)
The secret store configuration provider was trying to access Dapr
during the app startup. If the app started faster than Dapr, it would
get an error trying to access the secrets. This commit lets the
provider wait for the sidecar to come up before making any requests.
If the sidecar does not come up at all, we will still fail.

https://github.com/dapr/dotnet-sdk/issues/779

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-02-17 16:39:33 -08:00
amulyavarote 596d725785
Changed application port number for actors example (#816)
* Changed application port number for actors example

* Modified readme for actors example

* Update README.md

Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>

Co-authored-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
2022-01-20 16:01:01 -08:00
halspang f5169cbe5f
Add support for the GetConfiguration API (#812)
This commit adds support for the GetConfiguration API. This is an
alpha API and may be subject to change. This commit also does not
cover the Subscribe API for Configurations.

Included is a simple example showing the usage of the Configuration
API.

https://github.com/dapr/dotnet-sdk/issues/787

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-12 17:07:48 -08:00
Dmitry Shmulevich 0c9d6a45c8
replaced license headers (#802)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-10 13:39:06 -08:00
Federico Bridger 1acd372ae2
Fixing problem with IIS Express not allowing Applications to subscribe to events (#754)
Co-authored-by: Federico.Bridger <Federico.Bridger@endava.com>
2021-09-28 13:50:49 -07:00
Phil Kedy aba49d1446
Adding match and priority to TopicAttribute for PubSub routing. (#746)
* Adding match and priority to TopicAttribute for PubSub routing.

* Restructuring call to dapr/subscribe

* Tweak
2021-09-01 14:50:42 -07:00
Charlie Stanley ff25eb0bb1
Update Grpc to 2.38.1 which has arm64 support (#730)
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-08-17 13:51:38 -07:00
Luis Cantero 56ac2431b0
Return TopicEventResponse instead of null (#720) 2021-07-21 18:53:59 -07:00