Package.GetBreakpointTargets(IDTSBreakpointSite, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 BreakpointTargets 集合。 根据 onlyEnabled
参数的设置,该集合包含包中的所有断点目标或仅包含启用的断点目标。
public:
Microsoft::SqlServer::Dts::Runtime::BreakpointTargets ^ GetBreakpointTargets(Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite ^ bpSite, bool onlyEnabled);
public Microsoft.SqlServer.Dts.Runtime.BreakpointTargets GetBreakpointTargets (Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite bpSite, bool onlyEnabled);
member this.GetBreakpointTargets : Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite * bool -> Microsoft.SqlServer.Dts.Runtime.BreakpointTargets
Public Function GetBreakpointTargets (bpSite As IDTSBreakpointSite, onlyEnabled As Boolean) As BreakpointTargets
参数
- bpSite
- IDTSBreakpointSite
一个实现 IDTSBreakpointSite 接口的对象。
- onlyEnabled
- Boolean
一个布尔值,指示要包含在集合中的断点目标类型。 true 表示仅启用的断点包含在集合中,false 指示集合中包括所有断点目标。
返回
一个 BreakpointTargets 集合。
示例
以下代码示例演示如何使用 GetBreakpointTargets 此方法获取包中的断点集合。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
namespace Breakpoint_API
{
class Program
{
static void Main(string[] args)
{
Package pkg = new Package();
TaskHost taskHost = (TaskHost)pkg.Executables.Add("STOCK:FileSystemTask");
BreakpointTargets bptargets = pkg.GetBreakpointTargets(taskHost, false);
foreach (BreakpointTarget bpt in bptargets)
{
Console.WriteLine("BreakOnExpressionChange? {0}", bpt.BreakOnExpressionChange.ToString());
Console.WriteLine("Description {0}", bpt.Description);
Console.WriteLine("Enabled? {0}", bpt.Enabled);
Console.WriteLine("HitCount {0}", bpt.HitCount);
Console.WriteLine("HitTarget {0}", bpt.HitTarget);
Console.WriteLine("HitTest {0}", bpt.HitTest);
Console.WriteLine("ID {0}", bpt.ID);
Console.WriteLine("Owner {0}", bpt.Owner);
}
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.BulkInsertTask
Namespace Breakpoint_API
Class Program
Shared Sub Main(ByVal args() As String)
Dim pkg As Package = New Package()
Dim taskHost As TaskHost = CType(pkg.Executables.Add("STOCK:FileSystemTask"), TaskHost)
Dim bptargets As BreakpointTargets = pkg.GetBreakpointTargets(taskHost,False)
Dim bpt As BreakpointTarget
For Each bpt In bptargets
Console.WriteLine("BreakOnExpressionChange? {0}", bpt.BreakOnExpressionChange.ToString())
Console.WriteLine("Description {0}", bpt.Description)
Console.WriteLine("Enabled? {0}", bpt.Enabled)
Console.WriteLine("HitCount {0}", bpt.HitCount)
Console.WriteLine("HitTarget {0}", bpt.HitTarget)
Console.WriteLine("HitTest {0}", bpt.HitTest)
Console.WriteLine("ID {0}", bpt.ID)
Console.WriteLine("Owner {0}", bpt.Owner)
Next
End Sub
End Class
End Namespace
示例输出:
BreakOnExpressionChange? False
Description Break when the container receives the OnPreExecute event
Enabled? False
HitCount 0
HitTarget 0
HitTest Always
ID -2147483647
Owner Microsoft.SqlServer.Dts.Runtime.TaskHost
注解
The onlyenabled parameter, when set to true, checks the value of the Enabled property and includes those breakpoints with an Enabled set to true
.
Integration Services (SSIS) 支持容器和任务的断点。 SQL Server Data Tools (SSDT) 提供调试窗口,SSIS 设计器提供调试包控制流的进度报告。 SSIS 设计器提供了 “设置断点 ”对话框,可在其中启用断点,并在运行时引擎停止运行之前设置断点发生的次数。 如果启用了任务断点,则 “控制流 ”窗口设计图面上的任务旁边会显示断点图标。 可以将断点设置为在事件上发生。 有关设置事件断点的详细信息,请参阅 Integration Services (SSIS) 事件处理程序。