private static decimal GetTemperature(ThermostatModel model, Func<decimal> celciusFunc, Func<int> fahrenheitFunc)
        {
            decimal temperature;

            switch (model.TemperatureScale)
            {
                case TemperatureScale.Celcuis:
                    temperature = celciusFunc();
                    break;

                case TemperatureScale.Fahrenheit:
                    temperature = fahrenheitFunc();
                    break;

                default:
                    throw new ArgumentOutOfRangeException(string.Format("Unknown temperature scale '{0}' encountered.", model.TemperatureScale));
            }

            return temperature;
        }
        private static string GetDisplayTemperature(ThermostatModel model, Func<decimal> celciusFunc, Func<int> fahrenheitFunc)
        {
            var temperature = GetTemperature(model, celciusFunc, fahrenheitFunc);

            return string.Format("{0:0.#}°{1}", temperature, Utils.ToEnumString(model.TemperatureScale));
        }