1
0
mirror of synced 2024-11-22 17:23:49 +00:00
Tapeti/Tapeti.Flow/Default/StateYieldPoint.cs

23 lines
437 B
C#
Raw Normal View History

using System.Threading.Tasks;
namespace Tapeti.Flow.Default
{
internal class StateYieldPoint : IExecutableYieldPoint
{
public bool StoreState { get; }
public StateYieldPoint(bool storeState)
{
StoreState = storeState;
}
public async Task Execute(FlowContext context)
{
if (StoreState)
await context.EnsureStored();
}
}
}