다음을 통해 공유


AutoActivationExtensions.TryAddActivatedSingleton 메서드

정의

오버로드

TryAddActivatedSingleton(IServiceCollection, Type)

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

TryAddActivatedSingleton(IServiceCollection, Type, Type)

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

TryAddActivatedSingleton<TService>(IServiceCollection)

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

TryAddActivatedSingleton(IServiceCollection, Type)

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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)

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

serviceType
Type

등록할 서비스의 유형입니다.

적용 대상

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

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

serviceType
Type

등록할 서비스의 유형입니다.

implementationFactory
Func<IServiceProvider,Object>

서비스를 만드는 팩터리입니다.

적용 대상

TryAddActivatedSingleton(IServiceCollection, Type, Type)

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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)

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

serviceType
Type

등록할 서비스의 유형입니다.

implementationType
Type

서비스의 구현 유형입니다.

적용 대상

TryAddActivatedSingleton<TService,TImplementation>(IServiceCollection)

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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)

형식 매개 변수

TService

추가할 서비스 유형입니다.

TImplementation

사용할 구현의 형식입니다.

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

적용 대상

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

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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

형식 매개 변수

TService

추가할 서비스 유형입니다.

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

implementationFactory
Func<IServiceProvider,TService>

서비스를 만드는 팩터리입니다.

적용 대상

TryAddActivatedSingleton<TService>(IServiceCollection)

Source:
AutoActivationExtensions.cs
Source:
AutoActivationExtensions.cs

자동 활성화된 싱글톤 서비스를 추가하려고 시도합니다.

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)

형식 매개 변수

TService

추가할 서비스 유형입니다.

매개 변수

services
IServiceCollection

서비스를 추가할 서비스 컬렉션입니다.

적용 대상