/// <summary> /// Command function to call the search API. Will call the correct search, based on the selected search type /// </summary> /// <param name="obj"></param> private async void Search(object obj) { SearchResult = string.Empty; switch (SelectedSearchType) { case SearchType.ImageSearch: var imageResponse = await _bingSearch.SearchImages(SearchQuery); ParseImageResponse(imageResponse); break; case SearchType.VideoSearch: var videoResponse = await _bingSearch.SearchVideos(SearchQuery); ParseVideoResponse(videoResponse); break; default: break; } }