private void DelegateCar() { Car = cars.CarSet.First(); Car.driver = driver.drivers.Dequeue(); Car.Drive(); var a = new Random().Next(1, 100); }
/// <summary> /// 通用功能 /// </summary> /// <param name="car"></param> public void ShowYourCar(ICarBase car) { car.Start(); car.Drive(); car.OpenNav(); car.OpenSkylight(); car.StartABS(); }
public T GetBuilder <T>(ICarBase carBase = null) where T : class, ICarBuilderFacade { if (_builders[typeof(T)] is T builder) { builder.BaseCar = carBase ?? BaseCar; return(builder); } return(null); }
protected Decorator(ICarBase carBase) { this.carBase = carBase; }
public HatchBackCar(ICarBase carBase) : base(carBase) { this.name = "HatchBack"; this.price = 80.00m; }
public SUVCar(ICarBase carBase) : base(carBase) { this.name = "SUV"; this.price = 200.00m; }
public void Init() { this.carBase = new CarBase(); }
public HatchBackCar(ICarBase carBase) : base(carBase) { this.name = "HatchBack"; this.price = 80.00m; }
public SUVCar(ICarBase carBase) : base(carBase) { this.name = "SUV"; this.price = 200.00m; }
public void Init() { this.carBase = new CarBase(); }
protected Decorator(ICarBase carBase) { this.carBase = carBase; }