WorkflowRuntime.GetLoadedWorkflows Metodo

Definizione

Ottiene una raccolta che contiene tutte le istanze del flusso di lavoro attualmente caricate in memoria.

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)

Restituisce

Un oggetto WorkflowInstance per ogni istanza del flusso di lavoro attualmente caricata in memoria.

Eccezioni

Esempio

Nell'esempio seguente viene illustrato come recuperare una raccolta di flussi di lavoro caricati da un oggetto WorkflowRuntime.

// 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()

Commenti

Si noti che, diversamente da GetWorkflow, questo metodo non genera un'eccezione InvalidOperationException se il runtime non è stato avviato.

Si applica a