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
範例輸出:
BreakOnExpressionChange? 否
描述在容器接收 OnPreExecute 事件時中斷
已啟用? 否
擊中數0
HitTarget 0
一律 System.windows.media.visualtreehelper.hittest
識別碼-2147483647
TaskHost 的擁有者