CManagedComponentWrapper 接口

定义

配置组件的属性和列集合。

public interface class CManagedComponentWrapper : Microsoft::SqlServer::Dts::Pipeline::Wrapper::IDTSDesigntimeComponent100
[System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))]
[System.Runtime.InteropServices.Guid("B7EBC995-699A-4067-A34C-40FAF745C987")]
public interface CManagedComponentWrapper : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent100
[System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))]
[System.Runtime.InteropServices.Guid("E1ACC72B-14CE-4A91-B45F-E87773C1ABB5")]
public interface CManagedComponentWrapper : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent100
[System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))]
[System.Runtime.InteropServices.Guid("1C0F2743-58D4-4663-9BC0-06B4D19B51A7")]
public interface CManagedComponentWrapper : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))>]
[<System.Runtime.InteropServices.Guid("B7EBC995-699A-4067-A34C-40FAF745C987")>]
type CManagedComponentWrapper = interface
    interface IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))>]
[<System.Runtime.InteropServices.Guid("E1ACC72B-14CE-4A91-B45F-E87773C1ABB5")>]
type CManagedComponentWrapper = interface
    interface IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass))>]
[<System.Runtime.InteropServices.Guid("1C0F2743-58D4-4663-9BC0-06B4D19B51A7")>]
type CManagedComponentWrapper = interface
    interface IDTSDesigntimeComponent100
Public Interface CManagedComponentWrapper
Implements IDTSDesigntimeComponent100
派生
属性
实现

示例

以下代码示例演示了如何以程序方式向数据流任务添加组件,并创建设计时接口实例。

using System;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
    class CreateComponent  
    {  
         [STAThread]  
        static void Main(string[] args)  
        {  
            // Create the package.  
            Package p = new Package();  

            // Add the data flow task to the package.  
            MainPipe dataFlowTask = ((TaskHost)p.Executables.Add("DTS.Pipeline.1")).InnerObject as MainPipe;  

            if (dataFlowTask != null)  
            {  
                // Add a component to the data flow task.  
                IDTSComponentMetaData100 metaData = dataFlowTask.ComponentMetaDataCollection.New();  

                // Set the class id of the component.  
                metaData.ComponentClassID = "";  

                // Create an instance of the component.  
                CManagedComponentWrapper wrapper = metaData.Instantiate();  

                // Initialize the component by calling ProvideComponentProperties.  
                wrapper.ProvideComponentProperties();  
            }  
        }  
    }  
}  

注解

表示 CManagedComponentWrapper 用于数据流组件设计时修改时的接口 IDTSDesigntimeComponent100CManagedComponentWrapper 用于在设计时配置数据流组件的属性和列集合。 虽然组件的元数据可以被直接修改,但应避免这样做,因为这样做会绕过组件验证元数据修改的能力。 通过调用Instantiate组件IDTSComponentMetaData100接口的方法创建 的CManagedComponentWrapper实例。

接口定义的方法和属性在类型上CManagedComponentWrapperClassIDTSDesigntimeComponent100均可见。

方法

名称 说明
AcquireConnections(Object)

建立连接到连接管理器的连接。

(继承自 IDTSDesigntimeComponent100)
DeleteExternalMetadataColumn(Int32, Int32)

从外部元数据列集合中删除指定索引处的外部元数据列。

(继承自 IDTSDesigntimeComponent100)
DeleteInput(Int32)

从集合中删除一个 IDTSInput100 对象 IDTSInputCollection100

(继承自 IDTSDesigntimeComponent100)
DeleteOutput(Int32)

从集合中删除一个 IDTSOutput100 对象 IDTSOutputCollection100

(继承自 IDTSDesigntimeComponent100)
DeleteOutputColumn(Int32, Int32)

从集合中删除一个 IDTSOutputColumn100 对象 IDTSOutputColumnCollection100

(继承自 IDTSDesigntimeComponent100)
DescribeRedirectedErrorCode(Int32)

返回指定错误代码的描述。

(继承自 IDTSDesigntimeComponent100)
GetEnumerationCollection(String)

返回组件的 。IDTSFriendlyEnumCollection100

(继承自 IDTSDesigntimeComponent100)
InsertExternalMetadataColumnAt(Int32, Int32, String, String)

在指定索引处向外部元数据列集合插入一个新的外部元数据列。

(继承自 IDTSDesigntimeComponent100)
InsertInput(DTSInsertPlacement, Int32)

将对象IDTSInput100添加到 .IDTSInputCollection100

(继承自 IDTSDesigntimeComponent100)
InsertOutput(DTSInsertPlacement, Int32)

IDTSOutput100添加新对象。

(继承自 IDTSDesigntimeComponent100)
InsertOutputColumnAt(Int32, Int32, String, String)

创建一个新 IDTSOutputColumn100 对象并将其插入 IDTSOutputColumnCollection100

(继承自 IDTSDesigntimeComponent100)
MapInputColumn(Int32, Int32, Int32)

建立输入列与对应外部元数据列之间的关系。

(继承自 IDTSDesigntimeComponent100)
MapOutputColumn(Int32, Int32, Int32, Boolean)

建立输出列与对应外部元数据列之间的关系。

(继承自 IDTSDesigntimeComponent100)
OnDeletingInputColumn(Int32, Int32)

在删除 IDTSInputColumn100 .IDTSInputColumnCollection100

(继承自 IDTSDesigntimeComponent100)
OnInputPathAttached(Int32)

当对象 IDTSInput100 通过接口连接到另一个组件 IDTSPath100 时调用。

(继承自 IDTSDesigntimeComponent100)
OnInputPathDetached(Int32)

IDTSPath100 包含指定 IDTSInput100 对象的对象被删除时调用。

(继承自 IDTSDesigntimeComponent100)
OnOutputPathAttached(Int32)

IDTSOutput100 组件的对象被连接到下游组件时调用。

(继承自 IDTSDesigntimeComponent100)
ProvideComponentProperties()

当组件首次添加到数据流任务时,初始化组件的 。ComponentMetaData

(继承自 IDTSDesigntimeComponent100)
ReinitializeMetaData()

修复设计时验证中发现导致组件返回 VS_NEEDSNEWMETADATA的错误。

(继承自 IDTSDesigntimeComponent100)
ReleaseConnections()

释放在 AcquireConnections(Object) 设计时或运行时建立的连接。

(继承自 IDTSDesigntimeComponent100)
SetComponentProperty(String, Object)

为组件的 赋予 IDTSCustomProperty100 值。

(继承自 IDTSDesigntimeComponent100)
SetExternalMetadataColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

设置指定外部元数据列的数据类型属性。

(继承自 IDTSDesigntimeComponent100)
SetExternalMetadataColumnProperty(Int32, Int32, String, Object)

设置外部元数据列的单个属性。

(继承自 IDTSDesigntimeComponent100)
SetInputColumnProperty(Int32, Int32, String, Object)

为对象的值IDTSCustomProperty100IDTSInputColumn100赋予一个值。

(继承自 IDTSDesigntimeComponent100)
SetInputProperty(Int32, String, Object)

为对象的值IDTSCustomProperty100IDTSInput100赋予一个值。

(继承自 IDTSDesigntimeComponent100)
SetOutputColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

设置对象的数据 IDTSOutputColumn100 类型属性。

(继承自 IDTSDesigntimeComponent100)
SetOutputColumnProperty(Int32, Int32, String, Object)

为一个IDTSOutputColumn100对象设置 a IDTSCustomProperty100 值。

(继承自 IDTSDesigntimeComponent100)
SetOutputProperty(Int32, String, Object)

为一个IDTSOutput100对象设置 a IDTSCustomProperty100 值。

(继承自 IDTSDesigntimeComponent100)
SetUsageType(Int32, IDTSVirtualInput100, Int32, DTSUsageType)

在组件的 中IDTSInputColumnCollection100创建一个IDTSInputColumn100对象,并设置UsageType列的属性。

(继承自 IDTSDesigntimeComponent100)
Validate()

验证组件配置正确。

(继承自 IDTSDesigntimeComponent100)

适用于