TransferErrorMessagesTask.AcceptBreakpointManager Method
Allows the task to create, remove, and check the status of breakpoints. This method is called by the run-time engine when a task or container is created and is not used in code.
Пространство имен: Microsoft.SqlServer.Dts.Tasks.TransferErrorMessagesTask
Сборка: Microsoft.SqlServer.TransferErrorMessagesTask (in microsoft.sqlserver.transfererrormessagestask.dll)
Синтаксис
'Декларация
Public Sub AcceptBreakpointManager ( _
manager As BreakpointManager _
)
public void AcceptBreakpointManager (
BreakpointManager manager
)
public:
virtual void AcceptBreakpointManager (
BreakpointManager^ manager
) sealed
public final void AcceptBreakpointManager (
BreakpointManager manager
)
public final function AcceptBreakpointManager (
manager : BreakpointManager
)
Параметры
- manager
The BreakpointManager to use for controlling breakpoints on this task or container.
Пример
This method is overridden when you create a custom task.
The IDTSBreakpointSite interface defines this method, which is inherited by tasks and called by the run-time engine during task creation. The method takes the BreakpointManager object as a parameter, which is then used by each task to create and manage its breakpoints.
The following code sample demonstrates how to override the method when writing a custom task. The sample creates a breakpoint using the BreakpointManager and calls the OnBreakpointHit method to raise the event. For more information, see Adding Support for Debugging in a Custom Task.
public void AcceptBreakpointManager( BreakpointManager breakPointManager )
{
// Store the breakpoint manager locally.
this.bpm = breakPointManager;
// Create a breakpoint.
this.bpm.CreateBreakPoint( 1 , "A sample breakpoint." );
}
public override DTSExecResult Execute( Connections connections, Variables variables, IDTSComponentEvents events, IDTSLogging log, DtsTransaction txn)
{
if( this.bpm.IsBreakpointTargetEnabled( 1 ) == true )
events.OnBreakpointHit( this.bpm.GetBreakpointTarget( 1 ) );
}
Public Sub AcceptBreakpointManager(ByVal breakPointManager As BreakpointManager)
' Store the breakpoint manager locally.
Me.bpm = breakPointManager
' Create a breakpoint.
Me.bpm.CreateBreakPoint(1 , "A sample breakpoint.")
End Sub
Public Overrides Function Execute(ByVal connections As Connections, ByVal variables As Variables, ByVal events As IDTSComponentEvents, ByVal log As IDTSLogging, ByVal txn As DtsTransaction) As DTSExecResult
If Me.bpm.IsBreakpointTargetEnabled(1) = True Then
events.OnBreakpointHit(Me.bpm.GetBreakpointTarget(1))
End If
End Function
Синхронизация потоков
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.
Платформы
Платформы разработки
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
Целевые платформы
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
См. также
Справочник
TransferErrorMessagesTask Class
TransferErrorMessagesTask Members
Microsoft.SqlServer.Dts.Tasks.TransferErrorMessagesTask Namespace