Task.WaitForMe Property
Returns a Boolean that indicates whether the parent container should wait for completion of this task. This property is read-only.
네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
구문
‘선언
<BrowsableAttribute(False)> _
Public Overridable ReadOnly Property WaitForMe As Boolean
[BrowsableAttribute(false)]
public virtual bool WaitForMe { get; }
[BrowsableAttribute(false)]
public:
virtual property bool WaitForMe {
bool get ();
}
/** @property */
public boolean get_WaitForMe ()
public function get WaitForMe () : boolean
속성 값
A Boolean that indicates if the container should wait for the task. A value of true indicates that the container must wait until the task is complete before the container can signal its completion.
주의
On completion of any task, the runtime examines tasks that are still running in the container, and if any of these tasks have WaitForMe set to false, those tasks will be canceled. This allows you to have tasks that do not block completion of a container. For example, you might want to listen for events, but not indefinitely, because it would keep the container from completing. You can set WaitForMe to true on only those tasks you are interested in and listen for events as long as those tasks are executing. After those tasks are done, you can stop listening.
예
The following code example creates the Send Mail task, which inherits from Task, and then displays the properties is has inherited.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.SendMailTask;
namespace Microsoft.SqlServer.SSIS.Samples
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Package pkg = new Package();
// Add a Send Mail task to the package.
Executable exec = pkg.Executables.Add("STOCK:SendMailTask");
// Cast the task to its own class.
TaskHost th = exec as TaskHost;
SendMailTask smTask = th.InnerObject as SendMailTask;
// Display the properties inherited from Task.
Console.WriteLine("ExecutionValue: {0}", smTask.ExecutionValue);
Console.WriteLine("Version: {0}", smTask.Version);
Console.WriteLine("WaitForMe: {0}", smTask.WaitForMe);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.SendMailTask
Namespace Microsoft.SqlServer.SSIS.Samples
Class Program
Shared Sub Main(ByVal args() As String)
Dim app As Application = New Application()
Dim pkg As Package = New Package()
' Add a Send Mail task to the package.
Dim exec As Executable = pkg.Executables.Add("STOCK:SendMailTask")
' Cast the task to its own class.
Dim th As TaskHost = exec as TaskHost
Dim smTask As SendMailTask = th.InnerObject as SendMailTask
' Display the properties inherited from Task.
Console.WriteLine("ExecutionValue: {0}", smTask.ExecutionValue)
Console.WriteLine("Version: {0}", smTask.Version)
Console.WriteLine("WaitForMe: {0}", smTask.WaitForMe)
End Sub
End Class
End Namespace
Sample Output:
ExecutionValue:
Version: 0
WaitForMe: 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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
Task Class
Task Members
Microsoft.SqlServer.Dts.Runtime Namespace