示例#1
0
文件: OvenServer.cs 项目: ice0/test
 public void ConfigurePreheatTemperature(OvenTemperature level)
 {
     if (level >= OvenTemperature.Low && level <= OvenTemperature.High)
     {
         _temperature = level;
     }
     else
     {
         throw new ArgumentException("Temperature is out of range. The temperature should be low, medium, or high.");
     }
 }
 public void ConfigurePreheatTemperature(OvenTemperature level)
 {
     if (level >= OvenTemperature.Low && level <= OvenTemperature.High)
     {
         _temperature = level;
     }
     else
     {
         throw new ArgumentException("Temperature is out of range. The temperature should be low, medium, or high.");
     }
 }