IDataExplainer.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*********************************************************************************
  2. *Author: OnClick
  3. *Version: 0.0.1
  4. *UnityVersion: 2018.3.11f1
  5. *Date: 2019-09-08
  6. *Description: IFramework
  7. *History: 2018.11--
  8. *********************************************************************************/
  9. using System.Collections.Generic;
  10. using System.Reflection;
  11. namespace IFramework.Serialization.DataTable
  12. {
  13. /// <summary>
  14. /// string 解释器
  15. /// </summary>
  16. public interface IDataExplainer
  17. {
  18. /// <summary>
  19. /// 根据格子反序列化一个实例
  20. /// </summary>
  21. /// <typeparam name="T"></typeparam>
  22. /// <param name="cols"></param>
  23. /// <param name="membersDic">需要反序列化的成员</param>
  24. /// <returns></returns>
  25. T CreatInstance<T>(List<DataColumn> cols, Dictionary<MemberInfo, string> membersDic);
  26. /// <summary>
  27. /// 根据 具体类型 获取单个数据格子数据
  28. /// </summary>
  29. /// <typeparam name="T"></typeparam>
  30. /// <param name="t"></param>
  31. /// <param name="membersDic">需要序列化的成员</param>
  32. /// <returns></returns>
  33. List<DataColumn> GetColumns<T>(T t, Dictionary<MemberInfo, string> membersDic);
  34. }
  35. }