コード例 #1
0
        public static void IteratingImp(List <EmojiType> list)
        {
            var factory = new EmojiFactory();

            foreach (EmojiType type in list)
            {
                var emoji = factory.Create(type);
                emoji.Express();
            }
        }
コード例 #2
0
        public static void SingleImp(EmojiType type)
        {
            var factory = new EmojiFactory();

            IEmoji emoji = factory.Create(type);

            emoji.Express();

            if (emoji.isHappy())
            {
                Console.WriteLine("HAHAHAHAHHAHAHAHHAA");
            }
        }