HohoemaPin IPinablePage.GetPin() { var genreName = RankingGenre.Translate(); var tag = SelectedRankingTag.Value?.Tag; var pickedTag = PickedTags.FirstOrDefault(x => x.Tag == tag); Dictionary <string, string> pairs = new Dictionary <string, string>(); pairs.Add(RankingCategoryPageNavigationConstants.RankingGenreQueryKey, RankingGenre.ToString()); if (!string.IsNullOrEmpty(pickedTag.Tag) && pickedTag.Tag != "all") { pairs.Add(RankingCategoryPageNavigationConstants.RankingGenreTagQueryKey, pickedTag.Tag); } return(new HohoemaPin() { Label = pickedTag != null ? $"{pickedTag.Label} - {genreName}" : $"{genreName}", PageType = HohoemaPageType.RankingCategory, Parameter = pairs.ToQueryString() }); }
HohoemaPin IPinablePage.GetPin() { var genreName = RankingGenre.Translate(); var tag = SelectedRankingTag.Value?.Tag; var pickedTag = PickedTags.FirstOrDefault(x => x.Tag == tag); string parameter = null; if (string.IsNullOrEmpty(pickedTag?.Tag) || pickedTag.Tag == "all") { pickedTag = null; parameter = $"genre={RankingGenre}"; } else { parameter = $"genre={RankingGenre}&tag={Uri.EscapeDataString(SelectedRankingTag.Value.Tag)}"; } return(new HohoemaPin() { Label = pickedTag != null ? $"{pickedTag.DisplayName} - {genreName}" : $"{genreName}", PageType = HohoemaPageType.RankingCategory, Parameter = parameter }); }