Bagikan melalui


WorkflowApplication.Aborted Properti

Definisi

Mendapatkan atau mengatur yang dipanggil saat instans Action<T> alur kerja dibatalkan.

public:
 property Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ Aborted { Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ get(); void set(Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ value); };
public Action<System.Activities.WorkflowApplicationAbortedEventArgs> Aborted { get; set; }
member this.Aborted : Action<System.Activities.WorkflowApplicationAbortedEventArgs> with get, set
Public Property Aborted As Action(Of WorkflowApplicationAbortedEventArgs)

Nilai Properti

Tindakan yang dipanggil saat instans alur kerja dibatalkan.

Contoh

Contoh kode berikut memeriksa WorkflowApplicationAbortedEventArgs yang diteruskan ke Aborted handler WorkflowApplication instans dan menampilkan informasi tentang mengapa alur kerja dibatalkan.

wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)
{
    // Display the exception that caused the workflow
    // to abort.
    Console.WriteLine("Workflow {0} Aborted.", e.InstanceId);
    Console.WriteLine("Exception: {0}\n{1}",
        e.Reason.GetType().FullName,
        e.Reason.Message);
};

Keterangan

Ketika alur kerja yang dihosting oleh WorkflowApplication dibatalkan, Aborted handler dipanggil dan Completed handler tidak dipanggil.

Berlaku untuk