Method WaitAsync
- Namespace
- IntentSharp.Specialist.Testing
- Assembly
- IntentSharp.Specialist.dll
WaitAsync(SpecialistTicket, TimeSpan, CancellationToken)
Waits up to timeout for the specialist of ticket. Returns the offer once it is
ready, or null when it is not ready yet. Either hold the call until the offer is ready or the timeout ends, or
answer null at once: within its wait, the runtime asks again after WaitPollInterval
with the time left. Never wait past the timeout: the runtime ends the call there and counts it as not ready.
public Task<SpecialistOffer?> WaitAsync(SpecialistTicket ticket, TimeSpan timeout, CancellationToken cancellationToken)
Parameters
ticketSpecialistTicketThe ticket RequestAsync(SpecialistRequest, CancellationToken) returned.
timeoutTimeSpanHow long this wait may take.
cancellationTokenCancellationTokenCancels the wait.
Returns
- Task<SpecialistOffer>