سؤال

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 ?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top