CManagedComponentWrapper Antarmuka
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
public interface class CManagedComponentWrapper : Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2014::IDTSDesigntimeComponent100
[System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014.CManagedComponentWrapperClass))]
[System.Runtime.InteropServices.Guid("0058874E-E037-4BA9-920C-349773B5351A")]
public interface CManagedComponentWrapper : Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014.IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014.CManagedComponentWrapperClass))>]
[<System.Runtime.InteropServices.Guid("0058874E-E037-4BA9-920C-349773B5351A")>]
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();
}
}
}
}
See Also
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace
Return
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 metode Instantiate antarmuka komponen IDTSComponentMetaData100 .
Metode dan properti yang ditentukan oleh antarmuka terlihat pada jenis CManagedComponentWrapperClass dan IDTSDesigntimeComponent100.