Partilhar via


WorkflowRuntime.GetLoadedWorkflows Método

Definição

Obtém uma coleção que contém todas as instâncias de fluxo de trabalho atualmente carregadas na memória.

public:
 System::Collections::ObjectModel::ReadOnlyCollection<System::Workflow::Runtime::WorkflowInstance ^> ^ GetLoadedWorkflows();
public System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.Runtime.WorkflowInstance> GetLoadedWorkflows ();
member this.GetLoadedWorkflows : unit -> System.Collections.ObjectModel.ReadOnlyCollection<System.Workflow.Runtime.WorkflowInstance>
Public Function GetLoadedWorkflows () As ReadOnlyCollection(Of WorkflowInstance)

Retornos

ReadOnlyCollection<WorkflowInstance>

Um objeto WorkflowInstance para cada instância de fluxo de trabalho atualmente carregada na memória.

Exceções

Exemplos

O exemplo a seguir demonstra como recuperar uma coleção de fluxos de trabalho carregados de um WorkflowRuntime objeto.

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Start the runtime
workflowRuntime.StartRuntime();
// Create a collection of workflow instances
ReadOnlyCollection<WorkflowInstance> workflows;
// Populate the collection of workflow instances
workflows = workflowRuntime.GetLoadedWorkflows();
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Start the runtime
workflowRuntime.StartRuntime()
' Create a collection of workflow instances
Dim workflows As ReadOnlyCollection(Of WorkflowInstance)
' Populate the collection of workflow instances
workflows = workflowRuntime.GetLoadedWorkflows()

Comentários

Observe que, ao contrário GetWorkflow, esse método não gerará um InvalidOperationException se o runtime não for iniciado.

Aplica-se a