Compartir a través de


CManagedComponentWrapper Interfaz

Configures the properties and column collections of a component.

Espacio de nombres:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
Ensamblado:  Microsoft.SqlServer.DTSPipelineWrap (en Microsoft.SqlServer.DTSPipelineWrap.dll)

Sintaxis

'Declaración
<GuidAttribute("B13097E5-4465-4A9C-BB74-FFC8F8E30760")> _
Public Interface CManagedComponentWrapper _
    Inherits IDTSDesigntimeComponent100
'Uso
Dim instance As CManagedComponentWrapper
[GuidAttribute("B13097E5-4465-4A9C-BB74-FFC8F8E30760")]
public interface CManagedComponentWrapper : IDTSDesigntimeComponent100
[GuidAttribute(L"B13097E5-4465-4A9C-BB74-FFC8F8E30760")]
public interface class CManagedComponentWrapper : IDTSDesigntimeComponent100
[<GuidAttribute("B13097E5-4465-4A9C-BB74-FFC8F8E30760")>]
type CManagedComponentWrapper =  
    interface
        interface IDTSDesigntimeComponent100
    end
public interface CManagedComponentWrapper extends IDTSDesigntimeComponent100

Notas

The CManagedComponentWrapper represents the interface of IDTSDesigntimeComponent100 that is used in design time modification of a data flow component. CManagedComponentWrapper is used to configure the properties and column collections of a data flow component during design time. While the metadata of a component can be modified directly, this should be avoided because doing so bypasses the component's ability to validate modifications to its metadata. An instance of CManagedComponentWrapper is created by calling the Instantiate method of a component's IDTSComponentMetaData100 interface.

The methods and properties defined by the interface are visible on both the CManagedComponentWrapperClass and the IDTSDesigntimeComponent100 types.

Ejemplos

The following code example demonstrates how to programmatically add a component to a data flow task and create an instance of the design-time interface.

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("SSIS.Pipeline.2")).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();
            }
        }
    }
}