private bool TestRight(IFigure figure) { RightTriangleVisitor visitor = new RightTriangleVisitor(); figure.Accept(visitor); return(visitor.IsRightTriangle); }
public void Accept(IFigure.IVisitor visitor) { figure.Accept(visitor); }