private string GenerateUrl(string userId, YouTubeEncoding encoding, int maxLength, bool isPopular) { userId = WebUtility.UrlEncode(userId); var selectedItem = ComboBox.SelectedItem as ListBoxItem; if (Equals(selectedItem, UserNameItem)) { return($"{_baseAddress}/GetUserFeed?userId={userId}&encoding={encoding}&maxLength={maxLength}&isPopular={isPopular}"); } if (Equals(selectedItem, PlaylistItem)) { return($"{_baseAddress}/GetPlaylistFeed?playlistId={userId}&encoding={encoding}&maxLength={maxLength}&isPopular={isPopular}"); } return(null); }
private string GenerateUrl(string userId, YouTubeEncoding encoding, int maxLength, bool isPopular) { userId = WebUtility.UrlEncode(userId); var selectedItem = ComboBox.SelectedItem as ListBoxItem; if (Equals(selectedItem, UserNameItem)) { return $"{_baseAddress}/GetUserFeed?userId={userId}&encoding={encoding}&maxLength={maxLength}&isPopular={isPopular}"; } if (Equals(selectedItem, PlaylistItem)) { return $"{_baseAddress}/GetPlaylistFeed?playlistId={userId}&encoding={encoding}&maxLength={maxLength}&isPopular={isPopular}"; } return null; }