elsa-core/src/modules/Elsa.Webhooks/Extensions/ModuleExtensions.cs
Sipke Schoorstra 361b644a75
Refactor WebhooksFeature to streamline configuration.
Simplified the configuration of sinks, sources, and HTTP clients by using direct actions instead of service-level options. Updated Apply method to finalize configurations and added notification handlers for better extensibility. Improved code readability and maintainability by consolidating logic and removing unnecessary dependencies.
2025-02-23 21:38:43 +01:00

20 lines
585 B
C#

using Elsa.Features.Services;
using Elsa.Webhooks.Features;
// ReSharper disable once CheckNamespace
namespace Elsa.Extensions;
/// <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 = null)
{
module.Configure(configure);
return module;
}
}