2023-01-05 12:55:08 +00:00
|
|
|
using Elsa.Features.Services;
|
|
|
|
|
using Elsa.Webhooks.Features;
|
|
|
|
|
|
2024-01-26 10:25:25 +00:00
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
|
namespace Elsa.Extensions;
|
2023-01-05 12:55:08 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds extensions to <see cref="IModule"/> that enables the <see cref="WebhooksFeature"/> feature.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class ModuleExtensions
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Enables and configures the <see cref="WebhooksFeature"/> feature.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static IModule UseWebhooks(this IModule module, Action<WebhooksFeature>? configure = default)
|
|
|
|
|
{
|
|
|
|
|
module.Configure(configure);
|
|
|
|
|
return module;
|
|
|
|
|
}
|
|
|
|
|
}
|