Search code examples
.net-4.0workflow-foundation-4

Why two different WorkflowServiceHost classes


I was wondering why there are two different WorkflowServiceHost class implementation in following namespaces 1. System.ServiceModel 2. System.ServiceModel.Activities

What are the purpose of these different implementation?

IMO different names would be better. It creates a lot of confusion.


Solution

  • This is because in the .NET 4 framework there are 2 different workflow stacks.

    The System.ServiceModel.Activities namespace contains the WF4 version. The System.ServiceModel namespace contains the WF3 version.

    And the same is true for other classes like Activity where there are multiple version. Different class names might help but they do have the same purpose. And namespaces are there to solve these kinds of differences.