ICatchDataProvider.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using CB.Entity;
  4. using CB.LotteryCatchData.Entity;
  5. namespace CB.LotteryCatchData.Interface
  6. {
  7. /// <summary>
  8. /// 彩票数据抓取接口
  9. /// </summary>
  10. /// <typeparam name="T"></typeparam>
  11. public interface ICatchDataProvider
  12. {
  13. /// <summary>
  14. /// 获取临时配置数据
  15. /// </summary>
  16. /// <param name="fileName"></param>
  17. /// <returns></returns>
  18. LotteryParamKeys GetLotteryParamKeys(string fileName);
  19. /// <summary>
  20. /// 获取最新开奖号
  21. /// </summary>
  22. /// <returns></returns>
  23. LotteryOpenCode GetLatestOpenCode();
  24. /// <summary>
  25. /// 从第三方抓取的开奖数据
  26. /// </summary>
  27. /// <param name="config"></param>
  28. /// <param name="keys"></param>
  29. /// <returns></returns>
  30. IList<LotteryOpenCode> CatchData(LotteryConfigInfo config, LotteryParamKeys keys);
  31. /// <summary>
  32. /// 存储抓取的开奖数据
  33. /// 更新LotteryParamKeys值 LocalTerm为有效开奖数据的最大期数 LastOpenTime为LocalTerm对应的开奖时间
  34. /// </summary>
  35. /// <param name="list"></param>
  36. /// <returns></returns>
  37. int SaveData(IList<LotteryOpenCode> list, ref LotteryParamKeys keys);
  38. }
  39. }