static void Main(string[] args) { Girl girl = new Girl("蓉儿"); Proxy proxy = new Proxy(girl); proxy.GiveDolls(); proxy.GiveFlowers(); proxy.GiveChocolate(); Console.ReadKey(); }
static void Main(string[] args) { Girl sGirl = new Girl("sx"); Proxy mm = new Proxy(sGirl); mm.GiveChocolate(); mm.GiveDolls(); mm.GiveFlowers(); RealProxy _realProxy = new RealProxy(); _realProxy.Request(); }
/// <inheritdoc /> public Proxy(Girl girl) { boy = new Pursuit(girl); }
/// <inheritdoc /> public Pursuit(Girl girl) { _girl = girl; }
public Proxy(Girl mm) { gg = new Pursuit(mm); }