BreakpointTarget.BreakOnExpressionChange 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获得或设置一个布尔值,指示代码是继续运行还是在表达式变化时停止执行。
public:
property bool BreakOnExpressionChange { bool get(); void set(bool value); };
public bool BreakOnExpressionChange { get; set; }
member this.BreakOnExpressionChange : bool with get, set
Public Property BreakOnExpressionChange As Boolean
属性值
一个布尔值,表示表达式变化时代码是否会被破坏。 true表示该包将被破坏;false 表示包裹不会损坏。
示例
以下代码示例从包中检索断点目标集合,并遍历断点,展示每个断点的属性,包括 BreakOnExpressionChange。
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
示例输出:
表情变化的破裂? 假
描述 当容器收到 OnPreExecute 事件时会中断
是否启用? 假
命中计数 0
命中目标0
HitTest 始终
身份 -2147483647
所有者是Microsoft。SqlServer.Dts.Runtime.TaskHost