IDTSDesigntimeComponent90.ProvideComponentProperties Method
Initializes the ComponentMetaData of the component when a component is first added to the data flow task.
命名空間: Microsoft.SqlServer.Dts.Pipeline.Wrapper
組件: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)
語法
'宣告
<DispIdAttribute(11)> _
Sub ProvideComponentProperties
[DispIdAttribute(11)]
void ProvideComponentProperties ()
[DispIdAttribute(11)]
void ProvideComponentProperties ()
/** @attribute DispIdAttribute(11) */
void ProvideComponentProperties ()
DispIdAttribute(11)
function ProvideComponentProperties ()
備註
This method is called when a component is added to a data flow task for the first time. 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.
When programmatically adding components to the data flow task, you call this method after adding the component to the ComponentMetaDataCollection, setting the ComponentClassID property, and instantiating the design-time instance of the component.
範例
The following example creates a data flow task, adds the OLE DB source component to the task, instantiates the design-time instance of the component, and then calls ProvideComponentProperties.
Package p = new Package();
MainPipe dataFlow = ((TaskHost)p.Executables.Add("DTS.Pipeline")).InnerObject as MainPipe;
IDTSComponentMetaData90 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 IDTSComponentMetaData90 = dataFlow.ComponentMetaDataCollection.New
md.ComponentClassID = "DTSAdapter.OleDbSource"
Dim wrp As CManagedComponentWrapper = md.Instantiate
wrp.ProvideComponentProperties
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
IDTSDesigntimeComponent90 Interface
IDTSDesigntimeComponent90 Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace