次の方法で共有


DtsContainer.DebugMode Property

DtsContainer オブジェクトがデバッグ モードであるかどうか、および実行中に OnBreakpointHit イベントを起動する必要があるかどうかを示す Boolean を取得します。値の設定も可能です。

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

構文

'宣言
Public Property DebugMode As Boolean
public bool DebugMode { get; set; }
public:
virtual property bool DebugMode {
    bool get () sealed;
    void set (bool value) sealed;
}
/** @property */
public final boolean get_DebugMode ()

/** @property */
public final void set_DebugMode (boolean value)
public final function get DebugMode () : boolean

public final function set DebugMode (value : boolean)

プロパティ値

true の場合は、オブジェクトがデバッグ モードであり、OnBreakpointHit イベントが起動されることを示します。

解説

IsBreakpointTargetEnabled 関数は、タスクがコード内のブレークポイントに到達するたびに呼び出されます。IsBreakpointTargetEnabled 関数を呼び出してブレークポイント ターゲットが有効であるかどうかを確認すると、繰り返し呼び出した場合に負担が大きいため、DebugMode フラグは、オーバーライドされ、その実行ファイルがデバッグされるかどうかを示すために各継承クラスによって使用されます。このフラグが false に設定されている場合は、タスクは、有効なブレークポイントを確認する呼び出しを回避できます。値が true の場合、タスクが有効なブレークポイントを確認する必要があることを示し、その場合は IsBreakpointTargetEnabled が確認されます。

使用例

Package クラスは、EventsProvider の継承によって DtsContainer を実装します。次のコード例では、パッケージを作成した後、DtsContainer から継承した値を表示および設定します。

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)
        {
            // The package is the ExecuteProcess package sample 
            // that is installed with the SSIS samples.
            string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";

            Application app = new Application();
            Package p1 = app.LoadPackage(pkg, null);

            // Show the properties inherited from DtsContainer.
            Console.WriteLine("CreationName:    {0}", p1.CreationName);
            Console.WriteLine("DebugMode:       {0}", p1.DebugMode);
            Console.WriteLine("DelayValidation: {0}", p1.DelayValidation);
            Console.WriteLine("Description:     {0}", p1.Description);
            Console.WriteLine("Disable:         {0}", p1.Disable);

            // Description is not set for this sample, so set it.
            p1.Description = "This is the Execute Process Package Sample";
            Console.WriteLine("Description after modification: {0}", p1.Description);

            Console.WriteLine();
        }
    }
}
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)
            ' The package is the ExecuteProcess package sample 
            ' that is installed with the SSIS samples.
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx" 
 
            Dim app As Application =  New Application() 
            Dim p1 As Package =  app.LoadPackage(pkg,Nothing) 
 
            ' Show the properties inherited from DtsContainer.
            Console.WriteLine("CreationName:    {0}", p1.CreationName)
            Console.WriteLine("DebugMode:       {0}", p1.DebugMode)
            Console.WriteLine("DelayValidation: {0}", p1.DelayValidation)
            Console.WriteLine("Description:     {0}", p1.Description)
            Console.WriteLine("Disable:         {0}", p1.Disable)
 
            ' Description is not set for this sample, so set it.
            p1.Description = "This is the Execute Process Package Sample"
            Console.WriteLine("Description after modification: {0}", p1.Description)
 
            Console.WriteLine()
        End Sub
    End Class
End Namespace

サンプルの出力 :

CreationName: MSDTS.Package.1

DebugMode: False

DelayValidation: True

Description:

Disable: False

Description after modification: This is the Execute Process Package Sample

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

DtsContainer Class
DtsContainer Members
Microsoft.SqlServer.Dts.Runtime Namespace