2019-08-14 12:20:53 +02:00
using Tapeti.Config ;
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>
2019-08-14 12:20:53 +02: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 ;
}
}
}