Search Results for

    Show / Hide Table of Contents
    View Source

    Class WebhookEventBase<TNotification>

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Webhooks
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class WebhookEventBase<TNotification> : IWebhookEvent, INotificationAsyncHandler<TNotification>, INotificationHandler where TNotification : INotification
    Type Parameters
    Name Description
    TNotification

    Constructors

    View Source

    WebhookEventBase(IWebhookFiringService, IWebhookService, IOptionsMonitor<WebhookSettings>, IServerRoleAccessor)

    Declaration
    protected WebhookEventBase(IWebhookFiringService webhookFiringService, IWebhookService webhookService, IOptionsMonitor<WebhookSettings> webhookSettings, IServerRoleAccessor serverRoleAccessor)
    Parameters
    Type Name Description
    IWebhookFiringService webhookFiringService
    IWebhookService webhookService
    IOptionsMonitor<WebhookSettings> webhookSettings
    IServerRoleAccessor serverRoleAccessor

    Properties

    View Source

    Alias

    Declaration
    public abstract string Alias { get; }
    Property Value
    Type Description
    System.String
    View Source

    EventName

    Declaration
    public string EventName { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    EventType

    Declaration
    public string EventType { get; }
    Property Value
    Type Description
    System.String
    View Source

    WebhookFiringService

    Declaration
    protected IWebhookFiringService WebhookFiringService { get; }
    Property Value
    Type Description
    IWebhookFiringService
    View Source

    WebhookService

    Declaration
    protected IWebhookService WebhookService { get; }
    Property Value
    Type Description
    IWebhookService
    View Source

    WebhookSettings

    Declaration
    protected WebhookSettings WebhookSettings { get; }
    Property Value
    Type Description
    WebhookSettings

    Methods

    View Source

    ConvertNotificationToRequestPayload(TNotification)

    Use this method if you wish to change the shape of the object to be serialised for the JSON webhook payload. For example excluding sensitive data

    Declaration
    public virtual object ConvertNotificationToRequestPayload(TNotification notification)
    Parameters
    Type Name Description
    TNotification notification
    Returns
    Type Description
    System.Object
    View Source

    HandleAsync(TNotification, CancellationToken)

    Declaration
    public async Task HandleAsync(TNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TNotification notification
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    ProcessWebhooks(TNotification, IEnumerable<IWebhook>, CancellationToken)

    Process the webhooks for the given notification.

    Declaration
    public virtual async Task ProcessWebhooks(TNotification notification, IEnumerable<IWebhook> webhooks, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TNotification notification
    IEnumerable<IWebhook> webhooks
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    ShouldFireWebhookForNotification(TNotification)

    should webhooks fire for this notification.

    Declaration
    public virtual bool ShouldFireWebhookForNotification(TNotification notificationObject)
    Parameters
    Type Name Description
    TNotification notificationObject
    Returns
    Type Description
    System.Boolean

    true if webhooks should be fired.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • WebhookEventBase(IWebhookFiringService, IWebhookService, IOptionsMonitor<WebhookSettings>, IServerRoleAccessor)
    • Properties
      • Alias
      • EventName
      • EventType
      • WebhookFiringService
      • WebhookService
      • WebhookSettings
    • Methods
      • ConvertNotificationToRequestPayload(TNotification)
      • HandleAsync(TNotification, CancellationToken)
      • ProcessWebhooks(TNotification, IEnumerable<IWebhook>, CancellationToken)
      • ShouldFireWebhookForNotification(TNotification)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX