DTSBreakpointHitTest 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
枚举命中计数类型的值。 此类与 BreakpointTarget 类一起使用。
public enum class DTSBreakpointHitTest
public enum DTSBreakpointHitTest
type DTSBreakpointHitTest =
Public Enum DTSBreakpointHitTest
- 继承
-
DTSBreakpointHitTest
字段
Always | 0 | 断点命中时始终挂起执行。 |
Equal | 2 | 断点发生的次数等于命中计数时挂起执行。 |
Expression | 4 | 表达式更改时挂起执行。 |
GreaterOrEqual | 1 | 断点发生的次数等于或大于命中计数时挂起执行。 |
Multiple | 3 | 断点发生的次数为命中计数的倍数时挂起执行。 |
示例
下面的代码示例修改了使用此枚举的 BreakpointTarget 默认值。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.SSIS.Samples
{
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);
// Get the first breakpoint in the collection.
BreakpointTargetEnumerator myEnumerator = bptargets.GetEnumerator();
myEnumerator.MoveNext();
BreakpointTarget bptFirstOne = myEnumerator.Current;
// Display the initial values.
Console.WriteLine("Description {0}", bptFirstOne.Description);
Console.WriteLine("Enabled? {0}", bptFirstOne.Enabled);
Console.WriteLine("HitTest {0}", bptFirstOne.HitTest);
Console.WriteLine("ID {0}", bptFirstOne.ID);
Console.WriteLine("--------------------------------------------");
// Modify the default value of HitTest.
myEnumerator.Reset();
myEnumerator.MoveNext();
bptFirstOne = myEnumerator.Current;
bptFirstOne.HitTest = DTSBreakpointHitTest.Equal;
// Display the values again, including the new HitTest.
Console.WriteLine("Description {0}", bptFirstOne.Description);
Console.WriteLine("Enabled? {0}", bptFirstOne.Enabled);
Console.WriteLine("HitTest {0}", bptFirstOne.HitTest);
Console.WriteLine("ID {0}", bptFirstOne.ID);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Microsoft.SqlServer.SSIS.Samples
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)
' Get the first breakpoint in the collection.
Dim myEnumerator As BreakpointTargetEnumerator = bptargets.GetEnumerator()
myEnumerator.MoveNext()
Dim bptFirstOne As BreakpointTarget = myEnumerator.Current
' Display the initial values.
Console.WriteLine("Description {0}", bptFirstOne.Description)
Console.WriteLine("Enabled? {0}", bptFirstOne.Enabled)
Console.WriteLine("HitTest {0}", bptFirstOne.HitTest)
Console.WriteLine("ID {0}", bptFirstOne.ID)
Console.WriteLine("--------------------------------------------")
' Modify the default value of HitTest.
myEnumerator.Reset()
myEnumerator.MoveNext()
bptFirstOne = myEnumerator.Current
bptFirstOne.HitTest = DTSBreakpointHitTest.Equal
' Display the values again, including the new HitTest.
Console.WriteLine("Description {0}", bptFirstOne.Description)
Console.WriteLine("Enabled? {0}", bptFirstOne.Enabled)
Console.WriteLine("HitTest {0}", bptFirstOne.HitTest)
Console.WriteLine("ID {0}", bptFirstOne.ID)
End Sub
End Class
End Namespace
示例输出:
当容器收到 OnPreExecute 事件时的说明中断
是否启用? False
HitTest Always
ID -2147483647
--------------------------------------------
当容器收到 OnPreExecute 事件时的说明中断
是否启用? False
HitTest 相等
ID -2147483647
注解
若要为断点添加灵活性和功能,可以通过配置断点命中计数来修改断点的行为,该计数指定在运行时引擎挂起前发生的断点次数,以及命中计数类型,该表达式包含指定命中点的时间的表达式。 此属性中使用 HitTest 此值。