This project has moved. For the latest updates, please go here.

How about filling TypeCatalog without loading assembly

Aug 16, 2009 at 8:25 PM

Hi there!

I was just thinking about something on how to put information into the TypeCatalog without actually loading an assembly.
Me intent is to achieve something like a lazy load of an assembly, not only an lazy creation of the instance.
That means that when I want the instance of a type that is registered in the TypeCatalog, the type containing assembly gets loaded and the instance gets build.

What you think about that?


Aug 17, 2009 at 5:37 PM

Our default catalogs, TypeCatalog, AssemblyCatalog, and DirectoryCatalog were all designed to work againts already loaded assemblies, so short of abstracting the entire reflection subsystem (i.e. custom Assembly, Type, etc) which may be possible there isn’t any way to use them with-out loading the assemblies.

That said if you are interested in writing a catalog that does lazy loading of assemblies it would require some sort of caching of that information. We have provided some API’s, System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices, that would allow someone to write their own cached catalog. We are planning to release a sample cached catalog at some point (not exactly sure when), but until then have a look at ReflectionModelServices.