Export (0) Print
Expand All

MainPipeClass.ComponentMetaDataCollection Property

Gets the collection of data flow components in the task.

Namespace:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
Assembly:  Microsoft.SqlServer.DTSPipelineWrap (in Microsoft.SqlServer.DTSPipelineWrap.dll)

public virtual IDTSComponentMetaDataCollection100 ComponentMetaDataCollection { get; }

Implements

IDTSPipeline100.ComponentMetaDataCollection

This 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();
        }
    }
}
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft