Freigeben über


ScriptComponent-Klasse

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.

Vererbungshierarchie

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

Namespace:  Microsoft.SqlServer.Dts.Pipeline
Assembly:  Microsoft.SqlServer.TxScript (in Microsoft.SqlServer.TxScript.dll)

Syntax

'Declaration
Public Class ScriptComponent
'Usage
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent =  class end
public class ScriptComponent

Der ScriptComponent-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode ScriptComponent Initializes a new instance of the ScriptComponent class.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft ComponentMetaData Returns a reference to the component definition.
Öffentliche EigenschaftStatisches Element EvaluatorContext Gets the script component evaluator context.
Öffentliche Eigenschaft InputIDToNameMap Gets the input identifier to name map.
Öffentliche Eigenschaft OutputNameMap Gets the output name map.
Öffentliche Eigenschaft ReadOnlyVariables Returns the collection of ReadOnlyVariables available to the component.
Öffentliche Eigenschaft ReadWriteVariables Returns the collection of ReadWriteVariables available to the component.
Öffentliche Eigenschaft VariableDispenser Returns an object that the data flow uses internally to work with variables.

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode AcquireConnections Obtains a connection or connection information by using a connection manager.
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode Finalize (Geerbt von Object.)
Öffentliche Methode GetColumnIndexes Infrastruktur Gets the collection of column index for the script component.
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche MethodeStatisches Element GetOutputID Returns the output ID that has a specified output name.
Öffentliche Methode GetType (Geerbt von Object.)
Öffentliche Methode Log Writes a log entry.
Geschützte Methode MemberwiseClone (Geerbt von Object.)
Öffentliche Methode PostExecute Executes custom code that must run after the Script component has processed its inputs and outputs.
Öffentliche Methode PreExecute Executes custom code that must run before the Script component has processed its inputs and outputs.
Öffentliche Methode PrimeOutput Prepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
Öffentliche Methode ProcessInput(Int32, PipelineBuffer) Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
Öffentliche Methode ProcessInput(Int32, String, PipelineBuffer, OutputNameMap) Processes inputs in the script components.
Öffentliche Methode ReleaseConnections Releases a connection to a connection manager.
Öffentliche Methode SetBufferColumnIndexes Infrastruktur Sets the index of the buffer columns.
Öffentliche Methode ToString (Geerbt von Object.)

Zum Anfang

Hinweise

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 Codieren und Debuggen der Skriptkomponente and Grundlegendes zum Skript-Komponentenobjektmodell.

Beispiele

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 Erstellen einer synchronen Transformation mit der Skriptkomponente.

Public Class ScriptMain
    Inherits UserComponent

    Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)

        Row.City = UCase(Row.City)

    End Sub

End Class

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Dts.Pipeline-Namespace