public bool Execute() { var entity = new CoffeeMachineEntity(); ISteamBlastUnit cleaningUnit = new SteamBlastUnit(entity); UnitResult <CoffeeMachineEntity> operationResult = cleaningUnit.Execute(9, 50); IEspressoUnit espressoUnit = new EspressoUnit(operationResult.Value); operationResult = espressoUnit.Execute(6, 50); bool isSuccessful = operationResult.IsSuccessful && operationResult.IsSuccessful; return(isSuccessful); }
public EspressoUnit(CoffeeMachineEntity coffeeMachine) { this.coffeeMachine = coffeeMachine; }
public SteamBlastUnit(CoffeeMachineEntity coffeeMachine) { this.coffeeMachine = coffeeMachine; }