zhaw-dnet2/Tasks/Lab10/RankingService/RankingClient/Program.cs

10 lines
377 B
C#

// See https://aka.ms/new-console-template for more information
using RankingService;
RankingClient client = new RankingClient("http://localhost:5072", new HttpClient());
List<Competitor> competitors = (await client.RankingsAsync()).ToList();
for (int i = 0; i < competitors.Count; i++)
{
Console.WriteLine($"{i + 1}. {competitors[i].Name}, {competitors[i].Time}");
}