WorkflowRuntime.Stopped WorkflowRuntime.Stopped WorkflowRuntime.Stopped WorkflowRuntime.Stopped Event

정의

워크플로 런타임 엔진이 중지될 때 발생합니다.Occurs when the workflow run-time engine is 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 Event Stopped As EventHandler(Of WorkflowRuntimeEventArgs) 

예제

다음 예제에서는 이벤트 처리기가 StoppedWorkflowRuntime 이벤트에 추가됩니다.In the following example, an event handler is added to the Stopped event of the WorkflowRuntime. 이 예제에서 처리기는 단순한 메시지를 콘솔에 표시하는 익명 메서드입니다.In this example, the handler is an anonymous method that prints a simple message to the console.

// 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 이벤트를 발생시킵니다.The StopRuntime method raises the Stopped event after it has invoked the Stop method implemented by each of its services that derive from the WorkflowRuntimeService class. 이러한 워크플로 런타임 엔진 서비스가 중지되는 순서는 경우에 따라 달라지며, 이러한 서비스 중 다른 서비스에서 사용되는 기능이 있는 일부 서비스는 다른 서비스도 중지될 때까지 해당 기능을 유지해야 할 수 있습니다.There is no guarantee about the order in which these workflow run-time engine services are stopped, and some of these services may need to preserve some functionality that is relied on by other services until they too are stopped. 이러한 서비스는 WorkflowRuntimeService.OnStopped 이벤트가 발생할 때 나머지 종료 논리를 수행하기 위해 Stopped 메서드를 재정의할 수 있습니다.Such services can override the WorkflowRuntimeService.OnStopped method to perform any residual shutdown logic when the Stopped event is raised.

이벤트를 처리 하는 방법에 대 한 자세한 내용은 이벤트 처리 및 발생을 참조 하세요.For more information about handling events, see Handling and raising events.

적용 대상