O'Reilly logo

Pro C# 2010 and the .NET 4 Platform, Fifth Edition by Andrew Troelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

26.7. Consuming the Workflow Library

Any sort of application can make use of a workflow library; however, here you will opt for simplicity and build a simple Console Application named WorkflowLibraryClient. Once you make the project, you will need to set a reference not only to your CheckInventoryWorkflowLib.dll and AutoLot .dll assemblies, but also the key WF 4.0 library, System.Activities.dll, which can be found in the .NET tab of the Visual Studio 2010 Add Reference dialog.

Once each assembly reference has been set, update your Program.cs file with the following logic:

using System;
using System.Linq;
using System.Activities;
using System.Collections.Generic;
using CheckInventoryWorkflowLib; namespace WorkflowLibraryClient { class Program ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required