2022-06-05 20:49:47 +00:00
|
|
|
using Elsa.Features.Services;
|
|
|
|
|
using Elsa.Workflows.Api.Features;
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
2022-12-31 15:16:43 +00:00
|
|
|
namespace Elsa.Extensions;
|
2022-06-05 20:49:47 +00:00
|
|
|
|
2023-06-29 20:08:10 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Provides extensions to <see cref="IModule"/>.
|
|
|
|
|
/// </summary>
|
2022-11-23 10:20:35 +00:00
|
|
|
public static class ModuleExtensions
|
2022-06-05 20:49:47 +00:00
|
|
|
{
|
2023-06-29 20:08:10 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Configures the workflows API feature.
|
|
|
|
|
/// </summary>
|
2022-12-30 12:11:29 +00:00
|
|
|
public static IModule UseWorkflowsApi(this IModule module, Action<WorkflowsApiFeature>? configure = default)
|
2022-06-05 20:49:47 +00:00
|
|
|
{
|
|
|
|
|
module.Configure(configure);
|
|
|
|
|
return module;
|
|
|
|
|
}
|
2023-07-25 13:12:27 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Configures the real time workflow updates feature
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static IModule UseRealTimeWorkflows(this IModule module, Action<RealTimeWorkflowUpdatesFeature>? configure = default)
|
|
|
|
|
{
|
|
|
|
|
module.Configure(configure);
|
|
|
|
|
return module;
|
|
|
|
|
}
|
2022-06-05 20:49:47 +00:00
|
|
|
}
|