PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application will host instances of different workflows. The workflows may contain unhandled errors. You need to ensure that the application can handle the exceptions that are passed from the instances of the different workflows. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
WorkflowRuntime runtime = new WorkflowRuntime();runtime.StartRuntime();WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));try { instance.Start();}catch (Exception ex) { }

B.
WorkflowRuntime runtime = new WorkflowRuntime(); WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow)); try { runtime.StartRuntime();}catch (Exception ex) { }

C.
WorkflowRuntime runtime = new WorkflowRuntime(); WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));runtime.StartRuntime();runtime.WorkflowTerminated += new EventHandler<WorkflowTerminatedEventArgs>(terminated);

D.
WorkflowRuntime runtime = new WorkflowRuntime();WorkflowInstance instance = runtime.CreateWorkflow(typeof(CustomerWorkflow));runtime.StartRuntime();runtime.WorkflowAborted += new EventHandler<WorkflowEventArgs>(aborted);


Leave a Reply