private static System.Configuration.Configuration OpenExeConfigurationImpl(ConfigurationFileMap fileMap, bool isMachine, ConfigurationUserLevel userLevel, string exePath)
 {
     if ((!isMachine && (((fileMap == null) && (exePath == null)) || ((fileMap != null) && (((ExeConfigurationFileMap)fileMap).ExeConfigFilename == null)))) && ((s_configSystem != null) && (s_configSystem.GetType() != typeof(ClientConfigurationSystem))))
     {
         throw new ArgumentException(System.Configuration.SR.GetString("Config_configmanager_open_noexe"));
     }
     return(ClientConfigurationHost.OpenExeConfiguration(fileMap, isMachine, userLevel, exePath));
 }
Ejemplo n.º 2
0
        private static Configuration OpenExeConfigurationImpl(ConfigurationFileMap fileMap, bool isMachine, ConfigurationUserLevel userLevel, string exePath)
        {
            // exePath must be specified if not running inside ClientConfigurationSystem
            if (!isMachine &&
                (((fileMap == null) && (exePath == null)) ||
                 ((fileMap != null) && ((( ExeConfigurationFileMap )fileMap).ExeConfigFilename == null))
                )
                )
            {
                if ((s_configSystem != null) &&
                    (s_configSystem.GetType() != typeof(ClientConfigurationSystem)))
                {
                    throw new ArgumentException(SR.GetString(SR.Config_configmanager_open_noexe));
                }
            }

            return(ClientConfigurationHost.OpenExeConfiguration(fileMap, isMachine, userLevel, exePath));
        }