Module Status Service


The Module Status Service can be used to retrieve a list of modules and their status (Loaded or Unloaded). This is particular useful when you want to show the user of your CompositeWPF application what modules are available to the application and which modules are actually active at this moment.


The use the Module Status Service it is required to have the ModuleTrackingExtension for unity registered with the unity container in the application. This can be done through the following code:

/// <summary>
/// Configures the container.
/// </summary>
protected override void ConfigureContainer()

    Container.AddExtension(new ModuleTrackingUnityExtension());

After that you can retrieve a list of modules by invoking the following code:

IModuleStatusService statusService = Container.Resolve<IModuleStatusService>();
ReadOnlyCollection<ModuleStatusInfo> modules = statusService.GetModules();

Last edited Jul 17, 2008 at 8:10 PM by WMeints, version 1


No comments yet.