Aracılığıyla paylaş


AutoActivationExtensions.TryAddActivatedSingleton Yöntem

Tanım

Aşırı Yüklemeler

TryAddActivatedSingleton(IServiceCollection, Type)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton<TService>(IServiceCollection)

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

TryAddActivatedSingleton(IServiceCollection, Type)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType);
public static void TryAddActivatedSingleton (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType);
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type -> unit
<Extension()>
Public Sub TryAddActivatedSingleton (services As IServiceCollection, serviceType As Type)

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

serviceType
Type

Kaydedilecek hizmetin türü.

Şunlara uygulanır

TryAddActivatedSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType, Func<IServiceProvider ^, System::Object ^> ^ implementationFactory);
public static void TryAddActivatedSingleton (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType, Func<IServiceProvider,object> implementationFactory);
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * Func<IServiceProvider, obj> -> unit
<Extension()>
Public Sub TryAddActivatedSingleton (services As IServiceCollection, serviceType As Type, implementationFactory As Func(Of IServiceProvider, Object))

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

serviceType
Type

Kaydedilecek hizmetin türü.

implementationFactory
Func<IServiceProvider,Object>

Hizmeti oluşturan fabrika.

Şunlara uygulanır

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ serviceType, Type ^ implementationType);
public static void TryAddActivatedSingleton (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type serviceType, Type implementationType);
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * Type -> unit
<Extension()>
Public Sub TryAddActivatedSingleton (services As IServiceCollection, serviceType As Type, implementationType As Type)

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

serviceType
Type

Kaydedilecek hizmetin türü.

implementationType
Type

Hizmetin uygulama türü.

Şunlara uygulanır

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static void TryAddActivatedSingleton<TService,TImplementation> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class where TImplementation : class, TService;
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection -> unit (requires 'Service : null)
<Extension()>
Public Sub TryAddActivatedSingleton(Of TService As Class, TImplementation As Class) (services As IServiceCollection)

Tür Parametreleri

TService

Eklenecek hizmetin türü.

TImplementation

Kullanılacak uygulamanın türü.

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

Şunlara uygulanır

TryAddActivatedSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<IServiceProvider ^, TService> ^ implementationFactory);
public static void TryAddActivatedSingleton<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<IServiceProvider,TService> implementationFactory) where TService : class;
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, 'Service (requires 'Service : null)> -> unit (requires 'Service : null)
<Extension()>
Public Sub TryAddActivatedSingleton(Of TService As Class) (services As IServiceCollection, implementationFactory As Func(Of IServiceProvider, TService))

Tür Parametreleri

TService

Eklenecek hizmetin türü.

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

implementationFactory
Func<IServiceProvider,TService>

Hizmeti oluşturan fabrika.

Şunlara uygulanır

TryAddActivatedSingleton<TService>(IServiceCollection)

Kaynak:
AutoActivationExtensions.cs
Kaynak:
AutoActivationExtensions.cs

Otomatik olarak etkinleştirilmiş bir tekil hizmet eklemeye çalışır.

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static void TryAddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static void TryAddActivatedSingleton<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class;
static member TryAddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection -> unit (requires 'Service : null)
<Extension()>
Public Sub TryAddActivatedSingleton(Of TService As Class) (services As IServiceCollection)

Tür Parametreleri

TService

Eklenecek hizmetin türü.

Parametreler

services
IServiceCollection

Hizmetin ekleneceği hizmet koleksiyonu.

Şunlara uygulanır