/// <summary> /// sectionName /// </summary> /// <param name="sectionName">sectionName</param> /// <returns>RedisSettings</returns> public static RedisSettings GetConfig(string sectionName) { RedisSettings section = (RedisSettings)ConfigurationManager.GetSection(sectionName); if (section == null) { throw new ConfigurationErrorsException("Section " + sectionName + " is not found."); } return(section); }
/// <summary> /// GetConfig /// </summary> /// <returns>RedisSettings</returns> public static RedisSettings GetConfig() { RedisSettings section = GetConfig(RedisMappingConstants.RedisConfiguration); return(section); }