Bagikan melalui


CManagedComponentWrapper Antarmuka

Definisi

Mengonfigurasi properti dan kumpulan kolom komponen.

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
Turunan
Atribut
Penerapan

Contoh

Contoh kode berikut menunjukkan cara menambahkan komponen secara terprogram ke tugas aliran data dan membuat instans antarmuka waktu desain.

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();  
            }  
        }  
    }  
}  

Keterangan

CManagedComponentWrapper mewakili antarmuka IDTSDesigntimeComponent100 yang digunakan dalam modifikasi waktu desain komponen aliran data. CManagedComponentWrapper digunakan untuk mengonfigurasi properti dan kumpulan kolom komponen aliran data selama waktu desain. Meskipun metadata komponen dapat dimodifikasi secara langsung, ini harus dihindari karena melakukannya melewati kemampuan komponen untuk memvalidasi modifikasi pada metadatanya. Instans CManagedComponentWrapper dibuat dengan memanggil Instantiate metode antarmuka komponen IDTSComponentMetaData100 .

Metode dan properti yang ditentukan oleh antarmuka terlihat pada CManagedComponentWrapperClass dan jenisnya IDTSDesigntimeComponent100 .

Metode

AcquireConnections(Object)

Membuat koneksi ke manajer koneksi.

(Diperoleh dari IDTSDesigntimeComponent100)
DeleteExternalMetadataColumn(Int32, Int32)

Menghapus kolom metadata eksternal pada indeks yang ditentukan dari kumpulan kolom metadata eksternal.

(Diperoleh dari IDTSDesigntimeComponent100)
DeleteInput(Int32)

IDTSInput100 Menghapus objek dari IDTSInputCollection100 koleksi.

(Diperoleh dari IDTSDesigntimeComponent100)
DeleteOutput(Int32)

IDTSOutput100 Menghapus objek dari IDTSOutputCollection100 koleksi.

(Diperoleh dari IDTSDesigntimeComponent100)
DeleteOutputColumn(Int32, Int32)

IDTSOutputColumn100 Menghapus objek dari IDTSOutputColumnCollection100 koleksi.

(Diperoleh dari IDTSDesigntimeComponent100)
DescribeRedirectedErrorCode(Int32)

Mengembalikan deskripsi kode kesalahan yang ditentukan.

(Diperoleh dari IDTSDesigntimeComponent100)
GetEnumerationCollection(String)

Mengembalikan IDTSFriendlyEnumCollection100 komponen.

(Diperoleh dari IDTSDesigntimeComponent100)
InsertExternalMetadataColumnAt(Int32, Int32, String, String)

Menyisipkan kolom metadata eksternal baru ke dalam kumpulan kolom metadata eksternal pada indeks yang ditentukan.

(Diperoleh dari IDTSDesigntimeComponent100)
InsertInput(DTSInsertPlacement, Int32)

IDTSInput100 Menambahkan objek ke IDTSInputCollection100.

(Diperoleh dari IDTSDesigntimeComponent100)
InsertOutput(DTSInsertPlacement, Int32)

Menambahkan objek baru IDTSOutput100 .

(Diperoleh dari IDTSDesigntimeComponent100)
InsertOutputColumnAt(Int32, Int32, String, String)

Membuat objek baru IDTSOutputColumn100 dan menyisipkannya ke IDTSOutputColumnCollection100dalam .

(Diperoleh dari IDTSDesigntimeComponent100)
MapInputColumn(Int32, Int32, Int32)

Membuat hubungan antara kolom input dan kolom metadata eksternal terkait.

(Diperoleh dari IDTSDesigntimeComponent100)
MapOutputColumn(Int32, Int32, Int32, Boolean)

Membuat hubungan antara kolom output dan kolom metadata eksternal terkait.

(Diperoleh dari IDTSDesigntimeComponent100)
OnDeletingInputColumn(Int32, Int32)

Dipanggil saat menghapus IDTSInputColumn100 objek dari IDTSInputColumnCollection100.

(Diperoleh dari IDTSDesigntimeComponent100)
OnInputPathAttached(Int32)

Dipanggil ketika IDTSInput100 objek terhubung ke komponen lain melalui IDTSPath100 antarmuka.

(Diperoleh dari IDTSDesigntimeComponent100)
OnInputPathDetached(Int32)

Dipanggil ketika IDTSPath100 objek yang berisi objek yang ditentukan IDTSInput100 dihapus.

(Diperoleh dari IDTSDesigntimeComponent100)
OnOutputPathAttached(Int32)

Dipanggil ketika IDTSOutput100 objek komponen dilampirkan ke komponen hilir.

(Diperoleh dari IDTSDesigntimeComponent100)
ProvideComponentProperties()

Menginisialisasi ComponentMetaData komponen saat komponen pertama kali ditambahkan ke tugas aliran data.

(Diperoleh dari IDTSDesigntimeComponent100)
ReinitializeMetaData()

Memperbaiki kesalahan apa pun yang diidentifikasi selama validasi waktu desain yang mengakibatkan VS_NEEDSNEWMETADATAkomponen mengembalikan .

(Diperoleh dari IDTSDesigntimeComponent100)
ReleaseConnections()

Membebaskan koneksi yang dibuat selama AcquireConnections(Object) waktu desain atau durasi.

(Diperoleh dari IDTSDesigntimeComponent100)
SetComponentProperty(String, Object)

Menetapkan nilai ke IDTSCustomProperty100 komponen.

(Diperoleh dari IDTSDesigntimeComponent100)
SetExternalMetadataColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

Mengatur properti tipe data dari kolom metadata eksternal yang ditentukan.

(Diperoleh dari IDTSDesigntimeComponent100)
SetExternalMetadataColumnProperty(Int32, Int32, String, Object)

Mengatur properti individual dari kolom metadata eksternal.

(Diperoleh dari IDTSDesigntimeComponent100)
SetInputColumnProperty(Int32, Int32, String, Object)

Menetapkan nilai ke IDTSCustomProperty100IDTSInputColumn100 objek .

(Diperoleh dari IDTSDesigntimeComponent100)
SetInputProperty(Int32, String, Object)

Menetapkan nilai ke IDTSCustomProperty100IDTSInput100 objek .

(Diperoleh dari IDTSDesigntimeComponent100)
SetOutputColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

Mengatur properti IDTSOutputColumn100 tipe data objek.

(Diperoleh dari IDTSDesigntimeComponent100)
SetOutputColumnProperty(Int32, Int32, String, Object)

Mengatur nilai IDTSCustomProperty100 untuk objek IDTSOutputColumn100 .

(Diperoleh dari IDTSDesigntimeComponent100)
SetOutputProperty(Int32, String, Object)

Mengatur nilai IDTSCustomProperty100 untuk objek IDTSOutput100 .

(Diperoleh dari IDTSDesigntimeComponent100)
SetUsageType(Int32, IDTSVirtualInput100, Int32, DTSUsageType)

IDTSInputColumn100 Membuat objek di IDTSInputColumnCollection100 komponen dan mengatur UsageType properti kolom.

(Diperoleh dari IDTSDesigntimeComponent100)
Validate()

Memverifikasi bahwa komponen dikonfigurasi dengan benar.

(Diperoleh dari IDTSDesigntimeComponent100)

Berlaku untuk