Table of Contents

Class HttpInteractionHandlerServiceCollectionExtensions

Namespace
NetCord.Hosting
Assembly
NetCord.Hosting.dll
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

services IServiceCollection

The IServiceCollection to add the IHttpInteractionHandler to.

handler Delegate

The delegate that represents the handler.

lifetime ServiceLifetime

The 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

services IServiceCollection

The IServiceCollection to add the IHttpInteractionHandler to.

handlerType Type

The type of the IHttpInteractionHandler to add.

lifetime ServiceLifetime

The 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

services IServiceCollection

The IServiceCollection to add the IHttpInteractionHandler to.

lifetime ServiceLifetime

The ServiceLifetime of the IHttpInteractionHandler.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

Type Parameters

T

The 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

services IServiceCollection

The IServiceCollection to add the IHttpInteractionHandler to.

implementationFactory Func<IServiceProvider, T>

The factory that creates the IHttpInteractionHandler.

lifetime ServiceLifetime

The ServiceLifetime of the IHttpInteractionHandler.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

Type Parameters

T

The 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

services IServiceCollection

The IServiceCollection to add the IHttpInteractionHandler implementations to.

assembly Assembly

The assembly to scan for IHttpInteractionHandler implementations.

lifetime ServiceLifetime

The ServiceLifetime of the IHttpInteractionHandler implementations.

Returns

IServiceCollection

A reference to this instance after the operation has completed.