Classe 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.

Spazio dei nomi:  Microsoft.SqlServer.Dts.Pipeline
Assembly:  Microsoft.SqlServer.TxScript (in Microsoft.SqlServer.TxScript.dll)

Sintassi

'Dichiarazione
Public Class ScriptComponent
'Utilizzo
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent =  class end
public class ScriptComponent

Osservazioni

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 Codifica e debug del componente script and Informazioni sul modello di oggetti del componente script.

Esempi

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 Creazione di una trasformazione sincrona con il componente script.

Public Class ScriptMain
    Inherits UserComponent

    Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)

        Row.City = UCase(Row.City)

    End Sub

End Class

Gerarchia di ereditarietà

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

Thread Safety

Tutti i membri pubblici static (Shared in Visual Basic) di questo tipo sono thread safe. I membri di istanza non hanno garanzia di essere thread safe.