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;
                }
            }
        }
Exemplo n.º 2
0
 static Web20DefaultConfig()
 {
     instance = new Web20DefaultConfig();
 }
Exemplo n.º 3
0
		static Web20DefaultConfig ()
		{
			instance = new Web20DefaultConfig ();
		}
Exemplo 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;
				}
			}
		}