-
Notifications
You must be signed in to change notification settings - Fork 35
/
RetrieveOrder.cs
29 lines (26 loc) · 1023 Bytes
/
RetrieveOrder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// ------------------------------------------------------------
namespace dotnet_azurefunction
{
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.WebJobs.Extensions.Dapr;
public static class RetrieveOrder
{
/// <summary>
/// Example to use Dapr Service Invocation Trigger and Dapr State input binding to retrieve a saved state from statestore
/// </summary>
[FunctionName("RetrieveOrder")]
public static void Run(
[DaprServiceInvocationTrigger] object args,
[DaprState("%StateStoreName%", Key = "order")] string data,
ILogger log)
{
log.LogInformation("C# function processed a RetrieveOrder request from the Dapr Runtime.");
// print the fetched state value
log.LogInformation(data);
}
}
}