Dibaca dalam bahasa Inggeris

Kongsi melalui


WmiEventWatcherTask.AcceptBreakpointManager(BreakpointManager) Method

Definition

Passes a BreakpointManager reference to the WmiEventWatcherTask task. This method is called by the runtime and is not used in code.

C#
public void AcceptBreakpointManager(Microsoft.SqlServer.Dts.Runtime.BreakpointManager manager);

Parameters

manager
BreakpointManager

The BreakpointManager reference to be passed.

Implements

Examples

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 runtime 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 sample code demonstrates how to override the method when writing a custom task, creating a breakpoint using the BreakpointManager and calling the OnBreakpointHit method to raise the event. For more information, see Adding Support for Debugging in a Custom Task.

C#
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 ) );  
}  

Applies to

Produk Versi
SQL Server .NET SDK 2016, 2017, 2019