MainPipeClass.IDTSObjectModel100_ComponentMetaDataCollection 属性

定义

获取任务中数据流组件的集合。

public:
 virtual property Microsoft::SqlServer::Dts::Pipeline::Wrapper::IDTSComponentMetaDataCollection100 ^ IDTSObjectModel100_ComponentMetaDataCollection { Microsoft::SqlServer::Dts::Pipeline::Wrapper::IDTSComponentMetaDataCollection100 ^ get(); };
public virtual Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaDataCollection100 IDTSObjectModel100_ComponentMetaDataCollection { get; }
member this.IDTSObjectModel100_ComponentMetaDataCollection : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaDataCollection100
Public Overridable ReadOnly Property IDTSObjectModel100_ComponentMetaDataCollection As IDTSComponentMetaDataCollection100

属性值

IDTSComponentMetaDataCollection100 集合。

示例

下面的代码示例演示如何在集合中添加和初始化新组件。

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

namespace Microsoft.Samples.SqlServer.Dts  
{  
    public class Class1  
    {  
        public static void Main( string []args )  
        {  
            Package p = new Package();  
            MainPipe mp = ((TaskHost)p.Executables.Add("DTS.Pipeline")).InnerObject as MainPipe;  
            IDTSComponentMetaData100 md = mp.ComponentMetaDataCollection.New();  
            md.ComponentClassID = "DTSAdapter.OleDbSource";  
            CManagedComponentWrapper wrp = md.Instantiate();  
            wrp.ProvideComponentProperties();  
        }  
    }  
}  
Imports System   
Imports Microsoft.SqlServer.Dts.Runtime   
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper   
Namespace Microsoft.Samples.SqlServer.Dts   

 Public Class Class1   

   Public Shared Sub Main(ByVal args As String())   
     Dim p As Package = New Package   
     Dim mp As MainPipe = CType(CType(p.Executables.Add("DTS.Pipeline"), TaskHost).InnerObject, MainPipe)   
     Dim md As IDTSComponentMetaData100 = mp.ComponentMetaDataCollection.New   
     md.ComponentClassID = "DTSAdapter.OleDbSource"   
     Dim wrp As CManagedComponentWrapper = md.Instantiate   
     wrp.ProvideComponentProperties   
   End Sub   
 End Class   
End Namespace  

注解

此集合包含已添加到任务的数据流组件。 组件通过调用 New 方法创建并添加到集合中。

适用于