WebServiceTask.DebugMode Property
Gets or sets a Boolean that indicates if the task is in debug mode. The DebugMode property can be accessed by multiple threads at the same time. To ensure thread safety and avoid concurrency problems, the Interlocked class from the Microsoft .NET Framework is used.
네임스페이스: Microsoft.SqlServer.Dts.Tasks.WebServiceTask
어셈블리: Microsoft.SqlServer.WebServiceTask (in microsoft.sqlserver.webservicetask.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 if the task is in debug mode; otherwise, false.
주의
The Interlocked class provides atomic operations for variables that are shared by multiple threads. The threads of different processes can use this mechanism if the variable is in shared memory. For more information, see Interlocked and Interlocked Class in the .NET Framework Class Library.
The IsBreakpointTargetEnabled function is called each time the task encounters a breakpoint in its code. Because calling the function IsBreakpointTargetEnabled to see if the breakpoint target is enabled is expensive when called repeatedly, the DebugMode flag is used to indicate if the executable is to be debugged. When this flag is set to false, the task can avoid the call to check for an enabled breakpoint. A value of true indicates that the task should check for enabled breakpoints, and is when the IsBreakpointTargetEnabled is checked.
예
The following code example creates a WebServiceTask, shows the default settings of the properties, including the DebugMode, using the TaskHost. It then sets two fields to show how to set field values.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.WebServiceTask;
namespace Microsoft.SqlServer.SSIS.Samples
{
class Program
{
static void Main(string[] args)
{
Package pkg = new Package();
Executable exec1 = pkg.Executables.Add("STOCK:WebServiceTask");
TaskHost th = exec1 as TaskHost;
// List the default values of the Web Service task
// using the Properties collection of the TaskHost.
Console.WriteLine("Connection {0}", th.Properties["Connection"].GetValue(th));
Console.WriteLine("DebugMode {0}", th.Properties["DebugMode"].GetValue(th));
Console.WriteLine("OutputLocation {0}", th.Properties["OutputLocation"].GetValue(th));
Console.WriteLine("OutputType {0}", th.Properties["OutputType"].GetValue(th));
Console.WriteLine("OverwriteWsdlFile {0}", th.Properties["OverwriteWsdlFile"].GetValue(th));
Console.WriteLine("ServiceName {0}", th.Properties["ServiceName"].GetValue(th));
Console.WriteLine("SuspendRequired {0}", th.Properties["SuspendRequired"].GetValue(th));
Console.WriteLine("WebMethodInfo {0}", th.Properties["WebMethodInfo"].GetValue(th));
Console.WriteLine("WsdlFile {0}", th.Properties["WsdlFile"].GetValue(th));
Console.WriteLine("--------------------------");
// Show how to set a property using the TaskHost Properties.
th.Properties["OutputType"].SetValue(th, DTSOutputType.File);
th.Properties["OverwriteWsdlFile"].SetValue(th, true);
Console.WriteLine("New value of OutputType and OverwriteWsdlFile: {0}, {1}", th.Properties["OutputType"].GetValue(th), th.Properties["OverwriteWsdlFile"].GetValue(th));
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.WebServiceTask
Namespace Microsoft.SqlServer.SSIS.Samples
Class Program
Shared Sub Main(ByVal args() As String)
Dim pkg As Package = New Package()
Dim exec1 As Executable = pkg.Executables.Add("STOCK:WebServiceTask")
Dim th As TaskHost = exec1 as TaskHost
' List the default values of the Web Service task
' using the Properties collection of the TaskHost.
Console.WriteLine("Connection {0}", th.Properties("Connection").GetValue(th))
Console.WriteLine("DebugMode {0}", th.Properties("DebugMode").GetValue(th))
Console.WriteLine("OutputLocation {0}", th.Properties("OutputLocation").GetValue(th))
Console.WriteLine("OutputType {0}", th.Properties("OutputType").GetValue(th))
Console.WriteLine("OverwriteWsdlFile {0}", th.Properties("OverwriteWsdlFile").GetValue(th))
Console.WriteLine("ServiceName {0}", th.Properties("ServiceName").GetValue(th))
Console.WriteLine("SuspendRequired {0}", th.Properties("SuspendRequired").GetValue(th))
Console.WriteLine("WebMethodInfo {0}", th.Properties("WebMethodInfo").GetValue(th))
Console.WriteLine("WsdlFile {0}", th.Properties("WsdlFile").GetValue(th))
Console.WriteLine("--------------------------")
' Show how to set a property using the TaskHost Properties.
th.Properties("OutputType").SetValue(th, DTSOutputType.File)
th.Properties("OverwriteWsdlFile").SetValue(th, True)
Console.WriteLine("New value of OutputType and OverwriteWsdlFile: {0}, {1}", th.Properties("OutputType").GetValue(th), th.Properties("OverwriteWsdlFile").GetValue(th))
End Sub
End Class
End Namespace
Sample Output:
Connection
DebugMode False
OutputLocation
OutputType 0
OverwriteWsdlFile False
ServiceName
SuspendRequired False
WebMethodInfo
WsdlFile
--------------------------
New value of OutputType and OverwriteWsdlFile: 0, True
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
WebServiceTask Class
WebServiceTask Members
Microsoft.SqlServer.Dts.Tasks.WebServiceTask Namespace