Exemplo n.º 1
0
        public void Visit(Report report)
        {
            if (CheckAlreadyVisited(report))
            {
                return;
            }

            myVisitor.Visit(report);

            foreach (var section in report.Sections)
            {
                Visit(section);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Visits all sections in this report.
 /// </summary>
 /// <param name="visitor">The report visitor.</param>
 public void Visit(IReportVisitor visitor)
 {
     foreach (var section in this.Sections)
     {
         // Cast to dynamic to force runtime overload selection
         visitor.Visit((dynamic)section);
     }
 }
Exemplo n.º 3
0
 public void Accept(IReportVisitor visitor)
 {
     visitor.Visit(this);
 }