Condividi tramite


AutoActivationExtensions.AddActivatedSingleton Metodo

Definizione

Overload

AddActivatedSingleton(IServiceCollection, Type)

Aggiunge un servizio singleton attivato automaticamente del tipo specificato in serviceType all'oggetto specificato IServiceCollection.

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

Aggiunge un servizio singleton attivato automaticamente.

AddActivatedSingleton(IServiceCollection, Type, Type)

Aggiunge un servizio singleton attivato automaticamente.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Aggiunge un servizio singleton attivato automaticamente.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Aggiunge un servizio singleton attivato automaticamente.

AddActivatedSingleton<TService>(IServiceCollection)

Aggiunge un servizio singleton attivato automaticamente.

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

Aggiunge un servizio singleton attivato automaticamente.

AddActivatedSingleton(IServiceCollection, Type)

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente del tipo specificato in serviceType all'oggetto specificato IServiceCollection.

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

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

serviceType
Type

Tipo di servizio da registrare e implementazione da usare.

Restituisce

Valore di services.

Si applica a

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

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

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

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.

Restituisce

Valore di services.

Si applica a

AddActivatedSingleton(IServiceCollection, Type, Type)

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

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

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

serviceType
Type

Tipo di servizio da registrare.

implementationType
Type

Tipo di implementazione del servizio.

Restituisce

Valore di services.

Si applica a

AddActivatedSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<IServiceProvider ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddActivatedSingleton<TService,TImplementation> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<IServiceProvider,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member AddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, #'Service> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddActivatedSingleton(Of TService As Class, TImplementation As Class) (services As IServiceCollection, implementationFactory As Func(Of IServiceProvider, TImplementation)) 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.

implementationFactory
Func<IServiceProvider,TImplementation>

Factory che crea il servizio.

Restituisce

Valore di services.

Si applica a

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddActivatedSingleton(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddActivatedSingleton<TService,TImplementation> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class where TImplementation : class, TService;
static member AddActivatedSingleton : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddActivatedSingleton(Of TService As Class, TImplementation As Class) (services As IServiceCollection) 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.

Restituisce

Valore di services.

Si applica a

AddActivatedSingleton<TService>(IServiceCollection)

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

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

Parametri di tipo

TService

Tipo del servizio da aggiungere.

Parametri

services
IServiceCollection

Raccolta di servizi da aggiungere al servizio.

Restituisce

Valore di services.

Si applica a

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

Origine:
AutoActivationExtensions.cs
Origine:
AutoActivationExtensions.cs

Aggiunge un servizio singleton attivato automaticamente.

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

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.

Restituisce

Valore di services.

Si applica a