public void Accept(ICarPartVisitor CarPartVisitor) { foreach (var part in parts) { part.Accept(CarPartVisitor); } CarPartVisitor.Visit(this); }
public void Accept(ICarPartVisitor visitor) { for (int i = 0; i < carParts.Lengh; i++) { carParts[i].Accept(visitor); } visitor.Visit(this); }
public void Accept(ICarPartVisitor CarPartVisitor) { CarPartVisitor.Visit(this); }
void Accept(ICarPartVisitor visitor) { visitor.Visit(this); }
static void Accept(this Seat seat, ICarPartVisitor visitor) { // visitor.VisitSeat(seat.name, seat.capacity); visitor.Visit(seat); }
static void Accept(this Engine engine, ICarPartVisitor visitor) { // visitor.VisitEngine(engine.power, engine.cylinderVolume, engine.temperatureC); visitor.Visit(engine); }