static void EnsurePlugInLoader(string appPath) { if (_plugInLoader == null) { PlugInLoadHelper plugInLoadHelper = new PlugInLoadHelper(appPath); DrectSoftConfigurationSectionHandler.SetConfigurationDelegate(plugInLoadHelper.ReadPlugInLoadConfiguration); PlugInLoadConfiguration plugInLoadConfig = (PlugInLoadConfiguration)ConfigurationManager.GetSection(PlugInLoadConfigSectionName); _plugInLoader = new PlugInLoader(appPath, plugInLoadConfig); } }
private static AppDomain GetCustomAppDomain() { PlugInLoadHelper @object = new PlugInLoadHelper(Application.StartupPath); DrectSoftConfigurationSectionHandler.SetConfigurationDelegate(new DelegateReadConfiguration(@object.ReadPlugInLoadConfiguration)); PlugInLoadConfiguration plugInLoadConfiguration = (PlugInLoadConfiguration)ConfigurationManager.GetSection("plugInLoadSettings"); AppDomainSetup appDomainSetup = new AppDomainSetup(); appDomainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; appDomainSetup.ApplicationName = "DrectSoftEMR"; appDomainSetup.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; appDomainSetup.PrivateBinPath = plugInLoadConfiguration.AllPath; if (plugInLoadConfiguration.UseShadowCopy) { appDomainSetup.ShadowCopyFiles = "true"; appDomainSetup.CachePath = plugInLoadConfiguration.CachePath; } return(AppDomain.CreateDomain("DrectSoftEMR", null, appDomainSetup)); }
static AppDomain GetCustomAppDomain() { PlugInLoadHelper plugInLoadHelper = new PlugInLoadHelper(Application.StartupPath); DrectSoftConfigurationSectionHandler.SetConfigurationDelegate(plugInLoadHelper.ReadPlugInLoadConfiguration); PlugInLoadConfiguration plugInLoadConfig = (PlugInLoadConfiguration)ConfigurationManager.GetSection("plugInLoadSettings"); AppDomainSetup ads = new AppDomainSetup(); ads.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; ads.ApplicationName = "adcemr"; ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; ads.PrivateBinPath = plugInLoadConfig.AllPath; if (plugInLoadConfig.UseShadowCopy) { ads.ShadowCopyFiles = "true"; ads.CachePath = plugInLoadConfig.CachePath; } return(AppDomain.CreateDomain("adcemr", null, ads)); }