다음을 통해 공유


DTSBreakpointHitTest Enumeration

Enumerates the values for the hit count types. This class works with the BreakpointTarget class.

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

구문

‘선언
Public Enumeration DTSBreakpointHitTest
public enum DTSBreakpointHitTest
public enum class DTSBreakpointHitTest
public enum DTSBreakpointHitTest
public enum DTSBreakpointHitTest

Members

Member name Description
Always Execution is always suspended when the breakpoint is hit.
Equal Execution is suspended when the number of times the breakpoint has occurred is equal to the hit count.
Expression Execution is suspended when the expression changes.
GreaterOrEqual Execution is suspended when the number of times the breakpoint has occurred is equal to or greater than the hit count.
Multiple Execution is suspended when a multiple of the hit count occurs.

주의

To add flexibility and power to a breakpoint, you can modify the behavior of a breakpoint by configuring the breakpoint hit count, which specifies the number of times a breakpoint occurs before the run-time engine is suspended, and the hit count type, which contains an expression that specifies when the breakpoint is hit. This value is used in the HitTest property.

The following code example modifies the default value of a BreakpointTarget using this enumeration.

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

Sample Output:

Description Break when the container receives the OnPreExecute event

Enabled? False

HitTest Always

ID -2147483647

--------------------------------------------

Description Break when the container receives the OnPreExecute event

Enabled? False

HitTest Equal

ID -2147483647

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

Microsoft.SqlServer.Dts.Runtime Namespace