IDTSDesigntimeComponent100 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public interface class IDTSDesigntimeComponent100
[System.Runtime.InteropServices.Guid("0058874E-E037-4BA9-920C-349773B5351A")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.Guid("0058874E-E037-4BA9-920C-349773B5351A")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type IDTSDesigntimeComponent100 = interface
Public Interface IDTSDesigntimeComponent100
- 衍生
- 屬性
範例
以下程式碼範例示範如何存取元件的設計時實例。
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
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();
備註
此介面是由資料流元件實作的兩個介面之一; IDTSRuntimeComponent100 是另一個。 此介面定義元件的設計時介面,並包含當修改元件屬性與集合 ComponentMetaData 時所呼叫的方法。 受管理元件開發者並不會明確實作此介面,而是使用 PipelineComponent 基底類別,該類別實作了這兩個介面的方法。
在程式化新增或修改資料流程任務中的現有元件時,應使用元件的設計時實例,而非直接存取元件的元資料。 直接修改會 ComponentMetaData 繞過元件驗證與拒絕其元資料變更的能力,因此應避免。 受管程式碼開發 CManagedComponentWrapper者透過 .