示例#1
0
 public override void Reqest()
 {
     if (_realObject == null)
     {
         _realObject = new RealSubject();
     }
     _realObject.Reqest();
 }      
示例#2
0
        public override void Request()
        {
            // Use 'lazy initialization'
            if (_realSubject == null)
            {
                _realSubject = new RealSubject();
            }

            _realSubject.Request();
        }