예제 #1
0
        public IDisplayCityElement CreateCityElementDisplayChain()
        {
            IDisplayCityElement chain = new DisplayCustomStringCity("==  City  ==");

            chain.AddNext(new KeyValueCityName())
            .AddNext(new KeyValuePopulation())
            .AddNext(new KeyValueRestaurant())
            .AddNext(new DisplayCustomStringCity(" ---------- \n"));
            return(chain);
        }
예제 #2
0
        public IDisplayCityElement CreateCityElementDisplayChain()
        {
            IDisplayCityElement chain = new DisplayCustomStringCity("<City>");

            chain.AddNext(new XMLCityName())
            .AddNext(new XMLPopulation())
            .AddNext(new XMLRestaurant())
            .AddNext(new DisplayCustomStringCity("</City>\n"));
            return(chain);
        }