MainPipeClass.ComponentMetaDataCollection Property
SQL Server 2008 R2
Gets the collection of data flow components in the task.
Assembly: Microsoft.SqlServer.DTSPipelineWrap (in Microsoft.SqlServer.DTSPipelineWrap.dll)
public virtual IDTSComponentMetaDataCollection100 ComponentMetaDataCollection { get; }
Property Value
Type: Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaDataCollection100The IDTSComponentMetaDataCollection100 collection.
Implements
IDTSPipeline100.ComponentMetaDataCollectionThis collection contains the data flow components that have been added to the task. Components are created and added to the collection by calling the New method.
The following code example shows how to add and initialize a new component in the collection.
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("SSIS.Pipeline.2")).InnerObject as MainPipe; IDTSComponentMetaData100 md = mp.ComponentMetaDataCollection.New(); md.ComponentClassID = "DTSAdapter.OleDbSource"; CManagedComponentWrapper wrp = md.Instantiate(); wrp.ProvideComponentProperties(); } } }
