Commit Graph

28 Commits

Author SHA1 Message Date
Phillip Hoff 09008bb43b
.NET 8 Support (#1188)
* Update test projects to use .NET 8.

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

* Update SDK projects to target .NET 8.

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

* Update workflows to target .NET 8.

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

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2023-11-15 10:48:02 -08: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
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
halspang 76d4b682ec
Add net7 to testing matrix (#1005)
Signed-off-by: halspang <halspang@microsoft.com>

Signed-off-by: halspang <halspang@microsoft.com>
2023-01-26 11:00:43 -08:00
saber-wang 0998b0dd4d
topicmetadata should allow adding empty strings (#940)
* topicmetadata should allow adding empty strings
Signed-off-by: saberwang <saberwang@hotmail.com>

* fix test errors
Signed-off-by: saberwang <saberwang@hotmail.com>
2022-08-29 11:42:17 -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
saber-wang e58b1de56a
Fix the problem of determining whether there is a MetadataSeparator error (#900)
* add  original topic metadata support
Signed-off-by: saberwang <saberwang@hotmail.com>

* Add topicmetadata sample
Signed-off-by: saberwang <saberwang@hotmail.com>

* fix: v2 route metadata acquisition error
Signed-off-by: saberwang <saberwang@hotmail.com>

* feat:  Support setting metadata separator
Signed-off-by: saberwang <saberwang@hotmail.com>

* chore: Note modification
Signed-off-by: saberwang <saberwang@hotmail.com>

* style:
Signed-off-by: saberwang <saberwang@hotmail.com>

* commit
Signed-off-by: saberwang <saberwang@hotmail.com>

* fix: Whether there is a problem of MetadataSeparator judgment error
Signed-off-by: saberwang <saberwang@hotmail.com>

* TopicAttribute.Metadataseparator default should be null
Signed-off-by: saberwang <saberwang@hotmail.com>

* formatting code
Signed-off-by: saberwang <saberwang@hotmail.com>

Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2022-07-20 08:32:33 -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 7690e98663
Add .NET 6 build targets for tests (#823)
https://github.com/dapr/dotnet-sdk/issues/794

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-26 08:59:20 -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
halspang cc1b097991
Allow multiple topics to call the same endpoint (#763)
* Allow multiple topics to call the same endpoint

Using the WithTopic builder pattern allows you to specify multiple
topics that route to a single endpoint. Given the topics are unique,
this should be a valid case.

This change allows for a single endpoint to bind to multiple topics.
Note that this can only be done via the EndpointBuilder and not the
TopicAttribute.

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

* Let TopicAttribute to be specified multiple times

The endpoint builder allowed for multiple WithTopic calls so the
attribute should match that behavior.
2021-10-26 13:42:28 -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
Sapinder Pal Singh de84c7642d
Added support for processing raw messages. (#717)
* Added support for processing raw messages.

* Refactored code and updated subscribeendpoint tests.

* Updated file name to match class name.

* Marked subscription and metadata classes as internal.
2021-08-18 09:26:53 -07:00
Martin Björkström 9fe5485cf0
Adds Dapr authentication handler (#688)
* Adds Dapr authentication handler

- This includes functionality which simplifies securing endpoints using Dapr API Token authentication
- Fixes #682

* Remove Dapr authentication handler from examples.

* Don't resolve Dapr API token on every request, set it using delegate when configuring Dapr authentication instead.

* Adds integration tests for Dapr API token

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-08-11 17:55:59 -07:00
Martin Björkström 638bf4c6dc Adds support for providing pubsub and topic names during runtime.
- Fixes #680
2021-06-06 14:49:21 -07:00
Ryan Nowak cda2900997
Support non-JSON text in cloud events middleware (#621)
Fixes: #592

This change teaches the cloud events middleware to JSON-decode non-JSON
content when it appears in the `data` attribute in a cloud event.

There are three cases for cloud events that matter:

- data is used, content is a JSON object, datacontentype is JSON
- data is used, content is a JSON string, dataconenttype != JSON
- data_base64 is used, content is base64 bytes

We weren't handling the second of this. If you submitted the content:

`"data": "hello, "\world!\""` with datacontenttype = text/plain

You would end up with `"hello, \"world!\""` in the request body instead
of `hello, "world!"`.

This is a very subtle case, and I'm trying to fix it before users couple
their code to the wrong behavior. Since this is technically a breaking
change, I've added a opt-out so you can restore the buggy behavior.
2021-03-06 16:48:53 -08:00
vinayada1 ac7e20e070
Fix the ArgumentNull exception (#537)
* Fix the ArgumentNull exception



Co-authored-by: Sander Molenkamp <a.molenkamp@gmail.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-01-12 09:16:58 -08:00
Ryan Nowak d54419526f
Add .NET 5 testing (#458)
DO NOT MERGE - just testing this against the RC. We'll merge this
once 5 is a full release.
2021-01-04 11:13:35 -08:00
Leon Mai 11f6ea45e1
Multi pubsub (#374)
* 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>
2020-08-17 13:58:50 -07:00
Gokhan Altinoren aa52a5d6a2
Fixing an issue of a null reference exception where the model binder is checked against a null BindingSource (#371) 2020-08-17 08:57:48 -07:00
Aman Bhardwaj 51fc48fb74
Adding & enhancing client apis over gRPC (#244)
* 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>
2020-03-09 20:52:12 -07:00
Shalabh Mohan Shrivastava 5b8a426e7d
Add support in dotnet client sdk to support multi state store support (#207)
* 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>
2020-02-06 09:06:21 -08:00
Aman Bhardwaj 34835a0224
Build for net core 3.1 (#189) 2019-12-16 09:31:25 -08:00
Aman Bhardwaj 9a499176bf Revert "Build for net core 3.1"
This reverts commit bead12b1d8.
2019-12-15 09:59:08 -08:00
Aman Bhardwaj bead12b1d8 Build for net core 3.1 2019-12-13 20:31:08 -08:00
Ryan Nowak a6ef7e451d Add middleware for unwrapping cloud events
Fixes: #74

note: This relies on the fix for dapr/dapr#574 which has been merged.

This change introduces a middleware that can upwrap a *structured* cloud
event. This is the format used by dapr by default now for pub/sub
messaging. Adding the middleware makes it transparent to the developer
whether the data can from a cloud event or was a basic RPC call.

We're adding the middleware for this first since it's the most general
approach. It has a drawback compared with other approaches, performance.

Users could alternatively use the SDK from CloudEvents to read their
data without the middleware.

We might also want to add an MVC formatter in the future, which could do
the unwrapping and deserialization to a user-type in a single operation.
2019-10-12 20:25:38 -07:00
Aman Bhardwaj 4fb29e44e3
Changing to Dapr.* (#89)
* Changing to Dapr.*

* Update readme.md

* keeping things signed
2019-10-11 13:42:30 -07:00