Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically call method after part has been composed in MEF

Tags:

.net

mef

Is there a way to specify that a method gets called automatically after a part has been composed? The method could be called on the composed part or in the class doing the composition.

like image 435
Gilles Avatar asked Sep 30 '11 20:09

Gilles


1 Answers

Yes. If your class implements the IPartImportsSatisfiedNotification interface, then the MEF container will call OnImportsSatisfied at the right time.

like image 115
Wim Coenen Avatar answered Sep 20 '22 01:09

Wim Coenen