Class GatewayHandlerServiceCollectionExtensions
public static class GatewayHandlerServiceCollectionExtensions
- Inheritance
-
GatewayHandlerServiceCollectionExtensions
- Inherited Members
Methods
AddGatewayHandler(IServiceCollection, GatewayEvent, Delegate)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler(this IServiceCollection services, GatewayEvent gatewayEvent, Delegate handler)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
gatewayEvent
GatewayEventThe gateway event.
handler
DelegateThe delegate that represents the handler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddGatewayHandler<T>(IServiceCollection)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services) where T : class, IGatewayHandler
Parameters
services
IServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IGatewayHandler to add.
AddGatewayHandler<T>(IServiceCollection, GatewayEvent<T>, Delegate)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services, GatewayEvent<T> gatewayEvent, Delegate handler)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
gatewayEvent
GatewayEvent<T>The gateway event.
handler
DelegateThe delegate that represents the handler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the event handler argument.
AddGatewayHandler<T>(IServiceCollection, Func<IServiceProvider, T>)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) where T : class, IGatewayHandler
Parameters
services
IServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
implementationFactory
Func<IServiceProvider, T>The factory that creates the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IGatewayHandler to add.
AddGatewayHandlers(IServiceCollection, Assembly)
Adds all public IGatewayHandler implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddGatewayHandlers(this IServiceCollection services, Assembly assembly)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IGatewayHandler implementations to.
assembly
AssemblyThe assembly to scan for IGatewayHandler implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddShardedGatewayHandler(IServiceCollection, GatewayEvent, Delegate)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler(this IServiceCollection services, GatewayEvent gatewayEvent, Delegate handler)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
gatewayEvent
GatewayEventThe gateway event.
handler
DelegateThe delegate that represents the handler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddShardedGatewayHandler<T>(IServiceCollection)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services) where T : class, IShardedGatewayHandler
Parameters
services
IServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IShardedGatewayHandler to add.
AddShardedGatewayHandler<T>(IServiceCollection, GatewayEvent<T>, Delegate)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services, GatewayEvent<T> gatewayEvent, Delegate handler)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
gatewayEvent
GatewayEvent<T>The gateway event.
handler
DelegateThe delegate that represents the handler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the event handler argument.
AddShardedGatewayHandler<T>(IServiceCollection, Func<IServiceProvider, T>)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) where T : class, IShardedGatewayHandler
Parameters
services
IServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
implementationFactory
Func<IServiceProvider, T>The factory that creates the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
T
The type of the IShardedGatewayHandler to add.
AddShardedGatewayHandlers(IServiceCollection, Assembly)
Adds all public IShardedGatewayHandler implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddShardedGatewayHandlers(this IServiceCollection services, Assembly assembly)
Parameters
services
IServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler implementations to.
assembly
AssemblyThe assembly to scan for IShardedGatewayHandler implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.