Compartir a través de


ServiceCollectionMap.TryAddScopedEnumerable Método

Definición

Sobrecargas

TryAddScopedEnumerable(Type, Type)

Agrega un Scoped 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.

TryAddScopedEnumerable<TService,TImplementation>()

Agrega un Scoped 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.

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

Agrega un Scoped 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.

TryAddScopedEnumerable(Type, Type)

Agrega un Scoped 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 TryAddScopedEnumerable (Type serviceType, Type implementationType);
abstract member TryAddScopedEnumerable : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddScopedEnumerable : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddScopedEnumerable (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

TryAddScopedEnumerable<TService,TImplementation>()

Agrega un Scoped 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 TryAddScopedEnumerable<TService,TImplementation> () where TService : class where TImplementation : class, TService;
abstract member TryAddScopedEnumerable : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddScopedEnumerable : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddScopedEnumerable(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

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

Agrega un Scoped 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 TryAddScopedEnumerable<TService,TImplementation> (Func<IServiceProvider,TImplementation> factory) where TService : class where TImplementation : class, TService;
abstract member TryAddScopedEnumerable : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddScopedEnumerable : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddScopedEnumerable(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