private static KeyConfigFormatObjcet GetFormatObjcetDict(CacheKeyConfig keyConfig) { if (keyConfig == null) { throw new InkeyException(InkeyErrorCodes.CommonFailure, "缓存配置获取失败"); } if (string.IsNullOrEmpty(keyConfig.ProjectName)) { if (string.IsNullOrEmpty(AppInfo.AppCode)) { throw new InkeyException(InkeyErrorCodes.CommonFailure, "缓存配置项目名称参数缺失"); } keyConfig.ProjectName = AppInfo.AppCode; } if (string.IsNullOrEmpty(keyConfig.ProjectShowName)) { if (string.IsNullOrEmpty(AppInfo.AppName)) { throw new InkeyException(InkeyErrorCodes.CommonFailure, "缓存配置项目名称参数缺失"); } keyConfig.ProjectShowName = AppInfo.AppName; } return(new KeyConfigFormatObjcet(keyConfig.ProjectName, keyConfig.CacheKeys, keyConfig.CacheValueTypes)); }
public static KeyConfigFormatObjcet GetFormatObjcetDictFromAssembly(Assembly assembly) { CacheKeyConfig keysConfig = GetKeyConfigFormAssembly(assembly); return(GetFormatObjcetDict(keysConfig)); }
public static KeyConfigFormatObjcet GetFormatObjcetDictFromConfig(CacheKeyConfig keysConfig) { return(GetFormatObjcetDict(keysConfig)); }