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

Hierarquia de herança

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

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

Sintaxe

'Declaração
Public Class ScriptComponent
'Uso
Dim instance As ScriptComponent
public class ScriptComponent
public ref class ScriptComponent
type ScriptComponent =  class end
public class ScriptComponent

O tipo ScriptComponent expõe os membros a seguir.

Construtores

  Nome Descrição
Método público ScriptComponent Initializes a new instance of the ScriptComponent class.

Início

Propriedades

  Nome Descrição
Propriedade pública ComponentMetaData Returns a reference to the component definition.
Propriedade públicaMembro estático EvaluatorContext Gets the script component evaluator context.
Propriedade pública InputIDToNameMap Gets the input identifier to name map.
Propriedade pública OutputNameMap Gets the output name map.
Propriedade pública ReadOnlyVariables Returns the collection of ReadOnlyVariables available to the component.
Propriedade pública ReadWriteVariables Returns the collection of ReadWriteVariables available to the component.
Propriedade pública VariableDispenser Returns an object that the data flow uses internally to work with variables.

Início

Métodos

  Nome Descrição
Método público AcquireConnections Obtains a connection or connection information by using a connection manager.
Método público Equals (Herdado de Object.)
Método protegido Finalize (Herdado de Object.)
Método público GetColumnIndexes Infraestrutura. Gets the collection of column index for the script component.
Método público GetHashCode (Herdado de Object.)
Método públicoMembro estático GetOutputID Returns the output ID that has a specified output name.
Método público GetType (Herdado de Object.)
Método público Log Writes a log entry.
Método protegido MemberwiseClone (Herdado de Object.)
Método público PostExecute Executes custom code that must run after the Script component has processed its inputs and outputs.
Método público PreExecute Executes custom code that must run before the Script component has processed its inputs and outputs.
Método público PrimeOutput Prepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
Método público ProcessInput(Int32, PipelineBuffer) Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
Método público ProcessInput(Int32, String, PipelineBuffer, OutputNameMap) Processes inputs in the script components.
Método público ReleaseConnections Releases a connection to a connection manager.
Método público SetBufferColumnIndexes Infraestrutura. Sets the index of the buffer columns.
Método público ToString (Herdado de Object.)

Início

Comentários

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 Codificando e depurando o componente Script and Compreendendo o Component Object Model Script.

Exemplos

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 Criando uma transformação síncrona com o 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

Segurança de thread

Qualquer membro público static (Shared no Visual Basic) desse tipo é seguro para threads. Não há garantia de que qualquer membro de instância seja seguro para threads.

Consulte também

Referência

Namespace Microsoft.SqlServer.Dts.Pipeline