public override void BuyProduct() { Console.WriteLine("通过代理类访问这是实体对象的方法"); if (realBuyPerson == null) { realBuyPerson = new RealBuyPerson(); } this.PreBuyProduct(); realBuyPerson.BuyProduct(); this.PosBuyProduct(); }
public override void BuyProduct() { Console.WriteLine("通过代理类访问这是实体对象的方法"); if (realBuyPerson == null) { realBuyPerson = new RealBuyPerson(); } this.PreBuyProduct(); realBuyPerson.BuyProduct(); this.PosBuyProduct(); }