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

11 lines
377 B
C#
Raw Normal View History

2024-06-06 15:11:36 +00:00
// 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}");
}