Compartir a través de


ServiceCollectionMap.TryAddTransientEnumerable Método

Definición

Sobrecargas

TryAddTransientEnumerable(Type, Type)

Agrega un Transient servicio implementado por el tipo concreto dado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

TryAddTransientEnumerable<TService,TImplementation>()

Agrega un Transient servicio implementado por el tipo concreto dado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

TryAddTransientEnumerable<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Agrega un Transient servicio implementado por el generador especificado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

TryAddTransientEnumerable(Type, Type)

Agrega un Transient servicio implementado por el tipo concreto dado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransientEnumerable (Type serviceType, Type implementationType);
abstract member TryAddTransientEnumerable : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddTransientEnumerable : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddTransientEnumerable (serviceType As Type, implementationType As Type) As ServiceCollectionMap

Parámetros

serviceType
Type

Contrato para el servicio.

implementationType
Type

Tipo concreto que implementa el servicio.

Devoluciones

El mapa, de modo que se puedan encadenar más llamadas.

Se aplica a

TryAddTransientEnumerable<TService,TImplementation>()

Agrega un Transient servicio implementado por el tipo concreto dado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransientEnumerable<TService,TImplementation> () where TService : class where TImplementation : class, TService;
abstract member TryAddTransientEnumerable : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddTransientEnumerable : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddTransientEnumerable(Of TService As Class, TImplementation As Class) () As ServiceCollectionMap

Parámetros de tipo

TService

Contrato para el servicio.

TImplementation

Tipo concreto que implementa el servicio.

Devoluciones

El mapa, de modo que se puedan encadenar más llamadas.

Se aplica a

TryAddTransientEnumerable<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Agrega un Transient servicio implementado por el generador especificado a la lista de servicios que implementan el contrato especificado. El servicio solo se agrega si la colección no contiene ningún otro registro para el mismo servicio y tipo de implementación.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransientEnumerable<TService,TImplementation> (Func<IServiceProvider,TImplementation> factory) where TService : class where TImplementation : class, TService;
abstract member TryAddTransientEnumerable : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddTransientEnumerable : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddTransientEnumerable(Of TService As Class, TImplementation As Class) (factory As Func(Of IServiceProvider, TImplementation)) As ServiceCollectionMap

Parámetros de tipo

TService

Contrato para el servicio.

TImplementation

Tipo concreto que implementa el servicio.

Parámetros

factory
Func<IServiceProvider,TImplementation>

Generador que implementa este servicio.

Devoluciones

El mapa, de modo que se puedan encadenar más llamadas.

Se aplica a