示例#1
0
        /// <summary>
        /// 开始创建所有运用程序配置对象的链
        /// </summary>
        /// <param name="sections">节点信息</param>
        public AppConfigurationManager(XmlNode sections)
        {
            configurationData = sections;
            ConfigurationAgentManager cam = new ConfigurationAgentManager(configurationData);

            DatabaseConfig = new DatabaseConfiguration(cam.GetData("Application.Database"));
        }
        /// <summary>
        /// the constructor start the chain reaction of
        /// creating all the configuration object used by the application
        /// </summary>
        /// <param name="sections">the xml element containing the configuraiton settings</param>
        public AppConfigurationManager(XmlNode sections)
        {
            configurationData = sections;
            ConfigurationAgentManager cam = new ConfigurationAgentManager(configurationData);

            //create the indivdual configuraiton object and assign them to the public fields
            DatabaseConfig     = new DatabaseConfiguration(cam.GetData("Application.Database"));
            MessageQueueConfig = new MessageQueueConfiguration(cam.GetData("Application.MessageQueue"));
        }