示例#1
0
        static void Main(string[] args)
        {
            SchoolGirl jiaojiao = new SchoolGirl();
            jiaojiao.Name = "李嬌嬌";

            Pursuit zhuojiayi = new Pursuit(jiaojiao);

            zhuojiayi.GiveDolls();
            zhuojiayi.GiveFlowers();
            zhuojiayi.GiveChocolate();

            Console.Read();
        }
        private static void Main(string[] args)
        {
            SchoolGirl jiaojiao = new SchoolGirl();

            jiaojiao.Name = "李娇娇";

            Pursuit zhuojiayi = new Pursuit(jiaojiao);

            zhuojiayi.GiveDolls();
            zhuojiayi.GiveFlowers();
            zhuojiayi.GiveChocolate();

            Console.Read();
        }
示例#3
0
        static void Main(string[] args)
        {
            //创建被追求者
            SchoolGirl girl = new SchoolGirl("芳芳");

            //创建追求者
            Pursuit pursuit = new Pursuit(girl);

            //创建代理追求者
            Proxy proxy = new Proxy(girl);

            //代理者执行的是追求者里的方法
            proxy.GiveChocolate();
            proxy.GiveDolls();
            proxy.GiveFlowers();

            Console.ReadKey();
        }
示例#4
0
 public Proxy(SchoolGirl mm)
 {
     gg = new Pursuit(mm);
 }
示例#5
0
 public Proxy(SchoolGirl mm)
 {
     gg = new Pursuit(mm);
 }
示例#6
0
 public Agent(Beauty mm)
 {
     ps = new Pursuit(mm);
 }
示例#7
0
 public Proxy(SchoolGirl girl)
 {
     _pursuit = new Pursuit(girl);
 }
示例#8
0
 public Proxy(Pursuit pursuit)
 {
     mPursuit = pursuit;
 }