IDTSComponentMetaData100.Instantiate 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
속성에 의해 ComponentClassID 지정된 컴포넌트 인스턴스를 생성합니다.
public:
Microsoft::SqlServer::Dts::Pipeline::Wrapper::CManagedComponentWrapper ^ Instantiate();
[System.Runtime.InteropServices.DispId(104)]
public Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapper Instantiate();
[<System.Runtime.InteropServices.DispId(104)>]
abstract member Instantiate : unit -> Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapper
Public Function Instantiate () As CManagedComponentWrapper
반품
컴포넌트의 클래스입니다 CManagedComponentWrapper .
- 특성
예제
다음 코드 샘플은 컴포넌트의 설계 시 인스턴스를 사용하여 컴포넌트의 커스텀 속성을 설정하는 방식을 보여줍니다. 이 예시 CustomPropertyCollection 에서는 컴포넌트 메타데이터를 사용해 속성을 직접 설정할 수 있지만, 컴포넌트가 속성 변경을 모니터링하고 대응하는 기능은 우회할 수 있습니다.
IDTSComponentMetaData100 cmp = dataflowTask.ComponentMetaDataCollection.New();
cmp.ComponentClassID = "DTSAdapter.OleDbSource";
CManagedComponentWrapper dtSource = cmp.Instantiate();
dtSource.SetComponentProperty("SqlCommand","select * from Production.Products");
Dim cmp As IDTSComponentMetaData100 = dataflowTask.ComponentMetaDataCollection.New
cmp.ComponentClassID = "DTSAdapter.OleDbSource"
Dim dtSource As CManagedComponentWrapper = cmp.Instantiate
dtSource.SetComponentProperty("SqlCommand", "select * from Production.Products")
설명
이 메서드가 호출되면, 해당 속성에 ComponentClassID 의해 정의된 컴포넌트의 설계 시 인스턴스가 생성됩니다. 컴포넌트의 설계 시 인스턴스는 컴포넌트의 메타데이터를 편집하고 구성하기 위해 생성됩니다. 설계 시 인스턴스는 컴포넌트를 직접 메타데이터에 접근하는 대신 편집하는 데 사용해야 하며, 이는 컴포넌트가 메타데이터의 변경 사항을 모니터링하고 검증할 수 있도록 해야 합니다.