ServiceCollectionMap.TryAddSingletonEnumerable Yöntem

Tanım

Aşırı Yüklemeler

TryAddSingletonEnumerable(Type, Object)

Verilen Singleton örnek tarafından uygulanan bir 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çeriyorsa eklenir.

TryAddSingletonEnumerable(Type, Type)

Verilen Singleton somut tür tarafından uygulanan bir hizmeti, belirtilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

TryAddSingletonEnumerable<TService,TImplementation>()

Verilen Singleton somut tür tarafından uygulanan bir hizmeti, belirtilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

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

Verilen Singleton fabrikaya verilen sözleşmeyi uygulayan Hizmetler listesine uygulanan bir hizmet ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

TryAddSingletonEnumerable<TService>(TService)

Verilen Singleton örnek tarafından uygulanan bir hizmeti, verilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

TryAddSingletonEnumerable(Type, Object)

Verilen Singleton örnek tarafından uygulanan bir 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çeriyorsa eklenir.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddSingletonEnumerable (Type serviceType, object implementation);
abstract member TryAddSingletonEnumerable : Type * obj -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddSingletonEnumerable : Type * obj -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddSingletonEnumerable (serviceType As Type, implementation As Object) As ServiceCollectionMap

Parametreler

serviceType
Type

Hizmetin sözleşmesi.

implementation
Object

Hizmeti uygulayan nesne.

Döndürülenler

ServiceCollectionMap

Eşleme, daha fazla çağrı zincirlenebilir.

Şunlara uygulanır

TryAddSingletonEnumerable(Type, Type)

Verilen Singleton somut tür tarafından uygulanan bir hizmeti, belirtilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

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

Parametreler

serviceType
Type

Hizmet sözleşmesi.

implementationType
Type

Hizmeti uygulayan somut tür.

Döndürülenler

ServiceCollectionMap

Eşleme, daha fazla çağrı zincirlenebilir.

Şunlara uygulanır

TryAddSingletonEnumerable<TService,TImplementation>()

Verilen Singleton somut tür tarafından uygulanan bir hizmeti, belirtilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

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

Tür Parametreleri

TService

Hizmet sözleşmesi.

TImplementation

Hizmeti uygulayan somut tür.

Döndürülenler

ServiceCollectionMap

Eşleme, daha fazla çağrı zincirlenebilir.

Şunlara uygulanır

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

Verilen Singleton fabrikaya verilen sözleşmeyi uygulayan Hizmetler listesine uygulanan bir hizmet ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

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

Tür Parametreleri

TService

Hizmet sözleşmesi.

TImplementation

Hizmeti uygulayan somut tür.

Parametreler

factory
Func<IServiceProvider,TImplementation>

Bu hizmeti uygulayan fabrika.

Döndürülenler

ServiceCollectionMap

Eşleme, daha fazla çağrı zincirlenebilir.

Şunlara uygulanır

TryAddSingletonEnumerable<TService>(TService)

Verilen Singleton örnek tarafından uygulanan bir hizmeti, verilen sözleşmeyi uygulayan Hizmetler listesine ekler. Hizmet yalnızca koleksiyonda aynı hizmet ve uygulama türü için başka bir kayıt yoksa eklenir.

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

Tür Parametreleri

TService

Hizmet sözleşmesi.

Parametreler

implementation
TService

Hizmeti uygulayan nesne.

Döndürülenler

ServiceCollectionMap

Eşleme, daha fazla çağrı zincirlenebilir.

Şunlara uygulanır