コード例 #1
0
        public async Task <ArtistModel> ArtistSearch(string searchText)
        {
            ArtistModel FoundArtist  = null;
            var         searchResult = await _iSearchClient.SearchArtist(searchText);


            foreach (var artist in searchResult)
            {
                if (TextCompare(searchText, artist.Name))
                {
                    //Break if the result matches the search query
                    FoundArtist = artist;
                    break;
                }
            }

            return(FoundArtist);
        }