SendMailTask.AcceptBreakpointManager Method

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

命名空间: Microsoft.SqlServer.Dts.Tasks.SendMailTask
程序集: Microsoft.SqlServer.SendMailTask (in microsoft.sqlserver.sendmailtask.dll)

语法

声明
Public Sub AcceptBreakpointManager ( _
    breakPointMgr As BreakpointManager _
)
public void AcceptBreakpointManager (
    BreakpointManager breakPointMgr
)
public:
virtual void AcceptBreakpointManager (
    BreakpointManager^ breakPointMgr
) sealed
public final void AcceptBreakpointManager (
    BreakpointManager breakPointMgr
)
public final function AcceptBreakpointManager (
    breakPointMgr : BreakpointManager
)

参数

  • breakPointMgr
    The breakpoint manager specific for this task.

备注

The SendMailTask class uses the BreakpointManager to create, remove, and check the status of breakpoints. Tasks store the BreakpointManager locally for use during their Validate and Execute methods.

示例

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.

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.

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

SendMailTask Class
SendMailTask Members
Microsoft.SqlServer.Dts.Tasks.SendMailTask Namespace