1
0
mirror of synced 2024-12-23 01:33:07 +01:00
Tapeti/Tapeti.Flow/Default/DelegateYieldPoint.cs
Mark van Renswoude a0c9d97694 Added ConfigureAwait to (hopefully) all awaits
Ugly as heck, but it's recommended for libraries
2024-04-08 14:20:15 +02:00

23 lines
474 B
C#

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 async Task Execute(FlowContext context)
{
await onExecute(context).ConfigureAwait(false);
}
}
}