public static void Init () { lock (lockobj) { if (config != null) return; WebDefaultConfig settings = WebDefaultConfig.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; } }
public static void Init() { lock (lockobj) { if (config != null) { return; } WebDefaultConfig settings = WebDefaultConfig.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; } }
static WebDefaultConfig() { instance = new WebDefaultConfig(); }
static WebDefaultConfig () { instance = new WebDefaultConfig (); }