static void Concessions() { var mediator = new ConcessionsMediator(); var north = new NorthConcessionStand(mediator); var south = new SouthConcessionStand(mediator); mediator.NorthConcessions = north; mediator.SouthConcessions = south; north.send("Can you send some popcorn?."); south.send("Sure thing, Kenny's on his way."); south.send("Do you have any extra hot dogs? We've had a rush on them over here."); north.send("Just a couple, we'll send Keey back with them."); Console.ReadKey(); }
static void Main(string[] args) { ConcessionMediator mediator = new ConcessionMediator(); NorthConcessionStand leftKitchen = new NorthConcessionStand(mediator); SouthConcessionStand rightKitchen = new SouthConcessionStand(mediator); mediator.NorthConcessions = leftKitchen; mediator.SouthConcessions = rightKitchen; leftKitchen.Send("Can you send some popcorn?"); rightKitchen.Send("Sure thing ,Kenny's on his way ."); leftKitchen.Send("Do you have any extra hot dogs? we 've had a rush on them over here."); rightKitchen.Send("Just a couple,we'll send Kenny back with them."); Console.ReadKey(); }