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 。 Managed 元件開發人員不會明確地執行此介面,而是使用 >pipelinecomponent 基類,此類別會同時執行這兩個介面的方法。
當以程式設計方式加入或修改資料流程工作中的現有元件時,應使用元件的設計階段實例,而不是直接存取元件中繼資料。 修改 ComponentMetaData 會直接略過元件的功能,以驗證和拒絕對其中繼資料所做的變更,而且應該避免。 Managed 程式碼開發人員會存取元件的設計階段實例,並透過來使用 IDTSDesigntimeComponent100 介面的方法 CManagedComponentWrapper 。