示例#1
0
        private (string SensorId, double Temperature) GetTemperatureSensorData(TemperatureSensor temperatureSensor)
        {
            string SensorId    = temperatureSensor.Id;
            double Temperature = temperatureSensor.GetTemperature();

            Debug.Assert(!string.IsNullOrWhiteSpace(SensorId), "sensor-id should not be null or blank");
            Debug.Assert(Temperature >= 0, "temperature shouldbe >= 0");

            return(SensorId, Temperature);
        }