WorkflowRuntime.Stopped 이벤트

정의

워크플로 런타임 엔진이 중지될 때 발생합니다.

public:
 event EventHandler<System::Workflow::Runtime::WorkflowRuntimeEventArgs ^> ^ Stopped;
public event EventHandler<System.Workflow.Runtime.WorkflowRuntimeEventArgs> Stopped;
member this.Stopped : EventHandler<System.Workflow.Runtime.WorkflowRuntimeEventArgs> 
Public Custom Event Stopped As EventHandler(Of WorkflowRuntimeEventArgs) 
Public Event Stopped As EventHandler(Of WorkflowRuntimeEventArgs) 

이벤트 유형

예제

다음 예제에서는 이벤트 처리기가 StoppedWorkflowRuntime 이벤트에 추가됩니다. 이 예제에서 처리기는 단순한 메시지를 콘솔에 표시하는 익명 메서드입니다.

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Add an anonymous method as the event handler for the Stopped event.
workflowRuntime.Stopped += new EventHandler<WorkflowRuntimeEventArgs>(
    delegate { Console.WriteLine("Workflow runtime stopped."); });
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Add a method as the event handler for the Stopped event.
AddHandler workflowRuntime.Stopped, AddressOf RuntimeStopped

설명

StopRuntime 메서드는 Stopped 클래스에서 파생된 각 서비스가 구현하는 Stop 메서드를 호출한 후 WorkflowRuntimeService 이벤트를 발생시킵니다. 이러한 워크플로 런타임 엔진 서비스가 중지되는 순서는 경우에 따라 달라지며, 이러한 서비스 중 다른 서비스에서 사용되는 기능이 있는 일부 서비스는 다른 서비스도 중지될 때까지 해당 기능을 유지해야 할 수 있습니다. 이러한 서비스는 WorkflowRuntimeService.OnStopped 이벤트가 발생할 때 나머지 종료 논리를 수행하기 위해 Stopped 메서드를 재정의할 수 있습니다.

이벤트 처리에 대한 자세한 내용은 이벤트 처리 및 발생을 참조하세요.

적용 대상