Compartir a través de


IContainerBuilder.AddService Método

Definición

Sobrecargas

AddService(ServiceLifetime, Type, Func<IServiceProvider,Object>)

Agrega un servicio de serviceType con .implementationFactory

AddService(ServiceLifetime, Type, Type)

Agrega un servicio de serviceType con .implementationType

AddService(ServiceLifetime, Type, Func<IServiceProvider,Object>)

Agrega un servicio de serviceType con .implementationFactory

public Microsoft.OData.IContainerBuilder AddService (Microsoft.OData.ServiceLifetime lifetime, Type serviceType, Func<IServiceProvider,object> implementationFactory);
abstract member AddService : Microsoft.OData.ServiceLifetime * Type * Func<IServiceProvider, obj> -> Microsoft.OData.IContainerBuilder
Public Function AddService (lifetime As ServiceLifetime, serviceType As Type, implementationFactory As Func(Of IServiceProvider, Object)) As IContainerBuilder

Parámetros

lifetime
ServiceLifetime

Duración del servicio que se va a registrar.

serviceType
Type

El tipo de servicio que se va a registrar.

implementationFactory
Func<IServiceProvider,Object>

El generador que crea el servicio.

Devoluciones

La IContainerBuilder propia instancia.

Se aplica a

AddService(ServiceLifetime, Type, Type)

Agrega un servicio de serviceType con .implementationType

public Microsoft.OData.IContainerBuilder AddService (Microsoft.OData.ServiceLifetime lifetime, Type serviceType, Type implementationType);
abstract member AddService : Microsoft.OData.ServiceLifetime * Type * Type -> Microsoft.OData.IContainerBuilder
Public Function AddService (lifetime As ServiceLifetime, serviceType As Type, implementationType As Type) As IContainerBuilder

Parámetros

lifetime
ServiceLifetime

Duración del servicio que se va a registrar.

serviceType
Type

El tipo de servicio que se va a registrar.

implementationType
Type

El tipo de implementación del servicio.

Devoluciones

La IContainerBuilder propia instancia.

Se aplica a