コード例 #1
0
        public static void ShowArtistsContentJSON()
        {
            //With Json
            ArtistsHttpClient artistsClient = new ArtistsHttpClient("http://localhost:20098/", MediaTypeEnum.Json);

            foreach (var artist in artistsClient.GetAllArtists())
            {
                Console.WriteLine("    - Artist Name - {0}; Country - {1}; Date of birth - {2}", artist.Name, artist.Country, artist.DateOfBirth);

                foreach (var song in artist.Songs)
                {
                    Console.WriteLine("    Song Title - {0}; Year - {1}; Genre - {2}", song.Title, song.Year, song.Genre);
                }

                Console.WriteLine(new string('*', Console.BufferWidth));
            }
        }
コード例 #2
0
ファイル: UI.cs プロジェクト: skirov/TA-WebServicesAndCloud
        public static void ShowArtistsContentJSON()
        {
            //With Json
            ArtistsHttpClient artistsClient = new ArtistsHttpClient("http://localhost:20098/", MediaTypeEnum.Json);

            foreach (var artist in artistsClient.GetAllArtists())
            {
                Console.WriteLine("    - Artist Name - {0}; Country - {1}; Date of birth - {2}", artist.Name, artist.Country, artist.DateOfBirth);

                foreach (var song in artist.Songs)
                {
                    Console.WriteLine("    Song Title - {0}; Year - {1}; Genre - {2}", song.Title, song.Year, song.Genre);
                }

                Console.WriteLine(new string('*', Console.BufferWidth));
            }
        }