IDTSComponentMetaDataCollection100.New メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
public:
Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2014::IDTSComponentMetaData100 ^ New();
[System.Runtime.InteropServices.DispId(14)]
public Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014.IDTSComponentMetaData100 New ();
[<System.Runtime.InteropServices.DispId(14)>]
abstract member New : unit -> Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014.IDTSComponentMetaData100
Public Function New () As IDTSComponentMetaData100
戻り値
新しく作成された IDTSComponentMetaData100 オブジェクトです。
- 属性
例
次のコード例では、クラスの New メソッドを呼び出して、OLE DB ソース コンポーネントをデータ フロー タスクに MainPipe 追加します。
using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2014;
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 = "DTSAdapter.OLEDBSource.1";
// Create an instance of the component.
CManagedComponentWrapper wrapper = metaData.Instantiate();
// Initialize the component.
wrapper.ProvideComponentProperties();
}
}
}
}
See Also
IDTSComponentMetaDataCollection100 Interface
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace
Return to top
注釈
データ フロー コンポーネントは、クラスの MainPipe New メソッドを呼び出すことによってクラスに ComponentMetaDataCollection追加されます。