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(); }
public override T Accept <T>(StateVisitor <T> visitor) { return(visitor.Visit(this)); }
public abstract T Accept <T>(StateVisitor <T> visitor);