public void Accept(PartVisitor v) { v.Visit(this); foreach (var part in parts) { part.Accept(v); } }
public void Accept(PartVisitor visitor) { try { visitor.GetType().GetMethod("Visit", new Type[] { this.GetType() }) .Invoke(visitor, new object[] { this }); } catch (System.Reflection.TargetInvocationException ex) { throw ex.InnerException; } }
public void Accept(PartVisitor visitor) { try { visitor.GetType().GetMethod("Visit", new Type[] { this.GetType() }) .Invoke(visitor, new object[] { this }); } catch (System.Reflection.TargetInvocationException ex) { throw ex.InnerException; } }
public void Accept(PartVisitor v) { v.Visit(this); }