ServiceCollectionDescriptorExtensions.TryAddEnumerable 메서드

정의

오버로드

TryAddEnumerable(IServiceCollection, ServiceDescriptor)

기존 설명자와 ServiceDescriptor이 동일하고 ServiceType에 아직 구현이 없는 경우 services..를 추가합니다.Adds a ServiceDescriptor if an existing descriptor with the same ServiceType and an implementation that does not already exist in services...

TryAddEnumerable(IServiceCollection, IEnumerable<ServiceDescriptor>)

기존 설명자와 ServiceDescriptor이 동일하고 ServiceType에 아직 구현이 없는 경우 지정된 services..를 추가합니다.Adds the specified ServiceDescriptors if an existing descriptor with the same ServiceType and an implementation that does not already exist in services...

TryAddEnumerable(IServiceCollection, ServiceDescriptor)

기존 설명자와 ServiceDescriptor이 동일하고 ServiceType에 아직 구현이 없는 경우 services..를 추가합니다.Adds a ServiceDescriptor if an existing descriptor with the same ServiceType and an implementation that does not already exist in services...

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAddEnumerable(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ descriptor);
public static void TryAddEnumerable (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor);
static member TryAddEnumerable : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.DependencyInjection.ServiceDescriptor -> unit
<Extension()>
Public Sub TryAddEnumerable (services As IServiceCollection, descriptor As ServiceDescriptor)

매개 변수

설명

동일한 서비스 유형의 여러 등록을 지 원하는 서비스 형식의 서비스 구현을 등록할 때 TryAddEnumerable(IServiceCollection, ServiceDescriptor)을 사용 합니다.Use TryAddEnumerable(IServiceCollection, ServiceDescriptor) when registering a service implementation of a service type that supports multiple registrations of the same service type. Add(IServiceCollection, ServiceDescriptor) 사용은 idempotent 되지 않으며, 두 번 호출 된 경우 중복 ServiceDescriptor 인스턴스를 추가할 수 있습니다.Using Add(IServiceCollection, ServiceDescriptor) is not idempotent and can add duplicate ServiceDescriptor instances if called twice. TryAddEnumerable(IServiceCollection, ServiceDescriptor)를 사용 하면 여러 구현 형식이 등록 되지 않습니다.Using TryAddEnumerable(IServiceCollection, ServiceDescriptor) will prevent registration of multiple implementation types.

TryAddEnumerable(IServiceCollection, IEnumerable<ServiceDescriptor>)

기존 설명자와 ServiceDescriptor이 동일하고 ServiceType에 아직 구현이 없는 경우 지정된 services..를 추가합니다.Adds the specified ServiceDescriptors if an existing descriptor with the same ServiceType and an implementation that does not already exist in services...

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAddEnumerable(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^> ^ descriptors);
public static void TryAddEnumerable (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> descriptors);
static member TryAddEnumerable : Microsoft.Extensions.DependencyInjection.IServiceCollection * seq<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> -> unit
<Extension()>
Public Sub TryAddEnumerable (services As IServiceCollection, descriptors As IEnumerable(Of ServiceDescriptor))

매개 변수

설명

동일한 서비스 유형의 여러 등록을 지 원하는 서비스 형식의 서비스 구현을 등록할 때 TryAddEnumerable(IServiceCollection, ServiceDescriptor)을 사용 합니다.Use TryAddEnumerable(IServiceCollection, ServiceDescriptor) when registering a service implementation of a service type that supports multiple registrations of the same service type. Add(IServiceCollection, ServiceDescriptor) 사용은 idempotent 되지 않으며, 두 번 호출 된 경우 중복 ServiceDescriptor 인스턴스를 추가할 수 있습니다.Using Add(IServiceCollection, ServiceDescriptor) is not idempotent and can add duplicate ServiceDescriptor instances if called twice. TryAddEnumerable(IServiceCollection, ServiceDescriptor)를 사용 하면 여러 구현 형식이 등록 되지 않습니다.Using TryAddEnumerable(IServiceCollection, ServiceDescriptor) will prevent registration of multiple implementation types.

적용 대상