public void Accept(IVisitorBase visitor) { foreach (var part in _parts) { part.Accept(visitor); } }
public void Accept(IVisitorBase visitor) { foreach (var part in this.parts) { part.Accept(visitor); } }
public virtual void Accept(IVisitorBase <TVisitable> visitor) { /*This disgusting casting to dynamics is necessary in order to force the C# compiler not to resolve the overload at compile time * Without this, we'd have to override Accept for every child of TreeBase, which would be a horrible violation of DRY * Empirical testing revealed that both casts to dynamics are necessary*/ dynamic visitorDynamic = visitor as dynamic; visitorDynamic.Visit(this as dynamic); }
public void Accept(IVisitorBase visitor) { visitor.Visit(this); }
void IElementBase.Accept(IVisitorBase visitor) { visitor.Visit(this); }
void IElementBase.Accept(IVisitorBase visitor) { throw new System.NotImplementedException(); }
public void Accept(IVisitorBase <IMockVisitable> visitor) { throw new NotImplementedException(); }