次の方法で共有


HitTest プロパティ

ブレークポイントが発生するかどうかをテストするためのスイッチとして使用される DTSBreakpointHitTest 列挙を取得します。値の設定も可能です。

名前空間:  Microsoft.SqlServer.Dts.Runtime
アセンブリ:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)

構文

'宣言
Public Property HitTest As DTSBreakpointHitTest
    Get
    Set
'使用
Dim instance As BreakpointTarget
Dim value As DTSBreakpointHitTest

value = instance.HitTest

instance.HitTest = value
public DTSBreakpointHitTest HitTest { get; set; }
public:
property DTSBreakpointHitTest HitTest {
    DTSBreakpointHitTest get ();
    void set (DTSBreakpointHitTest value);
}
member HitTest : DTSBreakpointHitTest with get, set
function get HitTest () : DTSBreakpointHitTest
function set HitTest (value : DTSBreakpointHitTest)

使用例

次のコード例では、ブレークポイント ターゲットのコレクションをパッケージから取得し、ブレークポイントを繰り返し処理して、HitTest など、各ブレークポイントのプロパティを表示します。

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