You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

2 years ago
  1. using System.Collections.Generic;
  2. namespace SqlSugar
  3. {
  4. internal static partial class ErrorMessage
  5. {
  6. internal static string ObjNotExist
  7. {
  8. get
  9. {
  10. return GetThrowMessage("{0} does not exist.",
  11. "{0}不存在。");
  12. }
  13. }
  14. internal static string EntityMappingError
  15. {
  16. get
  17. {
  18. return GetThrowMessage("Entity mapping error.{0}",
  19. "实体与表映射出错。{0}");
  20. }
  21. }
  22. public static string NotSupportedDictionary
  23. {
  24. get
  25. {
  26. return GetThrowMessage("This type of Dictionary is not supported for the time being. You can try Dictionary<string, string>, or contact the author!!",
  27. "暂时不支持该类型的Dictionary 你可以试试 Dictionary<string ,string>或者联系作者!!");
  28. }
  29. }
  30. public static string NotSupportedArray
  31. {
  32. get
  33. {
  34. return GetThrowMessage("This type of Array is not supported for the time being. You can try object[] or contact the author!!",
  35. "暂时不支持该类型的Array 你可以试试 object[] 或者联系作者!!");
  36. }
  37. }
  38. internal static string GetThrowMessage(string enMessage, string cnMessage, params string[] args)
  39. {
  40. var formatArgs = new List<string> { enMessage, cnMessage };
  41. formatArgs.AddRange(args);
  42. return string.Format(@"English Message : {0}
  43. Chinese Message : {1}", formatArgs.ToArray());
  44. }
  45. }
  46. }