Пример #1
0
        public CoffeeMaker(ICoffeeMakerAPI hardware)
        {
            this._hardware            = hardware;
            this._boiler              = new Boiler(hardware);
            this._brewButton          = new BrewButton(hardware);
            this._indicatorLight      = new IndicatorLight(hardware);
            this._pressureReliefValve = new PressureReliefValve(hardware);
            this._warmerPlate         = new WarmerPlate(hardware);

            this._brewButton.BrewButtonPushedEvent     += (s, e) => StartBrewCycle();
            this._warmerPlate.WarmerStatusChangedEvent += (s, e) =>
            {
                if (e.WarmerStatus == WarmerStatus.WARMER_EMPTY)
                {
                    StopBrewCycle();
                }
            };
        }
 public M4HotWaterProvider(ICoffeeMakerAPI coffeeMakerApi)
 {
     _coffeeMakerApi = coffeeMakerApi;
 }
Пример #3
0
 public M4CoffeeMakerUserInterface(ICoffeeMakerAPI coffeeMakerApi)
 {
     _coffeeMakerApi = coffeeMakerApi;
 }
Пример #4
0
 public M4WarmCoffeeContainer(ICoffeeMakerAPI coffeeMakerApi)
 {
     _coffeeMakerApi = coffeeMakerApi;
 }
Пример #5
0
 public M4UserInterface(ICoffeeMakerAPI api)
 {
     this.api = api;
 }
 public M4HotWaterSource(ICoffeeMakerAPI api)
 {
     this.api = api;
 }
 public M4ContainmentVessel(ICoffeeMakerAPI api)
 {
     this.api      = api;
     lastPotStatus = WarmerPlateStatus.POT_EMPTY;
 }