예제 #1
0
        static void Main()
        {
            IMessageComponent messageComponent = Factory.CreateMessageComponent();

            Console.WriteLine("Please enter your name");

            IGreetingComponent greetingComponent = Factory.CreateGreetingComponent();
            string             greeting          = greetingComponent.AddInitialGreeting(Console.ReadLine());

            Console.WriteLine(greeting);

            messageComponent.SendMessage(greeting);
        }