Ejemplo n.º 1
0
        public HouseDecorator(WormerBaseInterface wormer) : base(wormer)
        {
            wormer.BaseTemperature += _baseTemperatureWithHouse;
            var person = wormer as ConcretePerson;

            if (person != null)
            {
                wormer.BaseTemperature += person.BodyTemperature;
            }
            _baseTemperatureWithHouse = wormer.BaseTemperature;
            this.BaseTemperature      = _baseTemperatureWithHouse;
        }
Ejemplo n.º 2
0
        public TshirtDecorator(WormerBaseInterface wormer) : base(wormer)
        {
            wormer.BaseTemperature += _tshirtTemperature;
            var person = wormer as ConcretePerson;

            if (person != null)
            {
                wormer.BaseTemperature += person.BodyTemperature;
            }
            _baseTemperatureWithTshort = wormer.BaseTemperature;
            this.BaseTemperature       = _baseTemperatureWithTshort;
        }
Ejemplo n.º 3
0
 public ClothBaseDecorator(WormerBaseInterface wormer)
 {
     this._wormer = wormer;
 }
Ejemplo n.º 4
0
 public void SetComponent(WormerBaseInterface wormer)
 {
     this._wormer = wormer;
 }