Example #1
0
        public async Task FetchTagsAsync()
        {
            await ImageInfo.GenerateSearchResponse();

            if (this.ImageInfo.SearchResponse?.Source == VSPing.Models.SearchResponseSource.None) // In the case that there is no cached response for this image
            {
                this.TagsList = "(no cached response)";
            }
            else // If we did find a cached response, update the taglist accordingly
            {
                if (string.IsNullOrEmpty(ImageInfo.TagsList))
                {
                    this.TagsList = "(response had no tags)";
                }
                else
                {
                    this.TagsList = ImageInfo.TagsList;
                }

                this.ImageHash = (ImageInfo.SearchResponse as VSPing.Models.KapiResponse)?.ImageInsightsToken ?? String.Empty;
            }
        }