Using the Switch<T> activity in Sequence workflow
In this task, we will inspect the usage of the Switch activity in Sequence workflow. The Switch<T>
activity will not only accept a string
as a condition but also an object.
How to do it...
- Create a Workflow project:
Create a new Workflow Console Application project and name the project as
UsingSwitchActivityInSequenceWorkflow
. - Create a test class file
Product.cs
:Add a new class to the project, name it
Product.cs
, and fill the file with the following code:using System; using System.ComponentModel; namespace UsingSwitchActivityInSequenceWorkflow { [TypeConverter(typeof(ProductConverter))] public class Product { public string ProductName { get; set; } public Guid ProductId { get; set; } public Product() ...
Get Microsoft Windows Workflow Foundation 4.0 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.