public virtual void AcceptEngineVisitor(IEngineVisitor visitor) { // Visit each component first... camshaft.AcceptEngineVisitor(visitor); piston.AcceptEngineVisitor(visitor); foreach (SparkPlug eachSparkPlug in sparkPlugs) { eachSparkPlug.AcceptEngineVisitor(visitor); } // Now visit the receiver... visitor.Visit(this); }
public void AcceptEngineVisitor(IEngineVisitor visitor) { visitor.Visit(this); }
public virtual void AcceptEngineVisitor(IEngineVisitor visitor) { visitor.Visit(this); }
public virtual void AcceptEngineVisitor(IEngineVisitor visitor) { //visit each component _camshaft.AcceptEngineVisitor(visitor); _piston.AcceptEngineVisitor(visitor); foreach (var sparkPlug in _sparkPlugs) { sparkPlug.AcceptEngineVisitor(visitor); } visitor.Visit(this); }