private string SetAppliancePower(PowerState powerState, IAppliance appliance) { if(powerState == PowerState.Off) { return appliance.TurnOff(); } else { return appliance.TurnOn(); } }