C# Класс Microsoft.AspNet.WebHooks.AzureWebHookDequeueManager

Provides an event loop which dequeues messages from a Microsoft Azure Queue and then sends the WebHook to the recipients. If the delivery success then the message is removed from the queue, otherwise it remains so that another attempt can be made. After a given number of attempts the message is discarded without being delivered.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AzureWebHookDequeueManager System

Открытые методы

Метод Описание
AzureWebHookDequeueManager ( string connectionString, ILogger logger ) : System

Initializes a new instance of the AzureWebHookDequeueManager using the given connectionString to identify the Microsoft Azure Storage Queue.

AzureWebHookDequeueManager ( string connectionString, ILogger logger, System.TimeSpan pollingFrequency, System.TimeSpan messageTimeout, int maxAttempts ) : System

Initializes a new instance of the AzureWebHookDequeueManager using the given connectionString to identify the Microsoft Azure Storage Queue.

Dispose ( ) : void
Start ( CancellationToken cancellationToken ) : Task

Start the event loop of requesting messages from the queue and send them out as WebHooks.

Защищенные методы

Метод Описание
DequeueAndSendWebHooks ( CancellationToken cancellationToken ) : Task

Dequeues available WebHooks and sends them out to each WebHook recipient.

Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
AzureWebHookDequeueManager ( string connectionString, ILogger logger, System.TimeSpan pollingFrequency, System.TimeSpan messageTimeout, int maxAttempts, HttpClient httpClient, IStorageManager storageManager, WebHookSender sender ) : System

Intended for unit test purposes

Описание методов

AzureWebHookDequeueManager() публичный Метод

Initializes a new instance of the AzureWebHookDequeueManager using the given connectionString to identify the Microsoft Azure Storage Queue.
public AzureWebHookDequeueManager ( string connectionString, ILogger logger ) : System
connectionString string The Microsoft Azure Storage Queue connection string.
logger ILogger The instance to use for logging errors and warnings.
Результат System

AzureWebHookDequeueManager() публичный Метод

Initializes a new instance of the AzureWebHookDequeueManager using the given connectionString to identify the Microsoft Azure Storage Queue.
public AzureWebHookDequeueManager ( string connectionString, ILogger logger, System.TimeSpan pollingFrequency, System.TimeSpan messageTimeout, int maxAttempts ) : System
connectionString string The Microsoft Azure Storage Queue connection string.
logger ILogger The instance to use for logging errors and warnings.
pollingFrequency System.TimeSpan The polling frequency by which we request messages from the queue.
messageTimeout System.TimeSpan The time allotted to send out the WebHooks request and get a response. If /// the request has not completed within this time frame, the message will be considered to have failed and /// it will be attempted again.
maxAttempts int The maximum number of attempts to deliver the WebHook.
Результат System

DequeueAndSendWebHooks() защищенный Метод

Dequeues available WebHooks and sends them out to each WebHook recipient.
protected DequeueAndSendWebHooks ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Результат Task

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

Start() публичный Метод

Start the event loop of requesting messages from the queue and send them out as WebHooks.
public Start ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken A which can be used to terminate the event loop.
Результат Task