Aracılığıyla paylaş


ServiceCollectionMap.TryAddScopedEnumerable Yöntem

Tanım

Aşırı Yüklemeler

TryAddScopedEnumerable(Type, Type)

Verilen somut tür tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

TryAddScopedEnumerable<TService,TImplementation>()

Verilen somut tür tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

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

Verilen fabrika tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

TryAddScopedEnumerable(Type, Type)

Verilen somut tür tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

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

Parametreler

serviceType
Type

Hizmetin sözleşmesi.

implementationType
Type

Hizmeti uygulayan somut tür.

Döndürülenler

Harita, başka çağrıların zincirlenmesine neden olabilir.

Şunlara uygulanır

TryAddScopedEnumerable<TService,TImplementation>()

Verilen somut tür tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

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

Tür Parametreleri

TService

Hizmetin sözleşmesi.

TImplementation

Hizmeti uygulayan somut tür.

Döndürülenler

Harita, başka çağrıların zincirlenmesine neden olabilir.

Şunlara uygulanır

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

Verilen fabrika tarafından uygulanan bir Scoped hizmeti, verilen sözleşmeyi uygulayan hizmetler listesine ekler. Hizmet yalnızca koleksiyon aynı hizmet ve uygulama türü için başka kayıt içermiyorsa eklenir.

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

Tür Parametreleri

TService

Hizmetin sözleşmesi.

TImplementation

Hizmeti uygulayan somut tür.

Parametreler

factory
Func<IServiceProvider,TImplementation>

Bu hizmeti uygulayan fabrika.

Döndürülenler

Harita, başka çağrıların zincirlenmesine neden olabilir.

Şunlara uygulanır