c# - ASP MVC 4 MEF Lock Plugin -
c# - ASP MVC 4 MEF Lock Plugin -
i have next code
class="lang-cs prettyprint-override">public class mef { public compositioncontainer container { { homecoming _container; } set { _container = value; } } private compositioncontainer _container; public ienumerable<lazy<icontroller, dictionary<string, object>>> allcontrollers() { homecoming container.getexports<icontroller, dictionary<string, object>>(); } } ... private void updatecontrollers(userscontext context, moduledb moduledb) { mef mef = new mef(); var mefexports = mef.allexports(); //get exports foreach (lazy<icontroller, dictionary<string, object>> controllerlazy in mefexports) { string typename = controllerlazy.value.gettype().name; ... } mef.container.releaseexports(mefexports); //try relese gc.collect(); }
and seek delete plug-in, locked process, how delete plugin-file?
c# mef
Comments
Post a Comment