Partager via


Méthode AcceptBreakpointManager

Passes a BreakpointManager to a task. The task will use the breakpoint manager to create, remove, and check the status of breakpoints. This method is called by the runtime and is not used in code.

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Sub AcceptBreakpointManager ( _
    breakpointManager As BreakpointManager _
)
'Utilisation
Dim instance As IDTSBreakpointSite
Dim breakpointManager As BreakpointManager

instance.AcceptBreakpointManager(breakpointManager)
void AcceptBreakpointManager(
    BreakpointManager breakpointManager
)
void AcceptBreakpointManager(
    BreakpointManager^ breakpointManager
)
abstract AcceptBreakpointManager : 
        breakpointManager:BreakpointManager -> unit 
function AcceptBreakpointManager(
    breakpointManager : BreakpointManager
)

Paramètres

Exemples

This method is overridden if you create a custom task. The following sample code demonstrates creating a breakpoint using the BreakpointManager and calling the OnBreakpointHit method to raise the event.

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