Ejemplo n.º 1
0
 public void ReadAndReport()
 {
     using (var temperatureReader = new TemperatureReader())
     using (var client = new WebServiceClient(_connectionInformation.Url, _connectionInformation.Username, _connectionInformation.Password, _sensorId))
     {
         var temperature = temperatureReader.ReadCpuTemperature();
         if (temperature.HasValue)
         {
             client.Authenticate();
             client.SendTemperature(temperature.Value);
         }
     }
 }
Ejemplo n.º 2
0
 public void ReadAndReport()
 {
     using (var temperatureReader = new TemperatureReader())
         using (var client = new WebServiceClient(_connectionInformation.Url, _connectionInformation.Username, _connectionInformation.Password, _sensorId))
         {
             var temperature = temperatureReader.ReadCpuTemperature();
             if (temperature.HasValue)
             {
                 client.Authenticate();
                 client.SendTemperature(temperature.Value);
             }
         }
 }