Question

This is possible if we manually create a FileSystemWatcher and watch the 'parts' directory (here some dlls inside the folder) and track any changes, then we reflect the changes into a container which allows for recomposition.

Does MEF support auto-updating when the Container is using a DirectoryCatalog and it automatically for us ?

Was it helpful?

Solution

You need to call the Refresh method of the DirectoryCatalog for it to update with new contents. This will trigger recomposition in any containers hooked up to the catalog. You can create a FileSystemWatcher and call the Refresh method when anything changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top