Friday, May 18, 2007

Startup Sequence and Initialization

During the startup sequence, CAB initializes the shell and the root WorkItem. It then populates the root WorkItem with the default services.


The CAB start-up and service loading sequence

  • The Main method calls the Run method of the shell application.
  • The shell creates the root WorkItem and initializes it.
  • The CabApplication (the base class of shell application) calls the Authentication service, which is responsible for setting up any principal on the current application domain.
  • The CatalogReader returns basic module configuration as a Solution Profile. The CatalogReader encapsulates choosing the right modules to load depending on the role of the user.
  • The loader is called with the solution profile and starts loading modules in the correct sequence.
  • The loader calls AddServices on the module entry class to let the module register its own services, registers the other services present in the module (types decorated with ServiceAttribute), calls the Load method in the module entry class, and then registers any WorkItemExtensions.

No comments: