IwbCacheNames.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using Abp.Localization;
  4. using IwbZero;
  5. using IwbZero.Authorization.Base.Roles;
  6. using IwbZero.Authorization.Base.Users;
  7. namespace WeOnlineApp.Configuration
  8. {
  9. public class IwbCacheNames
  10. {
  11. public const string PlayReportInfoCache = "PlayReportInfoCache";
  12. public const string PlayInfoCache = "PlayInfoCache";
  13. public const string PlayRunningInfoCache = "PlayRunningInfoCache";
  14. public const string CampInfoCache = "CampInfoCache";
  15. public const string SceneInfoCache = "SceneInfoCache";
  16. public const string PackageInfoCache = "PackageInfoCache";
  17. public const string UserInfoCache = "UserInfoCache";
  18. public const string FunctionCache = "FunctionCache";
  19. public const string NavFunctionCache = "NavFunctionCache";
  20. public static readonly List<string> RefreshList = new List<string>()
  21. {
  22. PlayReportInfoCache,
  23. PlayRunningInfoCache,
  24. PlayInfoCache,
  25. CampInfoCache,
  26. SceneInfoCache,
  27. PackageInfoCache,
  28. UserInfoCache,
  29. NavFunctionCache,
  30. FunctionCache,
  31. UserPermissionCacheItem.CacheStoreName,
  32. RolePermissionCacheItem.CacheStoreName,
  33. };
  34. public static List<SelectListItem> GetCacheList()
  35. {
  36. var sList = new List<SelectListItem> { new SelectListItem() { Value = "", Text = L("CacheAll") } };
  37. foreach (var l in RefreshList)
  38. {
  39. sList.Add(new SelectListItem() { Value = l, Text = L(l) });
  40. }
  41. return sList;
  42. }
  43. private static string L(string name)
  44. {
  45. var str = LocalizationHelper.GetSource(IwbZeroConsts.LocalizationSourceName).GetString(name);
  46. return str;
  47. }
  48. //public static List<CacheItem> Caches => new List<CacheItem>()
  49. //{
  50. // new CacheItem(FunctionCache),
  51. //};
  52. }
  53. //public class CacheItem
  54. //{
  55. // public CacheItem()
  56. // {
  57. // }
  58. // public CacheItem(string name, string displayName)
  59. // {
  60. // Name = name;
  61. // DisplayName = displayName;
  62. // }
  63. // public CacheItem(string name)
  64. // {
  65. // Name = name;
  66. // DisplayName = name;
  67. // }
  68. // public string Name { get; set; }
  69. // public string DisplayName { get; set; }
  70. //}
  71. }