internal static void Init() { lock (lockobj) { if (config != null) { return; } /* deal with the ConfigurationSettings stuff */ { Web20DefaultConfig settings = Web20DefaultConfig.GetInstance(); Type t = typeof(ConfigurationSettings); MethodInfo changeConfig = t.GetMethod("ChangeConfigurationSystem", privStatic); if (changeConfig == null) { throw new ConfigurationException("Cannot find method CCS"); } object [] args = new object [] { settings }; oldConfig = (IConfigurationSystem)changeConfig.Invoke(null, args); config = settings; config.Init(); } /* deal with the ConfigurationManager stuff */ { HttpConfigurationSystem system = new HttpConfigurationSystem(); Type t = typeof(ConfigurationManager); MethodInfo changeConfig = t.GetMethod("ChangeConfigurationSystem", privStatic); if (changeConfig == null) { throw new ConfigurationException("Cannot find method CCS"); } object [] args = new object [] { system }; changeConfig.Invoke(null, args); //configSystem = system; } } }