Package.GetBreakpointTargets(IDTSBreakpointSite, Boolean) メソッド

定義

BreakpointTargets コレクションを返します。 onlyEnabled パラメーターの設定により、コレクションには、パッケージ内のすべてのブレークポイント ターゲットが含まる場合と、有効なブレークポイント ターゲットのみが含まれる場合があります。

public:
 Microsoft::SqlServer::Dts::Runtime::BreakpointTargets ^ GetBreakpointTargets(Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite ^ bpSite, bool onlyEnabled);
public Microsoft.SqlServer.Dts.Runtime.BreakpointTargets GetBreakpointTargets (Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite bpSite, bool onlyEnabled);
member this.GetBreakpointTargets : Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite * bool -> Microsoft.SqlServer.Dts.Runtime.BreakpointTargets
Public Function GetBreakpointTargets (bpSite As IDTSBreakpointSite, onlyEnabled As Boolean) As BreakpointTargets

パラメーター

bpSite
IDTSBreakpointSite

IDTSBreakpointSite インターフェイスを実装するオブジェクトです。

onlyEnabled
Boolean

コレクションに含めるブレークポイント ターゲットの種類を示すブール値。 true は、有効なブレークポイントのみがコレクションに含まれていることを示し、false は、すべてのブレークポイント ターゲットがコレクションに含まれていることを示します。

戻り値

BreakpointTargets

BreakpointTargets コレクション。

次のコード サンプルでは、パッケージでブレークポイントのコレクションを取得するための GetBreakpointTargets の使用方法を示します。

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

注釈

onlyenabled パラメーターは、true に設定すると、Enabled プロパティの値を確認し、Enabledtrue に設定されたそれらのブレークポイントを含めます。

Integration Services (SSIS) では、コンテナーとタスクのブレークポイントがサポートされています。 SQL Server Data Tools (SSDT) にはデバッグ ウィンドウが用意されており、SSIS デザイナーにはパッケージ制御フローのデバッグに関する進行状況レポートが用意されています。 SSIS デザイナーには、[ ブレークポイントの設定 ] ダイアログ ボックスが用意されています。このダイアログ ボックスでは、ブレークポイントを有効にし、ランタイム エンジンの実行が停止するまでにブレークポイントが発生する回数を設定できます。 タスク ブレークポイントが有効になっている場合は、[ 制御フロー ] ウィンドウのデザイン画面のタスクの横にブレークポイント アイコンが表示されます。 イベントで発生するブレークポイントを設定できます。 イベントにブレークポイントを設定する方法の詳細については、「 Integration Services (SSIS) イベント ハンドラー」を参照してください。

適用対象