Inheritance: IConfigurationSystem
        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;
                }
            }
        }
Esempio n. 2
0
 static Web20DefaultConfig()
 {
     instance = new Web20DefaultConfig();
 }
Esempio n. 3
0
		static Web20DefaultConfig ()
		{
			instance = new Web20DefaultConfig ();
		}
Esempio n. 4
0
		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;
				}
			}
		}