public override void Request() { if (realSubject == null) { realSubject = new RealSubject(); } Console.WriteLine("代理类做了一系列请求"); realSubject.Request(); }
public Proxy(RealSubject realSubject) { this.realSubject = realSubject; }
public override void Request() { if (realSubject == null) { realSubject = new RealSubject(); } Console.WriteLine("代理类做了一系列请求"); realSubject.Request(); }
public Proxy(RealSubject realSubject) { this.realSubject = realSubject; }