JsonHelper.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // using System;
  2. // using System.IO;
  3. //
  4. // namespace ET
  5. // {
  6. // public static class JsonHelper
  7. // {
  8. // public static string ToJson(object obj)
  9. // {
  10. // return MongoHelper.ToJson(obj);
  11. // }
  12. //
  13. // public static T FromJson<T>(string str)
  14. // {
  15. // return MongoHelper.FromJson<T>(str);
  16. // }
  17. //
  18. // public static object FromJson(Type type, string str)
  19. // {
  20. // return MongoHelper.FromJson(type, str);
  21. // }
  22. //
  23. // public static byte[] Serialize(object obj)
  24. // {
  25. // return MongoHelper.Serialize(obj);
  26. // }
  27. //
  28. // public static void Serialize(object message, MemoryStream stream)
  29. // {
  30. // MongoHelper.Serialize(message, stream);
  31. // }
  32. //
  33. // public static object Deserialize(Type type, byte[] bytes)
  34. // {
  35. // return MongoHelper.Deserialize(type, bytes);
  36. // }
  37. //
  38. // public static object Deserialize(Type type, byte[] bytes, int index, int count)
  39. // {
  40. // return MongoHelper.Deserialize(type, bytes, index, count);
  41. // }
  42. //
  43. // public static object Deserialize(Type type, MemoryStream stream)
  44. // {
  45. // return MongoHelper.Deserialize(type, stream);
  46. // }
  47. //
  48. // public static T Deserialize<T>(byte[] bytes)
  49. // {
  50. // return MongoHelper.Deserialize<T>(bytes);
  51. // }
  52. //
  53. // public static T Deserialize<T>(byte[] bytes, int index, int count)
  54. // {
  55. // return MongoHelper.Deserialize<T>(bytes, index, count);
  56. // }
  57. // }
  58. // }