示例#1
0
 /// <summary>
 /// 先新闻标题入到RSS中,然后给新闻添加人气 装饰
 /// </summary>
 public void AddRssAddAmountDecoratorPattern()
 {
     IComponent_News cn = new DB_News();
     IComponent_News cn_AddAmount = new ConcreteDecortor_AddAmount(cn);
     IComponent_News cn_AddRss = new ConcreteDecortor_AddRss(cn_AddAmount);
     cn_AddRss.getListOfNews();
 }
示例#2
0
 /// <summary>
 /// 无装饰
 /// </summary>
 public void NoDecoratorPattern()
 {
     IComponent_News cn = new DB_News();
     cn.getListOfNews();
 }