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.

Gerarchia di ereditarietà

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

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

Nel tipo ScriptComponent sono esposti i membri seguenti.

Costruttori

  Nome Descrizione
Metodo pubblico ScriptComponent Initializes a new instance of the ScriptComponent class.

In alto

Proprietà

  Nome Descrizione
Proprietà pubblica ComponentMetaData Returns a reference to the component definition.
Proprietà pubblicaMembro statico EvaluatorContext Gets the script component evaluator context.
Proprietà pubblica InputIDToNameMap Gets the input identifier to name map.
Proprietà pubblica OutputNameMap Gets the output name map.
Proprietà pubblica ReadOnlyVariables Returns the collection of ReadOnlyVariables available to the component.
Proprietà pubblica ReadWriteVariables Returns the collection of ReadWriteVariables available to the component.
Proprietà pubblica VariableDispenser Returns an object that the data flow uses internally to work with variables.

In alto

Metodi

  Nome Descrizione
Metodo pubblico AcquireConnections Obtains a connection or connection information by using a connection manager.
Metodo pubblico Equals Ereditato da Object.
Metodo protetto Finalize Ereditato da Object.
Metodo pubblico GetColumnIndexes Infrastruttura. Gets the collection of column index for the script component.
Metodo pubblico GetHashCode Ereditato da Object.
Metodo pubblicoMembro statico GetOutputID Returns the output ID that has a specified output name.
Metodo pubblico GetType Ereditato da Object.
Metodo pubblico Log Writes a log entry.
Metodo protetto MemberwiseClone Ereditato da Object.
Metodo pubblico PostExecute Executes custom code that must run after the Script component has processed its inputs and outputs.
Metodo pubblico PreExecute Executes custom code that must run before the Script component has processed its inputs and outputs.
Metodo pubblico PrimeOutput Prepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
Metodo pubblico ProcessInput(Int32, PipelineBuffer) Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
Metodo pubblico ProcessInput(Int32, String, PipelineBuffer, OutputNameMap) Processes inputs in the script components.
Metodo pubblico ReleaseConnections Releases a connection to a connection manager.
Metodo pubblico SetBufferColumnIndexes Infrastruttura. Sets the index of the buffer columns.
Metodo pubblico ToString Ereditato da Object.

In alto

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 a 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

Protezione dei thread

I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.

Vedere anche

Riferimento

Spazio dei nomi Microsoft.SqlServer.Dts.Pipeline