Class WebhookEventHandlerServiceCollectionExtensions
- Namespace
- NetCord.Hosting.AspNetCore
- Assembly
- NetCord.Hosting.AspNetCore.dll
public static class WebhookEventHandlerServiceCollectionExtensions
- Inheritance
-
WebhookEventHandlerServiceCollectionExtensions
- Inherited Members
Methods
AddWebhookEventHandler<T>(IServiceCollection)
Adds an IWebhookEventHandler<T> to the specified IServiceCollection.
public static IServiceCollection AddWebhookEventHandler<T>(this IServiceCollection services) where T : class, IWebhookEventHandlerBase
Parameters
services
IServiceCollectionThe IServiceCollection to add the IWebhookEventHandler<T> to.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IWebhookEventHandler<T> to add.
AddWebhookEventHandler<T>(IServiceCollection, Delegate)
Adds an IWebhookEventHandler<T> to the specified IServiceCollection.
public static IServiceCollection AddWebhookEventHandler<T>(this IServiceCollection services, Delegate handler)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IWebhookEventHandler<T> to.
handler
DelegateThe delegate that represents the handler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
AddWebhookEventHandler<T>(IServiceCollection, Func<IServiceProvider, T>)
Adds an IWebhookEventHandler<T> to the specified IServiceCollection.
public static IServiceCollection AddWebhookEventHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) where T : class, IWebhookEventHandlerBase
Parameters
services
IServiceCollectionThe IServiceCollection to add the IWebhookEventHandler<T> to.
implementationFactory
Func<IServiceProvider, T>The factory that creates the IWebhookEventHandler<T>.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IWebhookEventHandler<T> to add.
AddWebhookEventHandlers(IServiceCollection, Assembly)
Adds all IWebhookEventHandler<T> implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddWebhookEventHandlers(this IServiceCollection services, Assembly assembly)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IWebhookEventHandler<T> implementations to.
assembly
AssemblyThe assembly to scan for IWebhookEventHandler<T> implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.