Example #1
0
        static void Main(string[] args)
        {
            //卓贾易追娇娇,让戴利送礼物,成全了娇娇和戴利,为别人做嫁衣,代理模式
            SchoolGirl jiaojiao = new SchoolGirl()
            {
                Name = "李娇娇"
            };

            Proxy daili = new Proxy(jiaojiao);

            daili.GiveChocolate();
            daili.GiveDoll();
            daili.GiveFlower();

            Console.ReadKey();
        }
Example #2
0
 public Proxy(SchoolGirl schoolGirl)
 {
     pursuiter = new Pursuiter(schoolGirl);
 }
Example #3
0
 public Pursuiter(SchoolGirl schoolGirl)
 {
     mm = schoolGirl.Name;
 }