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

Provides a base implementation of IWebHookSender that defines the default format for HTTP requests sent as WebHooks.
Наследование: IWebHookSender, IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Dispose ( ) : void
SendWebHookWorkItemsAsync ( IEnumerable workItems ) : System.Threading.Tasks.Task

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

Метод Описание
CreateWebHookRequestBody ( WebHookWorkItem workItem ) : Newtonsoft.Json.Linq.JObject

Creates a JObject used as the HttpRequestMessage entity body for a WebHook.

Dispose ( bool disposing ) : void

Releases the unmanaged resources and optionally releases the managed resources.

SignWebHookRequest ( WebHookWorkItem workItem, HttpRequestMessage request, Newtonsoft.Json.Linq.JObject body ) : void

Adds a SHA 256 signature to the body and adds it to the request as an HTTP header to the HttpRequestMessage along with the entity body.

WebHookSender ( ILogger logger ) : System

Initializes a new instance of the WebHookSender class.

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

Метод Описание
CreateWebHookRequest ( WebHookWorkItem workItem ) : HttpRequestMessage

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

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

Creates a JObject used as the HttpRequestMessage entity body for a WebHook.
protected CreateWebHookRequestBody ( WebHookWorkItem workItem ) : Newtonsoft.Json.Linq.JObject
workItem WebHookWorkItem The representing the data to be sent.
Результат Newtonsoft.Json.Linq.JObject

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

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

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

Releases the unmanaged resources and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

SendWebHookWorkItemsAsync() публичный абстрактный Метод

public abstract SendWebHookWorkItemsAsync ( IEnumerable workItems ) : System.Threading.Tasks.Task
workItems IEnumerable
Результат System.Threading.Tasks.Task

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

Adds a SHA 256 signature to the body and adds it to the request as an HTTP header to the HttpRequestMessage along with the entity body.
protected SignWebHookRequest ( WebHookWorkItem workItem, HttpRequestMessage request, Newtonsoft.Json.Linq.JObject body ) : void
workItem WebHookWorkItem The current .
request System.Net.Http.HttpRequestMessage The request to add the signature to.
body Newtonsoft.Json.Linq.JObject The body to sign and add to the request.
Результат void

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

Initializes a new instance of the WebHookSender class.
protected WebHookSender ( ILogger logger ) : System
logger ILogger
Результат System