Geocoding.Google.GoogleGeocoder.ProcessResponseAsync C# (CSharp) Method

ProcessResponseAsync() private method

private ProcessResponseAsync ( RequestState requestState, IAsyncResult result ) : IEnumerable
requestState RequestState
result IAsyncResult
return IEnumerable
		private IEnumerable<GoogleAddress> ProcessResponseAsync(RequestState requestState, IAsyncResult result)
		{
			if (requestState.cancellationToken != null)
				requestState.cancellationToken.Value.ThrowIfCancellationRequested();

			try
			{
				using (var response = (HttpWebResponse)requestState.request.EndGetResponse(result))
				{
					return ProcessWebResponse(response);
				}
			}
			catch (GoogleGeocodingException)
			{
				//let these pass through
				throw;
			}
			catch (Exception ex)
			{
				//wrap in google exception
				throw new GoogleGeocodingException(ex);
			}
		}