C# Class Microsoft.AspNet.WebHooks.WebHookSender

Provides a base implementation of IWebHookSender that defines the default format for HTTP requests sent as WebHooks.
Inheritance: IWebHookSender, IDisposable
Afficher le fichier Open project: aspnet/WebHooks Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
SendWebHookWorkItemsAsync ( IEnumerable workItems ) : System.Threading.Tasks.Task

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
CreateWebHookRequest ( WebHookWorkItem workItem ) : HttpRequestMessage

Method Details

CreateWebHookRequestBody() protected méthode

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.
Résultat Newtonsoft.Json.Linq.JObject

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

SendWebHookWorkItemsAsync() public abstract méthode

public abstract SendWebHookWorkItemsAsync ( IEnumerable workItems ) : System.Threading.Tasks.Task
workItems IEnumerable
Résultat System.Threading.Tasks.Task

SignWebHookRequest() protected méthode

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.
Résultat void

WebHookSender() protected méthode

Initializes a new instance of the WebHookSender class.
protected WebHookSender ( ILogger logger ) : System
logger ILogger
Résultat System