public void Visit(ConcreteElementB element)
 {
     Console.WriteLine("Visitor 2 is visiting {0}", element.GetType().Name);
 }
 public override void VisitConcreteElementB(ConcreteElementB concreteElementB)
 {
     Console.WriteLine("{0}被{1}访问", concreteElementB.GetType().Name, this.GetType().Name);
 }
Example #3
0
 public abstract void Visit(ConcreteElementB element);
Example #4
0
 public override void Visit(ConcreteElementB element)
 {
     Console.WriteLine("VisitorB visited ElementB : {0}", element.Title);
 }
Example #5
0
 public override void VisitConcreteElementB(ConcreteElementB concreteElementB)
 {
     Console.WriteLine("{0}被{1}访问", concreteElementB.GetType().Name, this.GetType().Name);
 }
Example #6
0
 public abstract void VisitConcreteElementB(
   ConcreteElementB concreteElementB);
 public override void VisitConcreteElementB(ConcreteElementB elementB)
 {
     elementB.OperationB();
 }
Example #8
0
 public abstract void VisitConcreteElementB(ConcreteElementB concreteElementB);
Example #9
0
 public string Vist(ConcreteElementB element)
 {
     Console.WriteLine("Visiting With ElementB: " + element.ElementBProp);
     return(element.ElementBProp + " + The not so cool new data added by ConcreteVisitor.");
 }
Example #10
0
 public override void VisitConcreteElementB(ConcreteElementB concreteElementB)
 {
     Console.WriteLine($"{concreteElementB.GetType().Name}被{this.GetType().Name}存取");
 }
Example #11
0
 public override void VisitConcreteElementB(ConcreteElementB concreteElementB)
 {
     Console.WriteLine($"{concreteElementB.GetType().Name} visited by {GetType().Name}");
 }