C# Class Microsoft.AspNet.WebHooks.WebHookManager

Provides an implementation of IWebHookManager for managing notifications and mapping them to registered WebHooks.
Inheritance: IWebHookManager, IDisposable
Afficher le fichier Open project: aspnet/WebHooks Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
NotifyAllAsync ( IEnumerable notifications, Func predicate ) : Task
NotifyAsync ( string user, IEnumerable notifications, Func predicate ) : Task
VerifyWebHookAsync ( WebHook webHook ) : System.Threading.Tasks.Task
WebHookManager ( IWebHookStore webHookStore, IWebHookSender webHookSender, ILogger logger ) : System

Initialize a new instance of the WebHookManager with a default retry policy.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources and optionally releases the managed resources.

VerifyEchoAsync ( WebHook webHook ) : System.Threading.Tasks.Task

Verifies the WebHook by submitting a GET request with a query token intended by the echoed back.

VerifySecret ( string secret ) : void

Verifies that the WebHook secret is between 32 and 64 characters long.

VerifyUri ( Uri webHookUri ) : void

Verifies that the webHookUri has either an 'http' or 'https' scheme.

Private Methods

Méthode Description
GetWorkItems ( ICollection webHooks, ICollection notifications ) : IEnumerable
WebHookManager ( IWebHookStore webHookStore, IWebHookSender webHookSender, ILogger logger, HttpClient httpClient ) : System

Initialize a new instance of the WebHookManager with the given httpClient. This constructor is intended for unit testing purposes.

Method Details

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

NotifyAllAsync() public méthode

public NotifyAllAsync ( IEnumerable notifications, Func predicate ) : Task
notifications IEnumerable
predicate Func
Résultat Task

NotifyAsync() public méthode

public NotifyAsync ( string user, IEnumerable notifications, Func predicate ) : Task
user string
notifications IEnumerable
predicate Func
Résultat Task

VerifyEchoAsync() protected méthode

Verifies the WebHook by submitting a GET request with a query token intended by the echoed back.
protected VerifyEchoAsync ( WebHook webHook ) : System.Threading.Tasks.Task
webHook WebHook The to verify.
Résultat System.Threading.Tasks.Task

VerifySecret() protected méthode

Verifies that the WebHook secret is between 32 and 64 characters long.
protected VerifySecret ( string secret ) : void
secret string The secret to validate.
Résultat void

VerifyUri() protected méthode

Verifies that the webHookUri has either an 'http' or 'https' scheme.
protected VerifyUri ( Uri webHookUri ) : void
webHookUri System.Uri The URI to verify.
Résultat void

VerifyWebHookAsync() public méthode

public VerifyWebHookAsync ( WebHook webHook ) : System.Threading.Tasks.Task
webHook WebHook
Résultat System.Threading.Tasks.Task

WebHookManager() public méthode

Initialize a new instance of the WebHookManager with a default retry policy.
public WebHookManager ( IWebHookStore webHookStore, IWebHookSender webHookSender, ILogger logger ) : System
webHookStore IWebHookStore The current .
webHookSender IWebHookSender The current .
logger ILogger The current .
Résultat System