public void Stop()
 {
     hoster.Dispose();
     try
     {
         AppDomain.Unload(appDomain);
     }
     catch (Exception e)
     {
         log.Error(
             "Could not unload app domain, it is likely that there is a running thread that could not be aborted", e);
     }
 }