AutoActivationExtensions.AddActivatedSingleton Metoda

Definice

Přetížení

AddActivatedSingleton(IServiceCollection, Type)

Přidá automaticky aktivovanou jednoúčelovou službu typu zadaného v serviceType k zadanému IServiceCollectionobjektu .

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

Přidá automaticky aktivovanou jednoúčelovou službu.

AddActivatedSingleton(IServiceCollection, Type, Type)

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Přidá automaticky aktivovanou jednoúčelovou službu.

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Přidá automaticky aktivovanou jednoúčelovou službu.

AddActivatedSingleton<TService>(IServiceCollection)

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Přidá automaticky aktivovanou jednoúčelovou službu.

AddActivatedSingleton(IServiceCollection, Type)

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu typu zadaného v serviceType k zadanému IServiceCollectionobjektu .

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

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

serviceType
Type

Typ služby, která se má zaregistrovat, a implementace, která se má použít.

Návraty

Hodnota .services

Platí pro

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

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

serviceType
Type

Typ služby, která se má zaregistrovat.

implementationFactory
Func<IServiceProvider,Object>

Továrna, která vytváří službu.

Návraty

Hodnota .services

Platí pro

AddActivatedSingleton(IServiceCollection, Type, Type)

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

serviceType
Type

Typ služby, která se má zaregistrovat.

implementationType
Type

Typ implementace služby.

Návraty

Hodnota .services

Platí pro

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

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry typu

TService

Typ služby, která se má přidat.

TImplementation

Typ implementace, která se má použít.

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

implementationFactory
Func<IServiceProvider,TImplementation>

Továrna, která vytváří službu.

Návraty

Hodnota .services

Platí pro

AddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry typu

TService

Typ služby, která se má přidat.

TImplementation

Typ implementace, která se má použít.

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

Návraty

Hodnota .services

Platí pro

AddActivatedSingleton<TService>(IServiceCollection)

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry typu

TService

Typ služby, která se má přidat.

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

Návraty

Hodnota .services

Platí pro

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

Zdroj:
AutoActivationExtensions.cs
Zdroj:
AutoActivationExtensions.cs

Přidá automaticky aktivovanou jednoúčelovou službu.

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

Parametry typu

TService

Typ služby, která se má přidat.

Parametry

services
IServiceCollection

Kolekce služeb, do které chcete službu přidat.

implementationFactory
Func<IServiceProvider,TService>

Továrna, která vytváří službu.

Návraty

Hodnota .services

Platí pro