示例#1
0
        public override object ServiceHandler(AbstractClassCarService carService)
        {
            if (_servicesProvided == (carService.Requirements & _servicesProvided))
            {
                carService.Requirements &= ~_servicesProvided;
                Console.WriteLine($"{this.GetType().Name} providing {this._servicesProvided} services.");
            }

            return(base.ServiceHandler(carService));
        }
 public virtual object ServiceHandler(AbstractClassCarService carService)
 {
     if (!carService.IsServiceComplete() || this._nexthandler != null)
     {
         return(this._nexthandler.ServiceHandler(carService));
     }
     else
     {
         return(null);
     }
 }