Customize module load order

Topics: CAB & Smart Client Software Factory
Oct 21, 2005 at 2:03 AM
originally posted by: mlatilik

Can anyone help me how replace the standard catalog loader in the startup sequence? This is not like as it was in the in "Composite UI Application Block Tech Preview 1". I need the replace ICatalogReaderService, because I read the xml otherwise. If I replace ICatalogReaderService in the BeforeShellCreated method in ShellApplication and add the new instance, it doesn't work.


this.RootWorkItem.Services.AddNew<MyCatalogReaderService, ICatalogReaderService>();
Oct 21, 2005 at 4:48 AM
originally posted by: BradWilsonMSFT

We made a change to way the module loader finds out what modules to load. The new interface is IModuleEnumerator, and we're shipping two enumerators in the box: the FileCatalogModuleEnumerator (the default one that reads the ProfileCatalog.xml file), and ReflectionModuleEnumerator (one which can be pointed to a directory, like a Plugins directory, and it automatically loads all the modules it finds).

Unfortunately, in the October CTP drop, you cannot easily replace the enumerator. This will be fixed in the final release, though, and the process will be exactly like it used to be: replace the service registered for IModuleEnumerator.
Oct 21, 2005 at 6:47 PM
originally posted by: mlatilik

OK, Thanks for advice.
Oct 25, 2005 at 7:52 PM
originally posted by: PProvost

If you want this functionaliity now, you can update CabApplication.cs to use look in the root work item for a module enumerator service and/or a module loader service. That's basically the change we made.