다음을 통해 공유


BreakpointTarget.HitTarget 속성

Gets or sets the value used in conjunction with HitTest operation.

네임스페이스:  Microsoft.SqlServer.Dts.Runtime
어셈블리:  Microsoft.SqlServer.ManagedDTS(Microsoft.SqlServer.ManagedDTS.dll)

구문

‘선언
Public Property HitTarget As Integer 
    Get 
    Set
‘사용 방법
Dim instance As BreakpointTarget 
Dim value As Integer 

value = instance.HitTarget

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

속성 값

유형: System.Int32
An Integer representing the target value; compare to the HitCount value to determine if the breakpoint should occur.

주의

The HitTest enumeration property defines an operator, which is applied to HitCount and HitTarget values.

The following code example retrieves the breakpoint target collection from the package and iterates through the breakpoints, displaying the properties for each breakpoint, including the HitTarget.

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

Sample Output:

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

참고 항목

참조

BreakpointTarget 클래스

Microsoft.SqlServer.Dts.Runtime 네임스페이스