IDTSDesigntimeComponent100 介面

定義

public interface class IDTSDesigntimeComponent100
[System.Runtime.InteropServices.Guid("FF5DD3F1-99C1-4FFB-B097-1B1B2B9E9B2D")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.Guid("FF5DD3F1-99C1-4FFB-B097-1B1B2B9E9B2D")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type IDTSDesigntimeComponent100 = interface
Public Interface IDTSDesigntimeComponent100
衍生
屬性

範例

以下程式碼範例示範如何存取元件的設計時實例。

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  

備註

此介面是由資料流元件實作的兩個介面之一;IDTSRuntimeComponent100 是另一個。 此介面定義元件的設計時介面,並包含當修改元件屬性與集合時所呼叫的方法。 受管理元件開發者並不會明確實作此介面,而是使用 PipelineComponent 基底類別,該類別實作了這兩個介面的方法。

在程式化新增或修改資料流程任務中的現有元件時,應使用元件的設計時實例,而非直接存取元件的元資料。 直接修改元件元資料會繞過元件驗證與拒絕元資料變更的能力,應避免此舉。 受管理程式碼開發者透過 CManagedComponentWrapper 存取元件的設計時實例,並使用 IDTSDesigntimeComponent100 介面的方法。

適用於