Windows Server AppFabric provides an API for implementing custom Instance Store, Query, and Control providers.
In the first recipe of this chapter, we have seen that Windows Server AppFabric provides a default SqlWorkflowInstanceStoreProvider
which provides access to .NET Framework's SqlWorkflowInstanceStore
. As Windows Sever AppFabric uses provider models we can implement a custom Instance Store provider.
In this recipe, we will focus on developing a custom Instance Store provider.
Start Visual Studio 2010 with administrative privileges and create a new class library project using C#.
We will add a new class named CustomInstanceStoreProvider
which will implement an abstract base class called InstanceStoreProvider
. We will then add the implementation details accordingly.
1. Rename the default class to
CustomInstanceControlProvider
.2. Add the following assembly references to your project:
System.Data.dll
System.Configuration...