public async Task<Continuation> Invoke(IncomingContext context)
{
var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);
await Task.Delay(10).ConfigureAwait(false);
return new Continuation
{
After = () => { scope.Complete(); return Task.CompletedTask; },
Finally = () => { scope.Dispose(); return Task.CompletedTask; }
};
}
}