September 2010
Intermediate to advanced
272 pages
5h 16m
English
There are many built-in composite activities in WF4 such as Sequence, While, Parallel, and so on. Is it possible to create our own composite activity? Well, the answer is we can. For demonstration purposes, we will create a MySequence
activity in this task.
Add a new code file to the ActivityLibrary project named MySequence.cs. Then, replace all the default code with the following code:
using System.Activities; using System.Collections.ObjectModel; namespace ActivityLibrary { public class MySequence:NativeActivity { public Collection<Activity> Activities { get; set; } public MySequence() { Activities = new Collection<Activity>(); } int activityCounter = 0; protected override ...