共用方式為


ScriptComponent 類別

Serves as the base class for the read-only UserComponent class generated by the Script component in the ComponentWrapper project item in a Script component project.

繼承階層

System. . :: . .Object
  Microsoft.SqlServer.Dts.Pipeline..::..ScriptComponent

命名空間:  Microsoft.SqlServer.Dts.Pipeline
組件:  Microsoft.SqlServer.TxScript (在 Microsoft.SqlServer.TxScript.dll 中)

語法

'宣告
Public Class ScriptComponent
'用途
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent =  class end
public class ScriptComponent

ScriptComponent 型別公開下列成員。

建構函式

  名稱 說明
公用方法 ScriptComponent Initializes a new instance of the ScriptComponent class.

上層

屬性

  名稱 說明
公用屬性 ComponentMetaData Returns a reference to the component definition.
公用屬性 ReadOnlyVariables Returns the collection of ReadOnlyVariables available to the component.
公用屬性 ReadWriteVariables Returns the collection of ReadWriteVariables available to the component.
公用屬性 VariableDispenser Returns an object that the data flow uses internally to work with variables.

上層

方法

  名稱 說明
公用方法 AcquireConnections Obtains a connection or connection information by using a connection manager.
公用方法 Equals (繼承自 Object。)
受保護的方法 Finalize (繼承自 Object。)
公用方法 GetColumnIndexes 基礎結構。
公用方法 GetHashCode (繼承自 Object。)
公用方法 GetType (繼承自 Object。)
公用方法 Log Writes a log entry.
受保護的方法 MemberwiseClone (繼承自 Object。)
公用方法 PostExecute Executes custom code that must run after the Script component has processed its inputs and outputs.
公用方法 PreExecute Executes custom code that must run before the Script component has processed its inputs and outputs.
公用方法 PrimeOutput Prepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
公用方法 ProcessInput Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
公用方法 ReleaseConnections Releases a connection to a connection manager.
公用方法 SetBufferColumnIndexes 基礎結構。
公用方法 ToString (繼承自 Object。)

上層

備註

The ScriptComponent class serves as the base class for the read-only UserComponent class, which is generated by the Script component in the ComponentWrapper project item in a Script component project. The UserComponent class serves as the base class for the ScriptMain class, in which the developer writes custom code, and provides the developer with a set of methods for working with the component's inputs and outputs. It also provides strongly-typed accessor properties for variables and connection managers available to the component.

The Script component developer does not use the ScriptComponent class directly, but indirectly, by coding the methods and properties of the ScriptMain class, which inherits from ScriptComponent through the UserComponent class.

For more information, see 指令碼元件的程式碼撰寫和偵錯 and 了解指令碼元件物件模型.

範例

The following code sample demonstrates all the code that a developer has to write to create a transformation with synchronous outputs by using the Script component. For more information on this sample, see 使用指令碼元件建立同步轉換.

Public Class ScriptMain
    Inherits UserComponent

    Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)

        Row.City = UCase(Row.City)

    End Sub

End Class

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。