다음을 통해 공유


ProvideComponentProperties 메서드

Called when a component is first added to the data flow task, to initialize the ComponentMetaData of the component.

네임스페이스:  Microsoft.SqlServer.Dts.Pipeline
어셈블리:  Microsoft.SqlServer.PipelineHost.dll의 Microsoft.SqlServer.PipelineHost

구문

‘선언
Public Overridable Sub ProvideComponentProperties
‘사용 방법
Dim instance As PipelineComponent

instance.ProvideComponentProperties()
public virtual void ProvideComponentProperties()
public:
virtual void ProvideComponentProperties()
abstract ProvideComponentProperties : unit -> unit 
override ProvideComponentProperties : unit -> unit 
public function ProvideComponentProperties()

주의

This method is called when a component is first added to a data flow task. It is similar to a constructor and is the method that initializes a component. Components should add their inputs, outputs, and custom properties during this method.

The base class adds synchronous IDTSInput100 and IDTSOutput100 object to the ComponentMetaData.

For more information, see 데이터 흐름 구성 요소의 디자인 타임 메서드.

예제

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