Implementing SWAI

Use the following procedure to implement the SWAI feature.

To implement SWAI on the desktop

  1. Create a hosted control that implements ISessionController. The SessionChange method exists in IHostedApplication and is a member of the HostedController class. You must override the SessionChange method to implement your custom code.
  2. In the AddSession method, add a call to the ApplicationHost.SessionOpen method.

Until recently, all applications had to be created as either external, Web, or hosted controls. In CCF 2009, there is an additional application type: extended applications. Extended applications are those that can be instantiated or created by methods that are not part of the CCF system. Extended applications are created through a provider system. CCF calls out to a provider assembly created by the solution integrator to create or instantiate the application, as it is needed. The only limiting factor is that the application (or an adapter) must implement the IHostedApplication3 or IHostedApplication4 interface.


The flow of an extended application is very similar to that of other providers used in CCF. You create a provider by inheriting the ExtendedApplicationProvider abstract class. You can think of this class as a traffic cop. Based on the application record, it wil either create the application itself, instantiate it, or pass this function to another class. You can use a switch statement to accomplish this, as shown in the following example.


                    switch app.ApplicationName
{
case “Application1”:
// instantiate/create application
break;
case “Application2”:
// call another class (factory) to instantiate/create application
break;
}

                  

See the Microsoft.Ccf.Samples.ExtendedApplicationDemo for an example of the provider and see Microsoft.Ccf.Samples.ExtendedApplicationSample for a simple example of an extended application. In the example, a UserControl implements IHostedApplication3, but it could be any type of application.

The Admin Console does not include extended applications in the list of applications for configuration. Extended applications must be configured manually in the database.


The EventLogSetup application assists in installing and uninstalling the CCF source into the Event log.

The syntax is:

Microsoft.Ccf.Tools.EventLogSetup Install

Microsoft.Ccf.Tools.EventLogSetup Uninstall


Show: