Share via


WorkflowCompletedEventArgs.OutputParameters Proprietà

Definizione

Ottiene l'output dal flusso di lavoro.

public:
 property System::Collections::Generic::Dictionary<System::String ^, System::Object ^> ^ OutputParameters { System::Collections::Generic::Dictionary<System::String ^, System::Object ^> ^ get(); };
public System.Collections.Generic.Dictionary<string,object> OutputParameters { get; }
member this.OutputParameters : System.Collections.Generic.Dictionary<string, obj>
Public ReadOnly Property OutputParameters As Dictionary(Of String, Object)

Valore della proprietà

Un Dictionary<TKey,TValue> di valori con chiave impostata in base al nome del parametro che contiene i parametri di output del flusso di lavoro.

Esempio

Nell'esempio di codice seguente viene illustrato come ottenere un valore da una chiave archiviata nella proprietà OutputParameters. Il metodo OnWorkflowCompleted dispone di un parametro che accetta un WorkflowCompletedEventArgs. Questo metodo viene chiamato quando viene generato l'evento WorkflowCompleted. Il codice utilizza la proprietà OutputParameters per ottenere il valore associato alla chiave Status e lo scrive nella console.

Questo esempio di codice fa parte dell'esempio SDK Sequential Workflow with Parameters nel file Program.cs. Per altre informazioni, vedere Esempio di flusso di lavoro con parametri.

static void OnWorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
{
    //The order status is stored in the "status" "out" parameter
    string orderStatus = e.OutputParameters["Status"].ToString();
    Console.WriteLine("Order was " + orderStatus);
    waitHandle.Set();
}
Shared Sub OnWorkflowCompleted(ByVal sender As Object, ByVal e As WorkflowCompletedEventArgs)

    'The order status is stored in the "status" "out" parameter
    Dim orderStatus As String = e.OutputParameters("Status").ToString()
    Console.WriteLine("Order was " + orderStatus)
    waitHandle.Set()
End Sub

Commenti

OutputParameters contiene i parametri out e ref del flusso di lavoro.

Si applica a

Vedi anche