1
0
mirror of synced 2024-11-05 02:59:16 +00:00
Tapeti/Tapeti.Flow/Default/DelegateYieldPoint.cs

23 lines
447 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;
}
public Task Execute(FlowContext context)
{
return onExecute(context);
}
}
}