/// <summary>
        /// 获得路径配置信息
        /// </summary>
        /// <returns>路径配置信息</returns>
        public static ImagePathConfigSettings GetConfig()
        {
            ImagePathConfigSettings result =
                (ImagePathConfigSettings)ConfigurationBroker.GetSection(imagePathConfigName);

            ConfigurationExceptionHelper.CheckSectionNotNull(result, imagePathConfigName);
            return(result);
        }
Пример #2
0
        public string GetUploadRootPath(string rootPathName)
        {
            ExceptionHelper.CheckStringIsNullOrEmpty(rootPathName, "rootPathName");

            ImagePathSettingsElement elem = (ImagePathSettingsElement)ImagePathConfigSettings.GetConfig().Paths[rootPathName];

            ExceptionHelper.FalseThrow(elem != null, "不能在配置节imagePathSettings下找到名称为\"{0}\"的路径定义", rootPathName);

            return(elem.Dir);
        }