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); }
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; }
public void VisitEngine(EngineStructure structure, EngineStatus status) { this.engineDetails = string.Format("{0}cc {1}kW", structure.CylinderVolume, structure.Power); }