Example #1
0
            static void Main(string[] args)
            {
                StoragePlatform platform = new StoragePlatform();

                platform.Attach(new Television());
                platform.Attach(new Computer());

                SizeVisitor  sizeVisitor  = new SizeVisitor();
                StateVisitor stateVisitor = new StateVisitor();

                platform.Operate(sizeVisitor);
                platform.Operate(stateVisitor);

                Console.Read();
            }
Example #2
0
 public override T Accept <T>(StateVisitor <T> visitor)
 {
     return(visitor.Visit(this));
 }
Example #3
0
 public abstract T Accept <T>(StateVisitor <T> visitor);