Ejemplo n.º 1
0
 /// <inheritdoc />
 public override async Task <string> RunAsync(TaskContext context, string input)
 {
     CheckInnerActivity();
     using (OrchestrationScope.EnterScope(context.OrchestrationInstance.InstanceId))
     {
         return(await InnerActivity.RunAsync(context, input).ConfigureAwait(false));
     }
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override string Run(TaskContext context, string input)
 {
     CheckInnerActivity();
     using (OrchestrationScope.EnterScope(context.OrchestrationInstance.InstanceId))
     {
         return(InnerActivity.Run(context, input));
     }
 }
 /// <inheritdoc />
 public override Task <string> Execute(OrchestrationContext context, string input)
 {
     CheckInnerOrchestration();
     using (OrchestrationScope.EnterScope(context.OrchestrationInstance.InstanceId))
     {
         // While this looks wrong to not await this task before disposing the scope,
         // DurableTask orchestrations are never resumed after yielding. They will only
         // be replayed from scratch.
         return(InnerOrchestration.Execute(context, input));
     }
 }