Show / Hide Table of Contents

Class WebhookDispatcher

Hosted Service responsible for processing the Webhook queue held by the WebhookManager. Calls WebhookManager.NotifyWebhooksAsync to process each item in the queue.

Inheritance
object
BackgroundService
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>
WebhookDispatcher
Implements
IDisposable
IHostedService
Inherited Members
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>._queue
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>.ExecuteAsync(CancellationToken)
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>.OuterProcessItemAsync(IAsyncQueueProcessItemContext<WebhookTaskInfo>, CancellationToken)
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>.ProcessItemAsync(IAsyncQueueProcessItemContext<WebhookTaskInfo>, CancellationToken)
BackgroundService.ExecuteAsync(CancellationToken)
BackgroundService.StartAsync(CancellationToken)
BackgroundService.StopAsync(CancellationToken)
BackgroundService.Dispose()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class WebhookDispatcher : AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>, IDisposable, IHostedService

Constructors

WebhookDispatcher(IWebhookManager, IAsyncQueue<WebhookTaskInfo>, ILogger<WebhookDispatcher>)

Constructor called by Hosted Service / DI

Declaration
public WebhookDispatcher(IWebhookManager webhookManager, IAsyncQueue<WebhookTaskInfo> queue, ILogger<WebhookDispatcher> logger)
Parameters
Type Name Description
IWebhookManager webhookManager
IAsyncQueue<WebhookTaskInfo> queue
ILogger<WebhookDispatcher> logger

Methods

ProcessItemAsync(IAsyncQueueProcessItemContext<WebhookTaskInfo>, CancellationToken)

Calls WebhookManager.NotifyWebhooksAsync to process each item in the queue.

Declaration
protected override Task ProcessItemAsync(IAsyncQueueProcessItemContext<WebhookTaskInfo> context, CancellationToken cancellationToken)
Parameters
Type Name Description
IAsyncQueueProcessItemContext<WebhookTaskInfo> context
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
AsyncQueueProcessor<IAsyncQueue<WebhookTaskInfo>, WebhookTaskInfo>.ProcessItemAsync(IAsyncQueueProcessItemContext<WebhookTaskInfo>, CancellationToken)

Implements

IDisposable
IHostedService

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top