Class GatewayHandlerServiceCollectionExtensions
public static class GatewayHandlerServiceCollectionExtensions
- Inheritance
-
GatewayHandlerServiceCollectionExtensions
- Inherited Members
Methods
AddGatewayHandler(IServiceCollection, GatewayEvent, Delegate, ServiceLifetime)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler(this IServiceCollection services, GatewayEvent gatewayEvent, Delegate handler, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
gatewayEventGatewayEventThe gateway event.
handlerDelegateThe delegate that represents the handler.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddGatewayHandler(IServiceCollection, Type, ServiceLifetime)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler(this IServiceCollection services, Type handlerType, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
handlerTypeTypeThe type of the IGatewayHandler to add.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddGatewayHandler<T>(IServiceCollection, ServiceLifetime)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IGatewayHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IGatewayHandler to add.
AddGatewayHandler<T>(IServiceCollection, GatewayEvent<T>, Delegate, ServiceLifetime)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services, GatewayEvent<T> gatewayEvent, Delegate handler, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
gatewayEventGatewayEvent<T>The gateway event.
handlerDelegateThe delegate that represents the handler.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the event handler argument.
AddGatewayHandler<T>(IServiceCollection, Func<IServiceProvider, T>, ServiceLifetime)
Adds an IGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IGatewayHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler to.
implementationFactoryFunc<IServiceProvider, T>The factory that creates the IGatewayHandler.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IGatewayHandler to add.
AddGatewayHandlers(IServiceCollection, Assembly, ServiceLifetime)
Adds all public IGatewayHandler implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddGatewayHandlers(this IServiceCollection services, Assembly assembly, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IGatewayHandler implementations to.
assemblyAssemblyThe assembly to scan for IGatewayHandler implementations.
lifetimeServiceLifetimeThe ServiceLifetime of the IGatewayHandler implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddShardedGatewayHandler(IServiceCollection, GatewayEvent, Delegate, ServiceLifetime)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler(this IServiceCollection services, GatewayEvent gatewayEvent, Delegate handler, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
gatewayEventGatewayEventThe gateway event.
handlerDelegateThe delegate that represents the handler.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddShardedGatewayHandler(IServiceCollection, Type, ServiceLifetime)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler(this IServiceCollection services, Type handlerType, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
handlerTypeTypeThe type of the IShardedGatewayHandler to add.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddShardedGatewayHandler<T>(IServiceCollection, ServiceLifetime)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IShardedGatewayHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IShardedGatewayHandler to add.
AddShardedGatewayHandler<T>(IServiceCollection, GatewayEvent<T>, Delegate, ServiceLifetime)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services, GatewayEvent<T> gatewayEvent, Delegate handler, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
gatewayEventGatewayEvent<T>The gateway event.
handlerDelegateThe delegate that represents the handler.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the event handler argument.
AddShardedGatewayHandler<T>(IServiceCollection, Func<IServiceProvider, T>, ServiceLifetime)
Adds an IShardedGatewayHandler to the specified IServiceCollection.
public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IShardedGatewayHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler to.
implementationFactoryFunc<IServiceProvider, T>The factory that creates the IShardedGatewayHandler.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IShardedGatewayHandler to add.
AddShardedGatewayHandlers(IServiceCollection, Assembly, ServiceLifetime)
Adds all public IShardedGatewayHandler implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddShardedGatewayHandlers(this IServiceCollection services, Assembly assembly, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IShardedGatewayHandler implementations to.
assemblyAssemblyThe assembly to scan for IShardedGatewayHandler implementations.
lifetimeServiceLifetimeThe ServiceLifetime of the IShardedGatewayHandler implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.