AutoActivationExtensions.TryAddActivatedSingleton Metodo

Definizione

Overload

TryAddActivatedSingleton(IServiceCollection, Type)

Tenta di aggiungere un servizio singleton attivato automaticamente.

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

Tenta di aggiungere un servizio singleton attivato automaticamente.

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Tenta di aggiungere un servizio singleton attivato automaticamente.

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Tenta di aggiungere un servizio singleton attivato automaticamente.

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

Tenta di aggiungere un servizio singleton attivato automaticamente.

TryAddActivatedSingleton<TService>(IServiceCollection)

Tenta di aggiungere un servizio singleton attivato automaticamente.

TryAddActivatedSingleton(IServiceCollection, Type)

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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)

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

serviceType
Type

Tipo di servizio da registrare.

Si applica a

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

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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))

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

serviceType
Type

Tipo di servizio da registrare.

implementationFactory
Func<IServiceProvider,Object>

Factory che crea il servizio.

Si applica a

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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)

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

serviceType
Type

Tipo di servizio da registrare.

implementationType
Type

Tipo di implementazione del servizio.

Si applica a

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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)

Parametri di tipo

TService

Tipo del servizio da aggiungere.

TImplementation

Tipo dell'implementazione da usare.

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

Si applica a

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

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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))

Parametri di tipo

TService

Tipo del servizio da aggiungere.

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

implementationFactory
Func<IServiceProvider,TService>

Factory che crea il servizio.

Si applica a

TryAddActivatedSingleton<TService>(IServiceCollection)

Origine:
AutoActivationExtensions.cs

Tenta di aggiungere un servizio singleton attivato automaticamente.

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)

Parametri di tipo

TService

Tipo del servizio da aggiungere.

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

Si applica a