public override async Task <string> RunTask(OrchestrationContext context, int input) { IUserTasks userTasks = context.CreateClient <IUserTasks>(); await context.CreateTimer <object>(context.CurrentUtcDateTime.Add(TimeSpan.FromSeconds(input)), null); return(await userTasks.GreetUserAsync("Gabbar")); }
public override async Task <string> RunTask(OrchestrationContext context, string input) { IUserTasks userTasks = context.CreateClient <IUserTasks>(); string user = await userTasks.GetUserAsync(); string greeting = await userTasks.GreetUserAsync(user); return(greeting); }
public override async Task <string> RunTask(OrchestrationContext context, string input) { IUserTasks userTasks = context.CreateClient <IUserTasks>(); var subOrch1 = context.CreateSubOrchestrationInstance <string>(typeof(SimpleOrchestrationWithTasks), input); var subOrch2 = context.CreateSubOrchestrationInstance <string>(typeof(SimpleOrchestrationWithTasks), input); var myTask = userTasks.GreetUserAsync("World"); await Task.WhenAll(subOrch1, subOrch2, myTask); return($"TaskResult = {myTask.Result} , SubOrchestration1Result = {subOrch1.Result}, SubOrchestration2Result = {subOrch2.Result}"); }