Example #1
0
        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);
        }
Example #2
0
        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);
 }
Example #4
0
 public virtual void AcceptEngineVisitor(IEngineVisitor visitor)
 {
     visitor.Visit(this);
 }
Example #5
0
        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);
        }