1
0
mirror of synced 2024-11-14 14:33:49 +00:00
Tapeti/Tapeti.Flow/Default/DelegateYieldPoint.cs

23 lines
452 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 10:04:03 +00:00
public async Task Execute(FlowContext context)
{
2019-08-15 10:04:03 +00:00
await onExecute(context);
}
}
}