IDataWriter.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections.Generic;
  2. using System;
  3. namespace IFramework.Serialization.DataTable
  4. {
  5. /// <summary>
  6. /// 数据写入器
  7. /// </summary>
  8. public interface IDataWriter:IDisposable
  9. {
  10. /// <summary>
  11. /// 写入
  12. /// </summary>
  13. /// <typeparam name="T"></typeparam>
  14. /// <param name="source"></param>
  15. void Write<T>(List<T> source);
  16. /// <summary>
  17. /// 写入文件
  18. /// </summary>
  19. /// <typeparam name="T"></typeparam>
  20. /// <param name="source"></param>
  21. /// <returns></returns>
  22. string WriteString<T>(List<T> source);
  23. /// <summary>
  24. /// 写入
  25. /// </summary>
  26. /// <param name="headNames"></param>
  27. /// <param name="rows"></param>
  28. /// <returns></returns>
  29. string WriteString(List<string> headNames, List<List<DataColumn>> rows);
  30. /// <summary>
  31. /// 写入文件
  32. /// </summary>
  33. /// <param name="headNames"></param>
  34. /// <param name="rows"></param>
  35. /// <returns></returns>
  36. void Write(List<string> headNames, List<List<DataColumn>> rows);
  37. }
  38. }