Created
November 28, 2017 05:52
-
-
Save gled4er/0c0852fdc86bae997112df5459ac1455 to your computer and use it in GitHub Desktop.
Sub-Orchestrator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
namespace DurableFunc | |
{ | |
public static class HelloWorld | |
{ | |
[FunctionName("HelloWorld")] | |
public static async Task<List<string>> Run([OrchestrationTrigger] DurableOrchestrationContext context) | |
{ | |
var list = new List<string> | |
{ | |
$"{await context.CallActivityAsync<string>("Hello", "Tokyo")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "Tokyo")}°C", | |
$"{await context.CallActivityAsync<string>("Hello", "Seattle")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "Seattle")}°C", | |
$"{await context.CallActivityAsync<string>("Hello", "London")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "London")}°C" | |
}; | |
return list; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment