mirror of https://github.com/dapr/dotnet-sdk.git
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> |
||
|---|---|---|
| .. | ||
| Example.cs | ||
| Program.cs | ||
| PublishBytesExample.cs | ||
| PublishEventExample.cs | ||
| PublishEventExample.csproj | ||
| README.md | ||
README.md
Dapr .NET SDK pub/sub example
Prerequisites
Running the example
To run the sample locally run this command in the DaprClient directory:
dapr run --app-id DaprClient -- dotnet run <sample number>
Running the following command will output a list of the samples included:
dapr run --app-id DaprClient -- dotnet run
Press Ctrl+C to exit, and then run the command again and provide a sample number to run the samples.
For example run this command to run the 0th sample from the list produced earlier.
dapr run --app-id DaprClient -- dotnet run 0
Publishing Pub/Sub Events
See PublishEventExample.cs for an example using the DaprClient to publish a pub/sub event.