IMesService.cs 962 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace TeamAAS_VP.Interfaces
  6. {
  7. /// <summary>
  8. /// MES 通信服务接口,提供通过配置的 URL 执行过站及提交信息的 GET 请求。
  9. /// </summary>
  10. public interface IMesService : IDisposable
  11. {
  12. /// <summary>
  13. /// 使用配置的过站 URL 发起 GET 请求。可传入额外的查询参数。
  14. /// 返回 (IsSuccess, ResponseString)。
  15. /// </summary>
  16. Task<(bool IsSuccess, string Response)> StationGetAsync(IDictionary<string, string> queryParameters = null, CancellationToken cancellationToken = default);
  17. /// <summary>
  18. /// 使用配置的提交 URL 发起 GET 请求。可传入额外的查询参数。
  19. /// 返回 (IsSuccess, ResponseString)。
  20. /// </summary>
  21. Task<(bool IsSuccess, string Response)> SubmitGetAsync(IDictionary<string, string> queryParameters = null, CancellationToken cancellationToken = default);
  22. }
  23. }