private void UpdateStickyLocationHint(DeliveryResponse deliveryResponse) { var tntId = deliveryResponse?.Id?.TntId; if (tntId != null && deliveryResponse.Status >= (int)HttpStatusCode.OK && deliveryResponse.Status < (int)HttpStatusCode.Ambiguous) { Interlocked.Exchange(ref this.stickyLocationHint, CookieUtils.LocationHintFromTntId(tntId)); } }
private async Task FetchLocationAsync(TargetService targetService) { var request = new TargetDeliveryRequest.Builder() .SetContext(new Context(ChannelType.Web)) .Build(); var response = await targetService.ExecuteRequestAsync(request); var tntId = response.Response?.Id?.TntId; if (response.Status < HttpStatusCode.OK || response.Status >= HttpStatusCode.Ambiguous || tntId == null) { return; } Interlocked.Exchange(ref this.locationHint, CookieUtils.LocationHintFromTntId(tntId)); }