コード例 #1
0
ファイル: Program.cs プロジェクト: ChristophWurst/fuel-client
        public static void Main(string[] args)
        {
            string baseUrl = "http://localhost:8080";
            string user = "******";
            string password = "******";

            VehicleClient vc = new VehicleClient(baseUrl, user, password);
            RecordClient rc = new RecordClient(baseUrl, user, password);
            foreach (var vehicle in vc.GetVehicles())
            {
                Console.WriteLine($"# Vehicle {vehicle.id}:");
                foreach(var rec in rc.GetRecordsForVehicle(vehicle).OrderBy(r => r.date)) {
                    Console.WriteLine ($"- {rec.date}");
                }
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ChristophWurst/fuel-client
        public static void Main(string[] args)
        {
            string baseUrl  = "http://localhost:8080";
            string user     = "******";
            string password = "******";

            VehicleClient vc = new VehicleClient(baseUrl, user, password);
            RecordClient  rc = new RecordClient(baseUrl, user, password);

            foreach (var vehicle in vc.GetVehicles())
            {
                Console.WriteLine($"# Vehicle {vehicle.id}:");
                foreach (var rec in rc.GetRecordsForVehicle(vehicle).OrderBy(r => r.date))
                {
                    Console.WriteLine($"- {rec.date}");
                }
            }
        }