Aracılığıyla paylaş


FileSystemTask.SuspendExecution Yöntemi

Yürütülebilir askıya almak gerektiğini gösterir.Bu yöntem çalışma zamanı altyapısı tarafından çağrılır.

Ad Alanı:  Microsoft.SqlServer.Dts.Tasks.FileSystemTask
Derleme:  Microsoft.SqlServer.FileSystemTask (Microsoft.SqlServer.FileSystemTask içinde.dll)

Sözdizimi

'Bildirim
Public Sub SuspendExecution
'Kullanım
Dim instance As FileSystemTask

instance.SuspendExecution()
public void SuspendExecution()
public:
virtual void SuspendExecution() sealed
abstract SuspendExecution : unit -> unit 
override SuspendExecution : unit -> unit 
public final function SuspendExecution()

Uygulamalar

IDTSSuspend.SuspendExecution()

Açıklamalar

Kod, bu yöntem kullanılır.kesme noktası noktasıyla karşılaştı, bu çalışma zamanı tarafından çağrıldı.

Klasörden devralınan bu yöntem için kod sağlamanız gerekir ancak, IDTSSuspend , çok kanallı özel bir görev kullanan ProductService.asmx yazma sınıfıKırılma noktaları.Göreviniz akıtılan tek ise, yani, uygulamanız, Execute , özel görev, yeni iş parçacığı başlatılmazsa, bu arabirim uygulamak gerekenÖzel görevler yazma hakkında daha fazla bilgi için bkz: Özel görev geliştirme.

Örnekler

Aşağıdaki kod örneği geçersiz kılınmış bir örneğidir SuspendExecution yöntem için özel bir görev.

public void SuspendExecution() 
{
    lock (this) 
    {
        // If a suspend is required, do it. 
        if (m_suspendRequired != 0) 
           ChangeEvent(m_canExecute, false); 
        } 

        // The application cannot return from Suspend until the task
        // is suspended.
        // This can happen in one of two ways:
        // 1) The m_suspended event occurs, indicating that the 
        // execute thread has suspended, or 
        // 2) the canExecute flag is set, indicating that a suspend is
        // no longer required. 
        WaitHandle [] suspendOperationComplete = {m_suspended, m_canExecute};
        WaitHandle.WaitAny(suspendOperationComplete);
}
Public  Sub SuspendExecution()
    lock (Me)
    {
        If m_suspendRequired <> 0 Then
           ChangeEvent(m_canExecute, False)
        End If
    }
        ' The application cannot return from Suspend until the task
        ' is suspended. This can happen in one of two ways:
        ' 1) The m_suspended event occurs, indicating that the 
        ' execute thread has suspended, or 
        ' 2) the canExecute flag is set, indicating that a suspend is
        ' no longer required. 
        Dim suspendOperationComplete As WaitHandle() = {m_suspended, m_canExecute}
        WaitHandle.WaitAny(suspendOperationComplete)