示例#1
0
 /// <summary>
 /// Asynchronously query the Google Maps API using the provided request.
 /// </summary>
 /// <param name="_request">The request that will be sent.</param>
 /// <param name="_timeout">A TimeSpan specifying the amount of time to wait for a response before aborting the request.
 /// The specify an infinite timeout, pass a TimeSpan with a TotalMillisecond value of Timeout.Infinite.
 /// When a request is aborted due to a timeout the returned task will transition to the Faulted state with a TimeoutException.</param>
 /// <param name="_token">A cancellation token that can be used to cancel the pending asynchronous task.</param>
 /// <returns>A Task with the future value of the response.</returns>
 /// <exception cref="ArgumentNullException">Thrown when a null value is passed to the request parameter.</exception>
 /// <exception cref="ArgumentOutOfRangeException">Thrown when the value of timeout is neither a positive value or infinite.</exception>
 public Task <TResponse> QueryAsync(TRequest _request, TimeSpan _timeout, CancellationToken _token)
 {
     return(GenericEngine <TRequest, TResponse> .QueryGoogleApiAsync(_request, _timeout, _token));
 }
示例#2
0
 /// <summary>
 /// Asynchronously query the Google Maps API using the provided request.
 /// </summary>
 /// <param name="_request">The request that will be sent.</param>
 /// <param name="_token">A cancellation token that can be used to cancel the pending asynchronous task.</param>
 /// <returns>A Task with the future value of the response.</returns>
 /// <exception cref="ArgumentNullException">Thrown when a null value is passed to the request parameter.</exception>
 public Task <TResponse> QueryAsync(TRequest _request, CancellationToken _token)
 {
     return(GenericEngine <TRequest, TResponse> .QueryGoogleApiAsync(_request, TimeSpan.FromMilliseconds(Timeout.Infinite), _token));
 }