IDTSComponentMetaDataCollection100.New 메서드

정의

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 개체입니다.

특성

예제

다음 코드 예제에서는 클래스의 MainPipe New 메서드를 호출하여 데이터 흐름 태스크에 OLE DB 원본 구성 요소를 추가합니다.

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  

설명

데이터 흐름 구성 요소는 의 New 메서드를 MainPipe 호출하여 클래스에 ComponentMetaDataCollection추가됩니다.

적용 대상