2019-08-14 10:20:53 +00:00
using Tapeti.Config ;
2022-11-22 12:20:47 +00:00
// ReSharper disable UnusedMember.Global
2019-08-14 10:20:53 +00:00
namespace Tapeti.Flow
2017-02-05 22:22:34 +00:00
{
2019-08-14 18:48:40 +00:00
/// <summary>
/// ITapetiConfigBuilder extension for enabling Flow.
/// </summary>
2017-02-05 22:22:34 +00:00
public static class ConfigExtensions
{
2019-08-14 18:48:40 +00: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 08:13:38 +00:00
public static ITapetiConfigBuilder WithFlow ( this ITapetiConfigBuilder config , IFlowRepository ? flowRepository = null )
2017-02-05 22:22:34 +00:00
{
2019-08-14 18:48:40 +00:00
config . Use ( new FlowExtension ( flowRepository ) ) ;
2017-02-05 22:22:34 +00:00
return config ;
}
}
}