Aracılığıyla paylaş


ServiceCollectionMap.TryAddScoped Yöntem

Tanım

Aşırı Yüklemeler

TryAddScoped(Type, Func<IServiceProvider,Object>)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

TryAddScoped(Type, Type)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen somut tür tarafından uygulanan bir hizmet ekler.

TryAddScoped<TService,TImplementation>()

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen somut tür tarafından uygulanan bir hizmet ekler.

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

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

TryAddScoped<TService>(Func<IServiceProvider,TService>)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

TryAddScoped(Type, Func<IServiceProvider,Object>)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped (Type serviceType, Func<IServiceProvider,object> factory);
abstract member TryAddScoped : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddScoped : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddScoped (serviceType As Type, factory As Func(Of IServiceProvider, Object)) As ServiceCollectionMap

Parametreler

serviceType
Type

Hizmetin sözleşmesi.

factory
Func<IServiceProvider,Object>

Hizmeti uygulayan fabrika.

Döndürülenler

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

Şunlara uygulanır

TryAddScoped(Type, Type)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen somut tür tarafından uygulanan bir hizmet ekler.

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

TryAddScoped<TService,TImplementation>()

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen somut tür tarafından uygulanan bir hizmet ekler.

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

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

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

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

Tür Parametreleri

TService

Hizmetin sözleşmesi.

TImplementation

Verilen fabrikanın oluşturduğu beton türü.

Parametreler

factory
Func<IServiceProvider,TImplementation>

Hizmeti uygulayan fabrika.

Döndürülenler

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

Şunlara uygulanır

TryAddScoped<TService>(Func<IServiceProvider,TService>)

Scoped Belirtilen hizmet türü için hiçbir hizmet zaten kaydedilmemişse, verilen fabrika tarafından uygulanan bir hizmet ekler.

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

Tür Parametreleri

TService

Hizmetin sözleşmesi.

Parametreler

factory
Func<IServiceProvider,TService>

Hizmeti uygulayan fabrika.

Döndürülenler

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

Şunlara uygulanır