/// <summary> /// 读取配置文件 /// </summary> /// <param name="sectionName"></param> /// <returns></returns> public RedisSetting GetSetting(string sectionName = StaticString.DefautlRedisConfigSection) { try { string dllName = StaticString.DefaultRedisConfigDll; var section = _configuration.GetSection(sectionName); var result = section.Get <RedisSetting>(); result.ClientName = StaticString.FormatKey(dllName, sectionName); return(result); } catch (Exception) { throw new Exception("读取缓存配置错误"); } }