private string SetAppliancePower(PowerState powerState, IAppliance appliance) { if(powerState == PowerState.Off) { return appliance.TurnOff(); } else { return appliance.TurnOn(); } }
public void AddAppliance(IAppliance appliance) { _appliances.Add(appliance); }
public LeverSwitch(IAppliance appliance) : base(appliance) { }
protected ToggleSwitch(IAppliance appliance) { Appliance = appliance; }
public PullChainSwitch(IAppliance appliance) : base(appliance) { }
public RemoteControl(IAppliance i) { this.appliance = i; }
public void TurnOnAppliance(IAppliance appliance) { appliance.TurnOn(); }
/// <summary> /// Initializes a new instance of the <see cref="TurnOnOffCommand"/> class. /// </summary> /// <param name="appliance">The appliance.</param> public TurnOnOffCommand(IAppliance appliance) { Appliance = appliance; }
public Worker(ILogger <Worker> logger, IAppliance appliance) { _logger = logger; _appliance = appliance; }