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) 成员都是线程安全的。不保证所有实例成员都是线程安全的。