public async Task GetArticleIdsTest() { var ids = await _gateway.GetArticleIdsAsync(37.786971, -122.399677, 50); Assert.IsNotNull(ids); Assert.AreEqual(ids.Count(), 50); }
public async Task Process() { SimilarStrings = "Working..."; var articleIds = await _gateway.GetArticleIdsAsync(Latitude, Longtitude, ARTICLE_COUNT); var imageTitles = await _gateway.GetImageTitlesAsync(articleIds.ToArray()); IEnumerable <string> str = null; if (imageTitles.Any()) { var bgTask = new Task(() => { str = _similarityProcessor.GetMostSimilar(imageTitles); }); bgTask.ContinueWith((task) => { SimilarStrings = string.Join("\n", str); }); bgTask.Start(); } else { SimilarStrings = "No images found."; } }