IDTSDesigntimeComponent100 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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 是另一个。 此接口定义组件的设计时接口,并包含修改 ComponentMetaData 的组件属性和集合时调用的方法。 托管组件开发人员不会显式实现此接口,而是使用 PipelineComponent 基类,该基类实现这两个接口的方法。
以编程方式在数据流任务中添加或修改现有组件时,应使用组件的设计时实例,而不是直接访问组件元数据。 修改 ComponentMetaData 会直接绕过组件验证和拒绝对其元数据的更改的功能,应避免这样做。 托管代码开发人员访问组件的设计时实例,并通过 CManagedComponentWrapper 使用 IDTSDesigntimeComponent100 接口的方法。