WorkflowRuntime.Started Evento

Definição

Ocorre quando o mecanismo de tempo de execução de fluxo de trabalho é iniciado.Occurs when the workflow run-time engine is started.

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

Tipo de evento

EventHandler<WorkflowRuntimeEventArgs>

Exemplos

No exemplo a seguir, um manipulador de eventos é adicionado ao Started evento do WorkflowRuntime .In the following example, an event handler is added to the Started event of the WorkflowRuntime. Neste exemplo, o manipulador é um método anônimo que imprime uma mensagem simples no console.In this example, the handler is an anonymous method that prints a simple message to the console.

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

Comentários

O StartRuntime método gera o Started evento após ter validado a configuração de serviço principal do mecanismo de tempo de execução do fluxo de trabalho, invocado o Start método implementado por cada um de seus serviços que derivam da WorkflowRuntimeService classe e foram definidos IsStarted como true .The StartRuntime method raises the Started event after it has validated the core service configuration of the workflow run-time engine, has invoked the Start method implemented by each of its services that derive from the WorkflowRuntimeService class, and has set IsStarted to true. Não há nenhuma garantia sobre a ordem na qual os serviços que derivam da WorkflowRuntimeService classe são iniciados pelo mecanismo de tempo de execução do fluxo de trabalho, e alguns desses serviços do mecanismo de tempo de execução do fluxo de trabalho podem depender da funcionalidade fornecida por outros desses serviços para concluir suas tarefas de inicialização.There is no guarantee about the order in which the services that derive from the WorkflowRuntimeService class are started by the workflow run-time engine, and some of these workflow run-time engine services may depend on functionality supplied by other of these services to complete their startup tasks. Os serviços do mecanismo de tempo de execução do fluxo de trabalho podem substituir o WorkflowRuntimeService.OnStarted método para executar qualquer tarefa de inicialização final que exija o suporte de outros serviços do mecanismo de tempo de execução do fluxo de trabalho quando o Started evento for gerado.Workflow run-time engine services can override the WorkflowRuntimeService.OnStarted method to perform any final startup tasks that require the support of other workflow run-time engine services when the Started event is raised.

Para obter mais informações sobre como manipular eventos, consulte manipulando e gerando eventos.For more information about handling events, see Handling and raising events.

Aplica-se a