public static class Polling
Helper methods for polling scenarios.
Namespace
Google.Api.GaxAssembly
Google.Api.Gax.dll
Methods
PollRepeatedlyAsync<TResponse>(Func<DateTime?, Task<TResponse>>, Predicate<TResponse>, IClock, IScheduler, PollSettings, CancellationToken)
public static Task<TResponse> PollRepeatedlyAsync<TResponse>(Func<DateTime?, Task<TResponse>> pollAction, Predicate<TResponse> completionPredicate, IClock clock, IScheduler scheduler, PollSettings pollSettings, CancellationToken cancellationToken)
Asynchronously repeatedly calls the specified polling action, delaying between calls, until a given condition is met in the response.
pollAction
completionPredicate
Predicate
The test for whether to return the response ( true
) or continue
polling ( false
). Must not be null.
clock
scheduler
pollSettings
cancellationToken
A task representing the asynchronous operation. The result of the task will be the completed response.
TResponse
The response type.
PollRepeatedly<TResponse>(Func<DateTime?, TResponse>, Predicate<TResponse>, IClock, IScheduler, PollSettings, CancellationToken)
public static TResponse PollRepeatedly<TResponse>(Func<DateTime?, TResponse> pollAction, Predicate<TResponse> completionPredicate, IClock clock, IScheduler scheduler, PollSettings pollSettings, CancellationToken cancellationToken)
Repeatedly calls the specified polling action, delaying between calls, until a given condition is met in the response.
pollAction
completionPredicate
Predicate
The test for whether to return the response ( true
) or continue
polling ( false
). Must not be null.
clock
scheduler
pollSettings
cancellationToken
TResponse
The completed response.
TResponse
The response type.

