1
0
mirror of synced 2024-12-23 09:43:07 +01:00
Tapeti/Tapeti.Flow/Default/DelegateYieldPoint.cs

23 lines
474 B
C#
Raw Normal View History

using System;
using System.Threading.Tasks;
namespace Tapeti.Flow.Default
{
internal class DelegateYieldPoint : IYieldPoint
{
private readonly Func<FlowContext, Task> onExecute;
public DelegateYieldPoint(Func<FlowContext, Task> onExecute)
{
this.onExecute = onExecute;
}
2019-08-15 12:04:03 +02:00
public async Task Execute(FlowContext context)
{
await onExecute(context).ConfigureAwait(false);
}
}
}