CallTelClient.cs 709 B

12345678910111213141516171819202122232425
  1. using Hotline.CallCenter.Tels;
  2. using Hotline.CallCenter.Tels.CallTelDomain;
  3. using Mapster;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Tr.Sdk;
  10. public class CallTelClient : ICallTelClient
  11. {
  12. private readonly ITrClient _trClient;
  13. public CallTelClient(ITrClient trClient)
  14. {
  15. _trClient = trClient;
  16. }
  17. public async Task<List<QueryTelResponse>> QueryTelsAsync(QueryTelRequest request, CancellationToken cancellationToken)
  18. {
  19. var result = await _trClient.QueryTelsAsync(request.Adapt<Tels.QueryTelRequest>(), cancellationToken);
  20. return result.Adapt<List<QueryTelResponse>>();
  21. }
  22. }