WorkflowApplicationCompletedEventArgs.Outputs 속성

정의

인수 이름으로 키가 지정된 워크플로 인스턴스의 루트 활동에 대한 OutArgument 값을 포함하는 사전을 가져옵니다.

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

속성 값

값이 들어 있는 사전을 OutArguments 워크플로 인스턴스의 루트 활동에 인수 이름으로 입력 합니다.

예제

다음 코드 예제에서는 WorkflowApplicationCompletedEventArgs 인스턴스의 Completed 처리기로 전달된 WorkflowApplication를 검사하고 워크플로가 완료된 방식에 대한 정보를 표시합니다.

wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e)
{
    if (e.CompletionState == ActivityInstanceState.Faulted)
    {
        Console.WriteLine("Workflow {0} Terminated.", e.InstanceId);
        Console.WriteLine("Exception: {0}\n{1}",
            e.TerminationException.GetType().FullName,
            e.TerminationException.Message);
    }
    else if (e.CompletionState == ActivityInstanceState.Canceled)
    {
        Console.WriteLine("Workflow {0} Canceled.", e.InstanceId);
    }
    else
    {
        Console.WriteLine("Workflow {0} Completed.", e.InstanceId);

        // Retrieve the outputs of the workflow.
        foreach (var kvp in e.Outputs)
        {
            Console.WriteLine("Name: {0} - Value {1}",
                kvp.Key, kvp.Value);
        }

        // Outputs can be directly accessed by argument name.
        Console.WriteLine("The winner is {0}.", e.Outputs["Winner"]);
    }
};

적용 대상