Which XML code segment should you use?

A custom activity defined in an assembly named LitwareActivities is defined as follows:

namespace LitwareActivities
{
public class WriteLineActivity : Activity
{
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) {
Console.WriteLine(Message);
return ActivityExecutionStatus.Closed;
}
private string _message;
public string Message
{
get { return _message; }
set { _message = value; }
}

}
}
You need to create a sequential workflow where the execution path can be generated on the fly by an application.

Which XML code segment should you use?

A custom activity defined in an assembly named LitwareActivities is defined as follows:

namespace LitwareActivities
{
public class WriteLineActivity : Activity
{
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) {
Console.WriteLine(Message);
return ActivityExecutionStatus.Closed;
}
private string _message;
public string Message
{
get { return _message; }
set { _message = value; }
}

}
}
You need to create a sequential workflow where the execution path can be generated on the fly by an application.

Which XML code segment should you use?

A.
<SequentialWorkflowActivity
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"xmlns:x="http://schemas.microsoft.com/winfx/2006 /
xmlns:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"><Litware:WriteLineActivity Message="Hello, WF"/></SequentialWorkflowActivity>

B.
<Workflow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"xmlns:x="http://schemas.microsoft.com/winfx/2006/
xmlns:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"><Litware:WriteLineActivity Message="Hello, WF"/></Workflow>

C.
<Workflow xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" class:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"> <Litware:WriteLineActivity Message="Hello, WF"/></Workflow>

D.
<SequentialWorkflowActivity
class:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"> <Litware:WriteLineActivity Message="Hello, WF"/></SequentialWorkflowActivity>



Leave a Reply 0

Your email address will not be published. Required fields are marked *