FtpTask.DebugMode Property
Indicates whether a task should check if breakpoints are enabled.
네임스페이스: Microsoft.SqlServer.Dts.Tasks.FtpTask
어셈블리: Microsoft.SqlServer.FtpTask (in microsoft.sqlserver.ftptask.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 should check if breakpoints are enabled; false if the task can skip checking for breakpoints.
주의
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 an FtpTask, then shows the default values it contains after creation. Some fields are empty, and must be explicitly set before the task is executed in the package.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FtpTask;
namespace FTPTask
{
class Program
{
static void Main(string[] args)
{
Package pkg = new Package();
Executable exec1 = pkg.Executables.Add("STOCK:FTPTask");
TaskHost th = exec1 as TaskHost;
// List the default values of the FTP 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("ExecutionValue {0}", th.Properties["ExecutionValue"].GetValue(th));
Console.WriteLine("IsLocalPathVariable {0}", th.Properties["IsLocalPathVariable"].GetValue(th));
Console.WriteLine("IsRemotePathVariable {0}", th.Properties["IsRemotePathVariable"].GetValue(th));
Console.WriteLine("IsTransferTypeASCII {0}", th.Properties["IsTransferTypeASCII"].GetValue(th));
Console.WriteLine("LocalPath {0}", th.Properties["LocalPath"].GetValue(th));
Console.WriteLine("Operation {0}", th.Properties["Operation"].GetValue(th));
Console.WriteLine("OperationName {0}", th.Properties["OperationName"].GetValue(th));
Console.WriteLine("OverwriteDestination {0}", th.Properties["OverwriteDestination"].GetValue(th));
Console.WriteLine("RemotePath {0}", th.Properties["RemotePath"].GetValue(th));
Console.WriteLine("StopOnOperationFailure {0}", th.Properties["StopOnOperationFailure"].GetValue(th));
Console.WriteLine("SuspendRequired {0}", th.Properties["SuspendRequired"].GetValue(th));
Console.WriteLine("--------------------------");
// Show how to set a property using the TaskHost Properties.
th.Properties["Operation"].SetValue(th, DTSFTPOp.Receive);
Console.WriteLine("New value of Operation: {0}", th.Properties["Operation"].GetValue(th));
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.FtpTask
Namespace FTPTask
Class Program
Shared Sub Main(ByVal args() As String)
Dim pkg As Package = New Package()
Dim exec1 As Executable = pkg.Executables.Add("STOCK:FTPTask")
Dim th As TaskHost = exec1 as TaskHost
' List the default values of the FTP 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("ExecutionValue {0}", th.Properties("ExecutionValue").GetValue(th))
Console.WriteLine("IsLocalPathVariable {0}", th.Properties("IsLocalPathVariable").GetValue(th))
Console.WriteLine("IsRemotePathVariable {0}", th.Properties("IsRemotePathVariable").GetValue(th))
Console.WriteLine("IsTransferTypeASCII {0}", th.Properties("IsTransferTypeASCII").GetValue(th))
Console.WriteLine("LocalPath {0}", th.Properties("LocalPath").GetValue(th))
Console.WriteLine("Operation {0}", th.Properties("Operation").GetValue(th))
Console.WriteLine("OperationName {0}", th.Properties("OperationName").GetValue(th))
Console.WriteLine("OverwriteDestination {0}", th.Properties("OverwriteDestination").GetValue(th))
Console.WriteLine("RemotePath {0}", th.Properties("RemotePath").GetValue(th))
Console.WriteLine("StopOnOperationFailure {0}", th.Properties("StopOnOperationFailure").GetValue(th))
Console.WriteLine("SuspendRequired {0}", th.Properties("SuspendRequired").GetValue(th))
Console.WriteLine("--------------------------")
' Show how to set a property using the TaskHost Properties.
th.Properties("Operation").SetValue(th, DTSFTPOp.Receive)
Console.WriteLine("New value of Operation: {0}", th.Properties("Operation").GetValue(th))
End Sub
End Class
End Namespace
Sample Output:
Connection
DebugMode False
ExecutionValue 0
IsLocalPathVariable False
IsRemotePathVariable False
IsTransferTypeASCII False
LocalPath
Operation 0
OperationName
OverwriteDestination False
RemotePath
StopOnOperationFailure True
SuspendRequired False
--------------------------
New value of Operation: 1
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
FtpTask Class
FtpTask Members
Microsoft.SqlServer.Dts.Tasks.FtpTask Namespace