/// <summary>
        /// Update the WebConfig file
        ///
        /// Accecpt a WebConfigHelper instance to replace the exist one. TextFiles
        /// dictionary will be updated accordingly.
        /// </summary>
        public void UpdateWebConfig(WebConfigHelper webConfig)
        {
            if (webConfig == null)
            {
                throw new ArgumentNullException("webConfig");
            }

            this._webConfig = webConfig;
            this.TextFiles["web.config"] = _webConfig.ToString();
        }
        /// <summary>
        /// Update the WebConfig file.
        ///
        /// Accept a action of update XElement representing the WebConfig. If there is no
        /// web.config exists by the time this method is called, a default web.config xml dom
        /// will be created. After update action is excuted the web.config represent in
        /// TextFiles will be updated.
        ///
        /// If the action is null, no exception will be thrown but the web.config will be
        /// always updated.
        /// </summary>
        public void UpdateWebConfig(Action <WebConfigHelper> action)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }

            if (_webConfig == null)
            {
                _webConfig = CreateDefaultWebConfig();
            }

            action(this._webConfig);
            this.TextFiles["web.config"] = _webConfig.ToString();
        }
        /// <summary>
        /// Update the WebConfig file
        /// 
        /// Accecpt a WebConfigHelper instance to replace the exist one. TextFiles 
        /// dictionary will be updated accordingly.
        /// </summary>
        public void UpdateWebConfig(WebConfigHelper webConfig)
        {
            if (webConfig == null)
            {
                throw new ArgumentNullException("webConfig");
            }

            this._webConfig = webConfig;
            this.TextFiles["web.config"] = _webConfig.ToString();
        }