PipelineComponent.ProvideComponentProperties 方法

定义

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

public:
 virtual void ProvideComponentProperties();
public virtual void ProvideComponentProperties ();
abstract member ProvideComponentProperties : unit -> unit
override this.ProvideComponentProperties : unit -> unit
Public Overridable Sub ProvideComponentProperties ()

示例

public override void ProvideComponentProperties()  
{  
    // Reset the component.  
    base.RemoveAllInputsOutputsAndCustomProperties();  
    IDTSInput100 input = ComponentMetaData.InputCollection.New();  
    input.Name = "Input";  

    IDTSOutput100 output = ComponentMetaDAta.OutputCollection.New();  
    output.Name = "Output";  
    output.SynchronousInputID = input.ID;  

    IDTSCustomProperty100 property = ComponentMetaData.CustomPropertyCollection.New();  
    property.Name = "RuntimeVariable";  
    property.Description = "Identifies a Variable in the package.";  
}  
Public Overrides Sub ProvideComponentProperties()   
 MyBase.RemoveAllInputsOutputsAndCustomProperties   
 Dim input As IDTSInput100 = ComponentMetaData.InputCollection.New   
 input.Name = "Input"   
 Dim output As IDTSOutput100 = ComponentMetaDAta.OutputCollection.New   
 output.Name = "Output"   
 output.SynchronousInputID = input.ID   
 Dim property As IDTSCustomProperty100 = ComponentMetaData.CustomPropertyCollection.New   
 property.Name = "RuntimeVariable"   
 property.Description = "Identifies a Variable in the package."   
End Sub  

注解

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

基类将同步 IDTSInput100IDTSOutput100 对象添加到 ComponentMetaData.

有关详细信息,请参阅数据流组件的设计时方法

适用于