Example #1
0
        public void Execute()
        {
            try
            {
                var config = new Config();

                var deviceReadings = GetReadings(config.Username, config.Password);

                Console.WriteLine("{0} {1} {2}",
                                  deviceReadings.CurrentHumidity,
                                  deviceReadings.CurrentTemp,
                                  deviceReadings.TargetTemp);

                var sender = new StatSender();
                sender.Send(deviceReadings);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : {0} \n {1}", ex.Message, ex.StackTrace);
            }
        }
        public void Execute()
        {
            try
            {
                var config = new Config();

                var deviceReadings = GetReadings(config.Username, config.Password);

                Console.WriteLine("{0} {1} {2}",
                    deviceReadings.CurrentHumidity,
                    deviceReadings.CurrentTemp,
                    deviceReadings.TargetTemp);

                var sender = new StatSender();
                sender.Send(deviceReadings);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : {0} \n {1}", ex.Message, ex.StackTrace);
            }
        }