示例#1
0
        static void Main(string[] args)
        {
            IMessage tweet     = new Tweet("test msg");
            IWriter  console   = new ConsoleWriter();
            IClient  microwave = new MicrowaveOven(console);

            microwave.RetrieveMessage(tweet);
        }
示例#2
0
        public static void Main()
        {
            ITweet         tweet  = new Tweeter();
            IServer        server = new Server();
            IConsoleWriter writer = new ConsoleWriter();

            IClient microwaveoven = new MicrowaveOven(server, writer);

            microwaveoven.ProcessTweet(tweet);
        }