Пример #1
0
        private static void Main(string[] args)
        {
            var parser         = ParserOfVehicle.GetInstance();
            var carsStorage    = new VehiclesStorage("Cars", parser.GetVehicleList(args[0]));
            var truckStogare   = new VehiclesStorage("Trucks", parser.GetVehicleList(args[1]));
            var commandHandler = new CommandHandler(carsStorage, truckStogare);

            commandHandler.Show();
        }
Пример #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="vehiclesStorage">Vehicle storage.</param>
 public AllCounter(VehiclesStorage vehiclesStorage)
 {
     _vehiclesStorage = vehiclesStorage;
 }
Пример #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="vehiclesStorage">Vehicle storage.</param>
 public BrandsCounter(VehiclesStorage vehiclesStorage)
 {
     _vehiclesStorage = vehiclesStorage;
 }
Пример #4
0
 private void TryToExecute(VehiclesStorage vehiclesStorage, string command)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="vehiclesStorage">Vehicle storage.</param>
 /// <param name="brand">Brand, if necessary</param>
 public AveragePriceCounter(VehiclesStorage vehiclesStorage, string brand = null)
 {
     _vehiclesStorage = vehiclesStorage;
     _brand           = brand;
 }