MainPipeClass 类

Adds and connects components in a data flow layout.

继承层次结构

System. . :: . .Object
  Microsoft.SqlServer.Dts.Pipeline.Wrapper..::..MainPipeClass

命名空间:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
程序集:  Microsoft.SqlServer.DTSPipelineWrap(在 Microsoft.SqlServer.DTSPipelineWrap.dll 中)

语法

声明
<GuidAttribute("E3CFBEA8-1F48-40D8-91E1-2DEDC1EDDD56")> _
<ClassInterfaceAttribute()> _
Public Class MainPipeClass _
    Implements IDTSPipeline100, MainPipe, IDTSObjectModel100
用法
Dim instance As MainPipeClass
[GuidAttribute("E3CFBEA8-1F48-40D8-91E1-2DEDC1EDDD56")]
[ClassInterfaceAttribute()]
public class MainPipeClass : IDTSPipeline100, 
    MainPipe, IDTSObjectModel100
[GuidAttribute(L"E3CFBEA8-1F48-40D8-91E1-2DEDC1EDDD56")]
[ClassInterfaceAttribute()]
public ref class MainPipeClass : IDTSPipeline100, 
    MainPipe, IDTSObjectModel100
[<GuidAttribute("E3CFBEA8-1F48-40D8-91E1-2DEDC1EDDD56")>]
[<ClassInterfaceAttribute()>]
type MainPipeClass =  
    class
        interface IDTSPipeline100
        interface MainPipe
        interface IDTSObjectModel100
    end
public class MainPipeClass implements IDTSPipeline100, MainPipe, IDTSObjectModel100

MainPipeClass 类型公开以下成员。

构造函数

  名称 说明
公共方法 MainPipeClass Initializes a new instance of the MainPipeClass.

页首

属性

  名称 说明
公共属性 AutoGenerateIDForNewObjects Gets or sets a value that specifies whether a data flow automatically generates and sets the ID property for newly created objects.
公共属性 BLOBTempStoragePath Gets or sets a value that specifies the file system location where binary large objects (BLOBs) are temporarily written to disk.
公共属性 BufferManager Gets the IDTSBufferManager100 object.
公共属性 BufferTempStoragePath Gets or sets the file system path used to temporarily cache buffer data.
公共属性 ComponentMetaDataCollection Gets the collection of data flow components in the task.
公共属性 DefaultBufferMaxRows Gets or sets the maximum number of rows the task allows in an IDTSBuffer100 buffer.
公共属性 DefaultBufferSize Gets or sets the default size of the IDTSBuffer100 objects created by a task.
公共属性 EngineThreads Gets or sets the number of threads a data flow task uses.
公共属性 Events Sets the events interface that a data flow, and the components it contains, use to raise events during execution.
公共属性 IDTSObjectModel100_AutoGenerateIDForNewObjects Gets or sets a value that specifies whether a data flow automatically generates and sets the ID property for newly created objects.
公共属性 IDTSObjectModel100_ComponentMetaDataCollection Gets the collection of data flow components in the task.
公共属性 IDTSObjectModel100_PathCollection Gets the IDTSPathCollection100 collection for a data flow task.
公共属性 PathCollection Gets the IDTSPathCollection100 collection for a data flow task.
公共属性 PersistenceCustomPropertyCollection Gets the persistence format of the data flow task's custom property collection.
公共属性 RunInOptimizedMode Gets or sets a value that specifies whether a data flow task runs in optimized mode.
公共属性 VariableDispenser Sets the IDTSVariableDispenser100 used to lock variables in a package for reading and writing.

页首

方法

  名称 说明
公共方法 Equals (从 Object 继承。)
受保护方法 Finalize (从 Object 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetNextPasteID Gets the next available ID that a data flow task generates.
公共方法 GetObjectByID Retrieves an object contained in a data flow task.
公共方法 GetType (从 Object 继承。)
公共方法 IDTSObjectModel100_GetObjectByID Retrieves an object that is contained in a data flow task.
公共方法 IDTSObjectModel100_New Resets the layout of components in a data flow task.
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法 New 基础结构。
公共方法 ToString (从 Object 继承。)

页首

注释

This class represents the data flow task, and is used when programmatically building a data flow layout. An instance of the class is created by adding the data flow task to the Executables collection of a Package. Components are added to the task using the ComponentMetaDataCollection property. Connections are established between components using the PathCollection property.

示例

The following code example adds a data flow task to a package, adds an OLE DB source component and an OLE DB destination component, and establishes a path between the two components.

using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;

namespace Microsoft.Samples.SqlServer.Dts
{
    public class Class1
    {
        public static void Main(string []args)
        {
            // Create the package.
            Package p = new Package();

            // Add the data flow task.
            MainPipe mp = ((TaskHost)p.Executables.Add("SSIS.Pipeline.2")).InnerObject as MainPipe;

            // Add the OLE DB source component.
            IDTSComponentMetaData100 mdOleDbSrc = mp.ComponentMetaDataCollection.New();
            mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource";
            mdOleDbSrc.Name = "OLEDB Source";
            CManagedComponentWrapper wrpOledbSrc = mdOleDbSrc.Instantiate();

            // Add the OLE DB destination component.
            IDTSComponentMetaData100 mdOleDbDest = mp.ComponentMetaDataCollection.New();
            mdOleDbDest.ComponentClassID = "DTSAdapter.OleDbDestination";
            mdOleDbDest.Name = "OLEDB Destination";
            CManagedComponentWrapper wrpOledbDest = mdOleDbSrc.Instantiate();

            // Create a path and attach the output of the source to the input of the destination.
            IDTSPath100 path = mp.PathCollection.New();
            path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection[0], mdOleDbDest.InputCollection[0]);
        }
    }
}
Imports System 
Imports Microsoft.SqlServer.Dts.Runtime 
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper 
Namespace Microsoft.Samples.SqlServer.Dts 

 Public Class Class1 

   Public Shared Sub Main(ByVal args As String()) 
     Dim p As Package = New Package 
     Dim mp As MainPipe = CType(CType(p.Executables.Add("SSIS.Pipeline.2"), TaskHost).InnerObject, MainPipe) 
     Dim mdOleDbSrc As IDTSComponentMetaData100 = mp.ComponentMetaDataCollection.New 
     mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource" 
     mdOleDbSrc.Name = "OLEDB Source" 
     Dim wrpOledbSrc As CManagedComponentWrapper = mdOleDbSrc.Instantiate 
     Dim mdOleDbDest As IDTSComponentMetaData100 = mp.ComponentMetaDataCollection.New 
     mdOleDbDest.ComponentClassID = "DTSAdapter.OleDbDestination" 
     mdOleDbDest.Name = "OLEDB Destination" 
     Dim wrpOledbDest As CManagedComponentWrapper = mdOleDbSrc.Instantiate 
     Dim path As IDTSPath100 = mp.PathCollection.New 
     path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection(0), mdOleDbDest.InputCollection(0)) 
   End Sub 
 End Class 
End Namespace

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。