다음을 통해 공유


ProvidersHelper.InstantiateProvider(ProviderSettings, Type) 메서드

정의

제공된 설정을 사용하는 특정 형식의 단일 공급자를 초기화하고 반환합니다.

public:
 static System::Configuration::Provider::ProviderBase ^ InstantiateProvider(System::Configuration::ProviderSettings ^ providerSettings, Type ^ providerType);
public static System.Configuration.Provider.ProviderBase InstantiateProvider (System.Configuration.ProviderSettings providerSettings, Type providerType);
static member InstantiateProvider : System.Configuration.ProviderSettings * Type -> System.Configuration.Provider.ProviderBase
Public Shared Function InstantiateProvider (providerSettings As ProviderSettings, providerType As Type) As ProviderBase

매개 변수

providerSettings
ProviderSettings

초기화할 때 공급자에게 전달할 설정입니다.

providerType
Type

초기화할 공급자의 Type입니다.

반환

ProviderBase

제공된 설정을 사용하는 특정 형식의 새 공급자입니다.

예외

구성에 정의된 공급자 형식이 null이거나 빈 문자열("")인 경우

또는 새 공급자 인스턴스 생성 기능에 사용되는 형식이 구성에 정의된 공급자 형식과 호환되지 않는 경우

공급자가 초기화되는 동안 예외를 throw한 경우

또는 providerSettings에 지정된 공급자에 대해 Type 인스턴스를 확인하는 동안 오류가 발생한 경우

적용 대상