Freigeben über


PipelineComponent.RegisterEvents Method

When you are developing a custom data flow component, you override this method to create custom events.

Namespace: Microsoft.SqlServer.Dts.Pipeline
Assembly : Microsoft.SqlServer.PipelineHost (in microsoft.sqlserver.pipelinehost.dll)

Syntax

'Declaration
Public Overridable Sub RegisterEvents
public virtual void RegisterEvents ()
public:
virtual void RegisterEvents ()
public void RegisterEvents ()
public function RegisterEvents ()

Hinweise

This method is overridden by components that create custom events. Because the custom events declared by a component are not persisted in the package XML, this method is called as the component is loaded into the designer, and at the start of execution.

For more information, see Raising and Defining Events in a Data Flow Component.

Beispiel

The following example shows a component that overrides this method and creates a custom event using the EventInfos collection.

public override void RegisterEvents()
{
string[] parameters = new string[1]{"Parameter1"};
ushort[] types = new ushort[1]{DtsConvert.VarTypeFromTypeCode(TypeCode.String)};
string[] descriptions = new string [1]{"The first parameter."};

EventInfos.Add("OnPreExecute", "Fires when the PreExecute method runs.", false, ref parameters, ref types, ref descriptions);

}
Public Overrides Sub RegisterEvents() 
 Dim parameters As String() = New String(1) {"Parameter1"} 
 Dim types As System.UInt16() = New System.UInt16(1) {DtsConvert.VarTypeFromTypeCode(TypeCode.String)} 
 Dim descriptions As String() = New String(1) {"The first parameter."} 
 EventInfos.Add("OnPreExecute", "Fires when the PreExecute method runs.", False, parameters, types, descriptions) 
End Sub

Threadsicherheit

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

PipelineComponent Class
PipelineComponent Members
Microsoft.SqlServer.Dts.Pipeline Namespace