private static void RunVisitor() { Visitor.Tobacco tobacco = new Visitor.Tobacco(); Visitor.Necessity neccesity = new Visitor.Necessity(); Visitor.Liquor liquor = new Visitor.Liquor(); Visitor.SpeccyVisitor speccy = new Visitor.SpeccyVisitor(); Visitor.SpeccySpeccy speccySpeccy = new Visitor.SpeccySpeccy(); speccy.visit(tobacco); speccySpeccy.visit(neccesity); speccy.visit(liquor); }
public void visit(Liquor liquorItem) { Console.Write("Keep quiet" + liquorItem.GetType().Attributes.ToString()); }