Partager via


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.

Hiérarchie d'héritage

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

Espace de noms :  Microsoft.SqlServer.Dts.Pipeline
Assembly :  Microsoft.SqlServer.TxScript (en Microsoft.SqlServer.TxScript.dll)

Syntaxe

'Déclaration
Public Class ScriptComponent
'Utilisation
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent =  class end
public class ScriptComponent

Le type ScriptComponent expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique ScriptComponent Initializes a new instance of the ScriptComponent class.

Haut de la page

Propriétés

  Nom Description
Propriété publique ComponentMetaData Returns a reference to the component definition.
Propriété publiqueMembre statique EvaluatorContext Gets the script component evaluator context.
Propriété publique InputIDToNameMap Gets the input identifier to name map.
Propriété publique OutputNameMap Gets the output name map.
Propriété publique ReadOnlyVariables Returns the collection of ReadOnlyVariables available to the component.
Propriété publique ReadWriteVariables Returns the collection of ReadWriteVariables available to the component.
Propriété publique VariableDispenser Returns an object that the data flow uses internally to work with variables.

Haut de la page

Méthodes

  Nom Description
Méthode publique AcquireConnections Obtains a connection or connection information by using a connection manager.
Méthode publique Equals (hérité de Object.)
Méthode protégée Finalize (hérité de Object.)
Méthode publique GetColumnIndexes Infrastructure. Gets the collection of column index for the script component.
Méthode publique GetHashCode (hérité de Object.)
Méthode publiqueMembre statique GetOutputID Returns the output ID that has a specified output name.
Méthode publique GetType (hérité de Object.)
Méthode publique Log Writes a log entry.
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode publique PostExecute Executes custom code that must run after the Script component has processed its inputs and outputs.
Méthode publique PreExecute Executes custom code that must run before the Script component has processed its inputs and outputs.
Méthode publique PrimeOutput Prepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
Méthode publique ProcessInput(Int32, PipelineBuffer) Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
Méthode publique ProcessInput(Int32, String, PipelineBuffer, OutputNameMap) Processes inputs in the script components.
Méthode publique ReleaseConnections Releases a connection to a connection manager.
Méthode publique SetBufferColumnIndexes Infrastructure. Sets the index of the buffer columns.
Méthode publique ToString (hérité de Object.)

Haut de la page

Notes

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 Codage et débogage du composant Script and Présentation du modèle objet du composant Script.

Exemples

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 Création d'une transformation synchrone à l'aide du composant Script.

Public Class ScriptMain
    Inherits UserComponent

    Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)

        Row.City = UCase(Row.City)

    End Sub

End Class

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Voir aussi

Référence

Espace de noms Microsoft.SqlServer.Dts.Pipeline