/// <summary> /// Gets the corporation image. /// </summary> private async Task GetImageAsync() { Uri uri = ImageHelper.GetCorporationImageURL(m_corporationId); Image img = await ImageService.GetImageAsync(uri).ConfigureAwait(false); if (img != null) { m_image = img; EmploymentRecordImageUpdated?.ThreadSafeInvoke(this, EventArgs.Empty); } }
/// <summary> /// Gets the corporation image. /// </summary> /// <param name="useFallbackUri">if set to <c>true</c> [use fallback URI].</param> private async Task GetImageAsync(bool useFallbackUri = false) { while (true) { Image img = await ImageService.GetImageAsync(GetImageUrl(useFallbackUri)).ConfigureAwait(false); if (img == null) { if (useFallbackUri) { return; } useFallbackUri = true; continue; } m_image = img; EmploymentRecordImageUpdated?.ThreadSafeInvoke(this, EventArgs.Empty); break; } }