コード例 #1
0
        /// <summary>
        /// Fetch all of the sensors and print them out
        /// </summary>
        private static async Task GetSensors()
        {
            Console.WriteLine("Testing '/api/sensors'");

            List <Sensor> sensors = await SensorApi.GetSensors("{}");

            Console.WriteLine("Got " + sensors.Count + " Sensors:");

            foreach (Sensor sensor in sensors)
            {
                Console.WriteLine("--> " + sensor.SensorId + ": " + sensor.ParkingSpace + ", " + sensor.Status + ", " + sensor.ParkingLot);
            }
            Console.WriteLine();
        }