DtsContainer.AcceptBreakpointManager 方法
This method is called by the run-time engine when a task or container is created, and passes it a BreakpointManager manager to allow the task to create, remove, and check the status of breakpoints. This method is called by the runtime and is not used in code.
命名空间: Microsoft.SqlServer.Dts.Runtime
程序集: Microsoft.SqlServer.ManagedDTS(在 Microsoft.SqlServer.ManagedDTS.dll 中)
语法
声明
Public Sub AcceptBreakpointManager ( _
breakpointManager As BreakpointManager _
)
用法
Dim instance As DtsContainer
Dim breakpointManager As BreakpointManager
instance.AcceptBreakpointManager(breakpointManager)
public void AcceptBreakpointManager(
BreakpointManager breakpointManager
)
public:
virtual void AcceptBreakpointManager(
BreakpointManager^ breakpointManager
) sealed
abstract AcceptBreakpointManager :
breakpointManager:BreakpointManager -> unit
override AcceptBreakpointManager :
breakpointManager:BreakpointManager -> unit
public final function AcceptBreakpointManager(
breakpointManager : BreakpointManager
)
参数
- breakpointManager
类型:Microsoft.SqlServer.Dts.Runtime.BreakpointManager
The BreakpointManager to use for controlling breakpoints on this task or container.
实现
IDTSBreakpointSite.AcceptBreakpointManager(BreakpointManager)
注释
This method contains a BreakpointManager object, which is used by the task to create and manage its breakpoints. For more information, see 在自定义任务中添加对调试的支持.
示例
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 在自定义任务中添加对调试的支持.
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