Partilhar via


IDTSBreakpointSite.AcceptBreakpointManager(BreakpointManager) Método

Definição

Passa um BreakpointManager para uma tarefa. A tarefa usará o gerenciador de ponto de interrupção para criar, remover e verificar o status de pontos de interrupção. Esse método é chamado pelo runtime e não é usado em código.

public:
 void AcceptBreakpointManager(Microsoft::SqlServer::Dts::Runtime::BreakpointManager ^ breakpointManager);
public void AcceptBreakpointManager (Microsoft.SqlServer.Dts.Runtime.BreakpointManager breakpointManager);
abstract member AcceptBreakpointManager : Microsoft.SqlServer.Dts.Runtime.BreakpointManager -> unit
Public Sub AcceptBreakpointManager (breakpointManager As BreakpointManager)

Parâmetros

breakpointManager
BreakpointManager

O gerenciador de ponto de interrupção específico para essa tarefa.

Exemplos

Esse método será substituído se você criar uma tarefa personalizada. O código de exemplo a seguir demonstra a criação de um ponto de interrupção usando o BreakpointManager método e chamando o OnBreakpointHit método para gerar o evento.

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  

Aplica-se a