Clase 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.
Jerarquía de herencia
System. . :: . .Object
Microsoft.SqlServer.Dts.Pipeline..::..ScriptComponent
Espacio de nombres: Microsoft.SqlServer.Dts.Pipeline
Ensamblado: Microsoft.SqlServer.TxScript (en Microsoft.SqlServer.TxScript.dll)
Sintaxis
'Declaración
Public Class ScriptComponent
'Uso
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent = class end
public class ScriptComponent
El tipo ScriptComponent expone los siguientes miembros.
Constructores
Nombre | Descripción | |
---|---|---|
ScriptComponent | Initializes a new instance of the ScriptComponent class. |
Arriba
Propiedades
Nombre | Descripción | |
---|---|---|
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. |
Arriba
Métodos
Nombre | Descripción | |
---|---|---|
AcquireConnections | Obtains a connection or connection information by using a connection manager. | |
Equals | (Se hereda de Object.) | |
Finalize | (Se hereda de Object.) | |
GetColumnIndexes | Infraestructura. | |
GetHashCode | (Se hereda de Object.) | |
GetType | (Se hereda de Object.) | |
Log | Writes a log entry. | |
MemberwiseClone | (Se hereda de 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 | Infraestructura. | |
ToString | (Se hereda de Object.) |
Arriba
Comentarios
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 Codificar y depurar el componente de script and Descripción del modelo de objetos del componente de script.
Ejemplos
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 Crear una transformación sincrónica con el componente de script.
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)
Row.City = UCase(Row.City)
End Sub
End Class
Seguridad para subprocesos
Cualquier miembro público static (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.