AddWebhookEvent to UmbracoBuilderExtensions (#15099)
This commit is contained in:
committed by
GitHub
parent
145107be45
commit
913f48806a
@@ -6,6 +6,7 @@ using Umbraco.Cms.Core.Media;
|
||||
using Umbraco.Cms.Core.Models.ContentEditing;
|
||||
using Umbraco.Cms.Core.Routing;
|
||||
using Umbraco.Cms.Core.Sections;
|
||||
using Umbraco.Cms.Core.Webhooks;
|
||||
|
||||
namespace Umbraco.Cms.Core.DependencyInjection;
|
||||
|
||||
@@ -133,4 +134,16 @@ public static partial class UmbracoBuilderExtensions
|
||||
builder.WithCollectionBuilder<MapDefinitionCollectionBuilder>().Add<T>();
|
||||
return builder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an IWebhookEvent to the WebhookEventCollectionBuilder.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="builder"></param>
|
||||
/// <returns></returns>
|
||||
public static IUmbracoBuilder AddWebhookEvent<T>(this IUmbracoBuilder builder) where T : IWebhookEvent
|
||||
{
|
||||
builder.WebhookEvents().Append<T>();
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user