The MathWebService example is included under the Chapter 26 subdirectory.
Building the WF Web Service Consumer
Now create a new Sequential Workflow Console Application project named WFMathClient and
rename your initial C# file to MathWF.cs. This application will ask the user for data to process and
which operation they wish to perform (addition, subtraction, etc.). To begin, open your code file
and define a new enum type named MathOperation:
public enum MathOperation
{
Add, Subtract, Multiply, Divide
}
Next, define four automatic properties in your class, two of which represent the numerical
data to process, one of which represents the result of the operation, and one of which represents the
mathematical operation itself (note the default constructor of MathWF sets the value of the Operation
property to MathOperation.Add):
public sealed partial class MathWF : SequentialWorkflowActivity
{
Do'stlaringiz bilan baham: