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.

36 lines
979 B

2 years ago
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Euro.Transfer
  8. {
  9. public class ServiceBase
  10. {
  11. //log存放路徑
  12. public static string Errorlog_Path = Common.GetAppSetting("Errorlog_location");
  13. public static string Debuglog_Path = Common.GetAppSetting("Debuglog_location");
  14. #region JsonToString
  15. /// <summary>
  16. /// 轉換json字串
  17. /// </summary>
  18. /// <param name="o">要轉化的物件</param>
  19. public static string JsonToString(object o)
  20. {
  21. if (o != null)
  22. {
  23. return JsonConvert.SerializeObject(o, Formatting.Indented);//序列化,將物件轉化為字符串
  24. }
  25. return "";
  26. }
  27. #endregion
  28. }
  29. public class KeyValue
  30. {
  31. public string key { get; set; }
  32. public string value { get; set; }
  33. }
  34. }