2019-08-14 12:20:53 +02:00
using Tapeti.Config ;
2022-11-22 13:20:47 +01:00
// ReSharper disable UnusedMember.Global
2019-08-14 12:20:53 +02:00
namespace Tapeti.Flow
2017-02-05 23:22:34 +01:00
{
2019-08-14 20:48:40 +02:00
/// <summary>
/// ITapetiConfigBuilder extension for enabling Flow.
/// </summary>
2017-02-05 23:22:34 +01:00
public static class ConfigExtensions
{
2019-08-14 20:48:40 +02:00
/// <summary>
/// Enables Tapeti Flow.
/// </summary>
/// <param name="config"></param>
/// <param name="flowRepository">An optional IFlowRepository implementation to persist flow state. If not provided, flow state will be lost when the application restarts.</param>
/// <returns></returns>
2022-11-23 09:13:38 +01:00
public static ITapetiConfigBuilder WithFlow ( this ITapetiConfigBuilder config , IFlowRepository ? flowRepository = null )
2017-02-05 23:22:34 +01:00
{
2019-08-14 20:48:40 +02:00
config . Use ( new FlowExtension ( flowRepository ) ) ;
2017-02-05 23:22:34 +01:00
return config ;
}
}
}