Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }