Exemplo n.º 1
0
        private void InstantiatePlugIn(PlugInAttribute plugInInfo)
        {
            var     appDomain = _appDomains[plugInInfo];
            IPlugIn plugIn    = appDomain.CreateInstanceAndUnwrap(plugInInfo.PlugInName, plugInInfo.EntryType) as IPlugIn;

            _plugIns.Add(plugInInfo, plugIn);
        }
Exemplo n.º 2
0
        private void CreateAppDomain(PlugInAttribute plugInInfo)
        {
            AppDomainSetup domainSetup = new AppDomainSetup();
            domainSetup.ApplicationName = plugInInfo.PlugInName;
            domainSetup.ConfigurationFile = plugInInfo.PlugInName + ".dll.config";
            domainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
            var appDomain = AppDomain.CreateDomain(domainSetup.ApplicationName, AppDomain.CurrentDomain.Evidence, domainSetup);

            _appDomains.Add(plugInInfo, appDomain);
        }
Exemplo n.º 3
0
        private void CreateAppDomain(PlugInAttribute plugInInfo)
        {
            AppDomainSetup domainSetup = new AppDomainSetup();

            domainSetup.ApplicationName   = plugInInfo.PlugInName;
            domainSetup.ConfigurationFile = plugInInfo.PlugInName + ".dll.config";
            domainSetup.ApplicationBase   = AppDomain.CurrentDomain.BaseDirectory;
            var appDomain = AppDomain.CreateDomain(domainSetup.ApplicationName, AppDomain.CurrentDomain.Evidence, domainSetup);

            _appDomains.Add(plugInInfo, appDomain);
        }
Exemplo n.º 4
0
 private void InstantiatePlugIn(PlugInAttribute plugInInfo)
 {
     var appDomain = _appDomains[plugInInfo];
     IPlugIn plugIn = appDomain.CreateInstanceAndUnwrap(plugInInfo.PlugInName, plugInInfo.EntryType) as IPlugIn;
     _plugIns.Add(plugInInfo, plugIn);
 }
Exemplo n.º 5
0
 private void UnLoadAppDomain(PlugInAttribute plugInInfo)
 {
     AppDomain.Unload(_appDomains[plugInInfo]);
     _appDomains.Remove(plugInInfo);
 }
Exemplo n.º 6
0
 private void UnLoadAppDomain(PlugInAttribute plugInInfo)
 {
     AppDomain.Unload(_appDomains[plugInInfo]);
     _appDomains.Remove(plugInInfo);
 }