Class HttpInteractionHandlerServiceCollectionExtensions
public static class HttpInteractionHandlerServiceCollectionExtensions
- Inheritance
-
HttpInteractionHandlerServiceCollectionExtensions
- Inherited Members
Methods
AddHttpInteractionHandler(IServiceCollection, Delegate, ServiceLifetime)
Adds an IHttpInteractionHandler to the specified IServiceCollection.
public static IServiceCollection AddHttpInteractionHandler(this IServiceCollection services, Delegate handler, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IHttpInteractionHandler to.
handlerDelegateThe delegate that represents the handler.
lifetimeServiceLifetimeThe ServiceLifetime of the IHttpInteractionHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddHttpInteractionHandler(IServiceCollection, Type, ServiceLifetime)
Adds an IHttpInteractionHandler to the specified IServiceCollection.
public static IServiceCollection AddHttpInteractionHandler(this IServiceCollection services, Type handlerType, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IHttpInteractionHandler to.
handlerTypeTypeThe type of the IHttpInteractionHandler to add.
lifetimeServiceLifetimeThe ServiceLifetime of the IHttpInteractionHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
AddHttpInteractionHandler<T>(IServiceCollection, ServiceLifetime)
Adds an IHttpInteractionHandler to the specified IServiceCollection.
public static IServiceCollection AddHttpInteractionHandler<T>(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IHttpInteractionHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IHttpInteractionHandler to.
lifetimeServiceLifetimeThe ServiceLifetime of the IHttpInteractionHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IHttpInteractionHandler to add.
AddHttpInteractionHandler<T>(IServiceCollection, Func<IServiceProvider, T>, ServiceLifetime)
Adds an IHttpInteractionHandler to the specified IServiceCollection.
public static IServiceCollection AddHttpInteractionHandler<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory, ServiceLifetime lifetime = ServiceLifetime.Singleton) where T : class, IHttpInteractionHandler
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IHttpInteractionHandler to.
implementationFactoryFunc<IServiceProvider, T>The factory that creates the IHttpInteractionHandler.
lifetimeServiceLifetimeThe ServiceLifetime of the IHttpInteractionHandler.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.
Type Parameters
TThe type of the IHttpInteractionHandler to add.
AddHttpInteractionHandlers(IServiceCollection, Assembly, ServiceLifetime)
Adds all public IHttpInteractionHandler implementations from the specified assembly to the IServiceCollection.
public static IServiceCollection AddHttpInteractionHandlers(this IServiceCollection services, Assembly assembly, ServiceLifetime lifetime = ServiceLifetime.Singleton)
Parameters
servicesIServiceCollectionThe IServiceCollection to add the IHttpInteractionHandler implementations to.
assemblyAssemblyThe assembly to scan for IHttpInteractionHandler implementations.
lifetimeServiceLifetimeThe ServiceLifetime of the IHttpInteractionHandler implementations.
Returns
- IServiceCollection
A reference to this instance after the operation has completed.