Here are the examples of the csharp api System.Action.Invoke(WebhookOptionsBuilder) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : WebhookOptionsBuilderExtensions.cs
with MIT License
from elsa-workflows
with MIT License
from elsa-workflows
public static ElsaOptionsBuilder AddWebhooks(this ElsaOptionsBuilder elsaOptions, Action<WebhookOptionsBuilder>? configureOptions = default)
{
var services = elsaOptions.Services;
var optionsBuilder = new WebhookOptionsBuilder(services);
configureOptions?.Invoke(optionsBuilder);
var options = optionsBuilder.WebhookOptions;
services.AddSingleton(options);
services
.AddScoped(sp => sp.GetRequiredService<WebhookOptions>().WebhookDefinitionStoreFactory(sp))
.AddActivityTypeProvider<WebhookActivityTypeProvider>()
.AddBookmarkProvider<WebhookBookmarkProvider>()
.AddNotificationHandlersFrom<EvictWorkflowRegistryCacheHandler>();
services.Decorate<IWebhookDefinitionStore, InitializingWebhookDefinitionStore>();
services.Decorate<IWebhookDefinitionStore, EventPublishingWebhookDefinitionStore>();
return elsaOptions;
}