2017-01-31 11:01:08 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Flow.Default
|
|
|
|
|
{
|
2017-10-17 08:34:07 +00:00
|
|
|
|
internal class DelegateYieldPoint : IYieldPoint
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
private readonly Func<FlowContext, Task> onExecute;
|
|
|
|
|
|
|
|
|
|
|
2017-10-17 08:34:07 +00:00
|
|
|
|
public DelegateYieldPoint(Func<FlowContext, Task> onExecute)
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
|
|
|
|
this.onExecute = onExecute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Task Execute(FlowContext context)
|
|
|
|
|
{
|
|
|
|
|
return onExecute(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|