Esempio n. 1
0
        public void Accept(Func <ICarPartVisitor> visitorFactory)
        {
            EngineStructure structure =
                new EngineStructure(this.power, this.cylinderVolume);
            EngineStatus status =
                new EngineStatus(this.temperatureC, 0);

            visitorFactory().VisitEngine(structure, status);
        }
Esempio n. 2
0
 public void VisitEngine(EngineStructure structure, EngineStatus status)
 {
     this.power          = structure.Power;
     this.cylinderVolume = structure.CylinderVolume;
     this.ProcessQueue();
 }
 public void VisitEngine(EngineStructure structure, EngineStatus status)
 {
     this.engineCapacity = structure.CylinderVolume;
 }
Esempio n. 4
0
 public void VisitEngine(EngineStructure structure, EngineStatus status)
 {
     this.engineDetails = string.Format("{0}cc {1}kW",
                                        structure.CylinderVolume, structure.Power);
 }