September 2010
Intermediate to advanced
272 pages
5h 16m
English
The abstract Activity class is the root of all subactivity classes. In this task, we will create a custom activity inheriting directly from Activity.
Add a new code file MyActivity.cs in the ActivityLibrary project, and fill the file with the following code:
using System;
using System.Activities;
using System.Activities.Statements;
public class MyActivity:Activity {
public MyActivity() {
this.Implementation = () => new Sequence {
Activities = {
new WriteLine(){Text="Hello MyActivity"}
}
};
}
}Then build the activity project so that MyActivity appears in the toolbox panel of the workflow designer.
In the WorkflowConsoleApp ...