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.
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() { this.ProductName = "Defualt Name"; this.ProductId =Guid.NewGuid(); } public Product(string productName, Guid productId) { this.ProductName = productName...