AutoActivationExtensions.AddActivatedSingleton Método

Definição

Sobrecargas

AddActivatedSingleton(IServiceCollection, Type)

Adiciona um serviço singleton ativado automaticamente do tipo especificado em serviceType ao especificado IServiceCollection.

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

Adiciona um serviço singleton ativado automaticamente.

AddActivatedSingleton(IServiceCollection, Type, Type)

Adiciona um serviço singleton ativado automaticamente.

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

Adiciona um serviço singleton ativado automaticamente.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Adiciona um serviço singleton ativado automaticamente.

AddActivatedSingleton<TService>(IServiceCollection)

Adiciona um serviço singleton ativado automaticamente.

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

Adiciona um serviço singleton ativado automaticamente.

AddActivatedSingleton(IServiceCollection, Type)

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado automaticamente do tipo especificado em serviceType ao especificado 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

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

serviceType
Type

O tipo de serviço a ser registrado e a implementação a ser usada.

Retornos

O valor de services.

Aplica-se a

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

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

serviceType
Type

O tipo do serviço a ser registrado.

implementationFactory
Func<IServiceProvider,Object>

O alocador que cria o serviço.

Retornos

O valor de services.

Aplica-se a

AddActivatedSingleton(IServiceCollection, Type, Type)

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

serviceType
Type

O tipo do serviço a ser registrado.

implementationType
Type

O tipo de implementação do serviço.

Retornos

O valor de services.

Aplica-se a

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

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros de tipo

TService

O tipo do serviço a adicionar.

TImplementation

O tipo da implementação a ser usada.

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

implementationFactory
Func<IServiceProvider,TImplementation>

O alocador que cria o serviço.

Retornos

O valor de services.

Aplica-se a

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros de tipo

TService

O tipo do serviço a adicionar.

TImplementation

O tipo da implementação a ser usada.

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

Retornos

O valor de services.

Aplica-se a

AddActivatedSingleton<TService>(IServiceCollection)

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros de tipo

TService

O tipo do serviço a adicionar.

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

Retornos

O valor de services.

Aplica-se a

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

Origem:
AutoActivationExtensions.cs
Origem:
AutoActivationExtensions.cs

Adiciona um serviço singleton ativado 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

Parâmetros de tipo

TService

O tipo do serviço a adicionar.

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar o serviço.

implementationFactory
Func<IServiceProvider,TService>

O alocador que cria o serviço.

Retornos

O valor de services.

Aplica-se a