2022-05-27 10:36:39 +00:00
|
|
|
using Elsa.Features.Services;
|
2022-06-29 13:36:27 +00:00
|
|
|
using Elsa.Workflows.Core.Activities;
|
2022-05-27 10:36:39 +00:00
|
|
|
using Elsa.Workflows.Management.Features;
|
2022-05-26 10:47:31 +00:00
|
|
|
|
|
|
|
|
namespace Elsa.Workflows.Management.Extensions;
|
|
|
|
|
|
|
|
|
|
public static class DependencyInjectionExtensions
|
|
|
|
|
{
|
2022-05-27 10:36:39 +00:00
|
|
|
public static IModule UseManagement(this IModule module, Action<WorkflowManagementFeature>? configure = default)
|
2022-05-26 10:47:31 +00:00
|
|
|
{
|
2022-06-29 13:36:27 +00:00
|
|
|
module.Configure<WorkflowManagementFeature>(management =>
|
|
|
|
|
{
|
|
|
|
|
management.AddActivity<NotFoundActivity>();
|
|
|
|
|
configure?.Invoke(management);
|
|
|
|
|
});
|
2022-05-27 10:36:39 +00:00
|
|
|
return module;
|
2022-05-26 10:47:31 +00:00
|
|
|
}
|
|
|
|
|
}
|