Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the properties and column collections of a component.
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
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("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();
}
}
}
}
Remarks
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.