IDTSDesigntimeComponent100.ProvideComponentProperties 方法

定义

当首先将组件添加到数据流任务时,初始化组件的 ComponentMetaData

public:
 void ProvideComponentProperties();
[System.Runtime.InteropServices.DispId(11)]
public void ProvideComponentProperties ();
[<System.Runtime.InteropServices.DispId(11)>]
abstract member ProvideComponentProperties : unit -> unit
Public Sub ProvideComponentProperties ()
属性

示例

以下示例创建数据流任务,将 OLE DB 源组件添加到该任务,实例化组件的设计时实例,然后调用 ProvideComponentProperties

Package p = new Package();  
MainPipe dataFlow = ((TaskHost)p.Executables.Add("DTS.Pipeline")).InnerObject as MainPipe;  

IDTSComponentMetaData100 md = dataFlow.ComponentMetaDataCollection.New();  
md.ComponentClassID = "DTSAdapter.OleDbSource";  
CManagedComponentWrapper wrp = md.Instantiate();  
wrp.ProvideComponentProperties();  
Dim p As Package = New Package   
Dim dataFlow As MainPipe = CType(CType(p.Executables.Add("DTS.Pipeline"), TaskHost).InnerObject, MainPipe)   
Dim md As IDTSComponentMetaData100 = dataFlow.ComponentMetaDataCollection.New   
md.ComponentClassID = "DTSAdapter.OleDbSource"   
Dim wrp As CManagedComponentWrapper = md.Instantiate   
wrp.ProvideComponentProperties  

注解

当组件首次添加到数据流任务时,将调用此方法。 它类似于构造函数,是初始化组件的方法。 组件应在此方法期间添加其输入、输出和自定义属性。

以编程方式将组件添加到数据流任务时,在将组件添加到 ComponentMetaDataCollection、设置 ComponentClassID 属性和实例化组件的设计时实例后,调用此方法。

适用于