Core18N.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Resources;
  2. namespace ERP.Core.Resources
  3. {
  4. public class Core18N
  5. {
  6. private static readonly ResourceManager _resourceManager = new ResourceManager(typeof(Core18N));
  7. /// <summary>
  8. /// token 失效
  9. /// </summary>
  10. public static string? TokenValidate => GetString("TokenValidate");
  11. /// <summary>
  12. /// 被踢下线
  13. /// </summary>
  14. public static string? KickedOut => GetString("KickedOut");
  15. /// <summary>
  16. /// 被顶下线
  17. /// </summary>
  18. public static string? ConcurrentLogin => GetString("ConcurrentLogin");
  19. /// <summary>
  20. /// 被顶下线
  21. /// </summary>
  22. public static string? IdleTimeOut => GetString("IdleTimeOut");
  23. /// <summary>
  24. /// 沒有權限
  25. /// </summary>
  26. public static string? NoPermission => GetString("NoPermission");
  27. /// <summary>
  28. /// 获取对应的I18N消息
  29. /// </summary>
  30. /// <param name="name"></param>
  31. /// <returns></returns>
  32. public static string? GetString(string name) => _resourceManager.GetString(name);
  33. }
  34. }