Exemplo n.º 1
0
 public ScheduleController(ISchedule schedule, ITrainRepository trainRepo, IRunRepository runRepo, IAgenciesRepository agenciesRepo)
 {
     _schedule     = schedule;
     _trainRepo    = trainRepo;
     _runRepo      = runRepo;
     _agenciesRepo = agenciesRepo;
 }
Exemplo n.º 2
0
 public WagonsController(ILogger <TrainController> logger, ITrainRepository trainRepository, WagonOperationsService wagonOperationsService)
 {
     this.logger                 = logger;
     this._trainRepository       = trainRepository;
     this.wagonOperationsService = wagonOperationsService;
     station = User?.Claims.Where(cl => cl.Type == ClaimTypes.Locality).FirstOrDefault()?.Value;
 }
Exemplo n.º 3
0
 public TicketService(ITicketRepository tickRepo, IReservationRepository resRepo,
                      IStrategyFactory strategyFactory, IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _tickRepo        = tickRepo;
     _resRepo         = resRepo;
     _runRepository   = runRepository;
     _strategyFactory = strategyFactory;
     _trainRepository = trainRepository;
 }
 public ReservationUseCase(
     ITrainRepository trainTrainRepository,
     IReservationRepository reservationRepository,
     IReservationNotifieur notifieur)
 {
     _trainRepository       = trainTrainRepository;
     _reservationRepository = reservationRepository;
     _notifieur             = notifieur;
 }
Exemplo n.º 5
0
 public Schedule(
     IRunRepository runRepo,
     ITrainRepository trainRepo,
     IReservationRepository reservationRepository,
     IReservationService resService)
 {
     _runRepo               = runRepo;
     _trainRepo             = trainRepo;
     _reservationRepository = reservationRepository;
     _resService            = resService;
 }
Exemplo n.º 6
0
 public UnitOfWork(EfConfig.MyDbContext dbContext, IStationRepository stationRepository,
                   IUserRepository userRepository, IRouteRepository routeRepository, IStoppageRepository stoppageRepository,
                   ITicketRepository ticketRepository, ITrainRepository trainRepository)
 {
     _dbContext          = dbContext;
     _stationRepository  = stationRepository;
     _userRepository     = userRepository;
     _routeRepository    = routeRepository;
     _stoppageRepository = stoppageRepository;
     _ticketRepository   = ticketRepository;
     _trainRepository    = trainRepository;
 }
Exemplo n.º 7
0
 public UnitOfWork(ICourseRepository courseRepository,
                   ITrainRepository trainRepository,
                   IReservationRepository reservationRepository,
                   IVisitRepository visitRepository,
                   IStationRepository stationRepository)
 {
     CourseRepository      = courseRepository;
     TrainRepository       = trainRepository;
     ReservationRepository = reservationRepository;
     VisitRepository       = visitRepository;
     StationRepository     = stationRepository;
 }
Exemplo n.º 8
0
 public ClientDatabaseController(IConductivityRepository CondRepo, IRepository<customer> custRepo, ICustomerRepository modifiedCustRepository, IRepository<source> sourceRepository, IRepository<train> trainRepo,
     IRepository<customer_water> custWaterRepo, IVesselRepository modifiedVesselRepository, IRepository<vessel> vesselRepo, ITrainRepository modifiedTrainRepository, IResinProductsRepository modifiedResinProductsRepository)
 {
     this.customerRepository = custRepo;
     this.modifiedCustRepository = modifiedCustRepository;
     this.sourceRepository = sourceRepository;
     this.trainRepository = trainRepo;
     this.modifiedCustWaterRepository = custWaterRepo;
     this.modifiedCondRepository = CondRepo;
     this.modifiedVesselRepository = modifiedVesselRepository;
     this.vesselRepository = vesselRepo;
     this.modifiedTrainRepository = modifiedTrainRepository;
     this.modifiedResinProductsRepository = modifiedResinProductsRepository;
 }
Exemplo n.º 9
0
 public RunController(ITicketRepository tick, IRunRepository run,
                      IReservationService resServ,
                      ITicketService tickServ,
                      IStrategyFactory strategyFactory,
                      IReservationRepository reservationRepo,
                      ITrainRepository trainRepo)
 {
     _tickRepo        = tick;
     _runRepo         = run;
     _resServ         = resServ;
     _tickServ        = tickServ;
     _strategyFactory = strategyFactory;
     _reservationRepo = reservationRepo;
     _trainRepo       = trainRepo;
 }
Exemplo n.º 10
0
 public RunController(ITicketRepository tick, IRunRepository run,
                      IReservationService resServ,
                      ITicketService tickServ,
                      IPriceCalculationStrategy priceCalcStrategy,
                      IReservationRepository reservationRepo,
                      ITrainRepository trainRepo)
 {
     _tickRepo        = tick;
     _runRepo         = run;
     _resServ         = resServ;
     _tickServ        = tickServ;
     _priceCalc       = priceCalcStrategy;
     _reservationRepo = reservationRepo;
     _trainRepo       = trainRepo;
 }
Exemplo n.º 11
0
 public RunController(ITicketRepository tick, IRunRepository run,
                      IReservationService resServ,
                      ITicketService tickServ,
                      ICalculationFactory calcFact,
                      IReservationRepository reservationRepo,
                      ITrainRepository trainRepo)
 {
     _tickRepo        = tick;
     _runRepo         = run;
     _resServ         = resServ;
     _tickServ        = tickServ;
     _calcFact        = calcFact;
     _reservationRepo = reservationRepo;
     _trainRepo       = trainRepo;
 }
Exemplo n.º 12
0
        public IPriceCalculationStrategy GetStrategy(IRunRepository runRepository, ITrainRepository trainRepository, DTO dto = null)
        {
            var defStrategy = new DefaultPriceCalculationStrategy(runRepository, trainRepository);

            if (dto == null &&
                dto.TeaCount == 0 &&
                dto.CoffeeCount == 0 &&
                dto.CookiesCount == 0)
            {
                return(defStrategy);
            }
            else
            {
                return(new PriceCalculationDecorator(defStrategy, dto.TeaCount, dto.CoffeeCount, dto.CookiesCount));
            }
        }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            IUnityContainer container = new UnityContainer();

            container.RegisterType <ITrainRepository, TrainRepository>();
            _trainRepository = container.Resolve <TrainRepository>();

            Console.WriteLine("These are the all the trains. Would like to add trains? (Y/N)");

            foreach (var train in _trainRepository.ListTrains())
            {
                Console.WriteLine($"Symbol: {train.TrainSymbol}, Speed: {train.Speed}, Description: {train.Description}");
            }

            continueProcess = Console.ReadLine();

            if (continueProcess.ToLower() == "y" || continueProcess.ToLower() == "yes")
            {
                AddTrains();

                Console.WriteLine("Exiting the process. Please enter Enter to add trains");

                var key = Console.ReadKey();

                if (key.Key == ConsoleKey.Enter)
                {
                    continueProcess = "y";
                    Console.Clear();
                    AddTrains();
                }
                else
                {
                    Environment.Exit(0);
                }
            }
            else
            {
                Environment.Exit(0);
            }
        }
Exemplo n.º 14
0
 public ScrapingService(ITrainRepository TrainRepository)
 {
     this._trainRepository = TrainRepository;
 }
Exemplo n.º 15
0
 public DrinkAndBedCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _runRepository   = runRepository;
     _trainRepository = trainRepository;
 }
Exemplo n.º 16
0
 public TrainService(ITrainRepository trainRepository)
 {
     _trainRepository = trainRepository;
 }
 public UniversalPriceCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _runRepository   = runRepository;
     _trainRepository = trainRepository;
 }
 public DefaultPriceCalculationDecorator(DefaultPriceCalculationStrategy strategy, ITrainRepository trainRepository)
 {
     _strategy        = strategy;
     _trainRepository = trainRepository;
 }
 public BookingPriceCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository) {
     _runRepository = runRepository;
     _trainRepository = trainRepository;
 }
Exemplo n.º 20
0
 public AgencyCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository, IAgenciesRepository agenciesRepository)
 {
     _runRepository      = runRepository;
     _trainRepository    = trainRepository;
     _agenciesRepository = agenciesRepository;
 }
Exemplo n.º 21
0
 public TicketOffice(ITrainRepository repository)
 {
     _repository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
Exemplo n.º 22
0
 public TrainService(ITrainRepository iTrainRepository)
 {
     _iTrainRepository = iTrainRepository;
 }
Exemplo n.º 23
0
 public RunRepository(ITrainRepository trainRepo)
 {
     _trainRepo = trainRepo;
 }
Exemplo n.º 24
0
 public TrainService(ITrainRepository itrainrepository)
 {
     this._itrainrepository = itrainrepository;
 }
Exemplo n.º 25
0
 public TrainController(ITrainRepository trainRepository, ITrainService trainService)
 {
     _trainRepository = trainRepository;
     _trainService    = trainService;
 }
Exemplo n.º 26
0
 /// <summary>
 /// CostAnalyzerService constructor
 /// </summary>
 /// <param name="customerRepository">modified Cust Repository</param>
 /// <param name="trainRepository">modified Train Repository</param>
 public CostAnalyzerService(ICustomerRepository customerRepository, ITrainRepository trainRepository)
 {
     this.modifiedCustRepository = customerRepository;
     this.modifiedTrainRepository = trainRepository;
 }
 public CalculationFactory(IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _runRepository   = runRepository;
     _trainRepository = trainRepository;
 }
 public DefaultPriceCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _runRepository   = runRepository;
     _trainRepository = trainRepository;
 }
 public TrainController(ITrainRepository trainRepository)
 {
     _trainRepository = trainRepository;
 }
Exemplo n.º 30
0
 public StrategyFactory(IRunRepository runRepository, ITrainRepository trainRepository)
 {
     _runRepository   = runRepository;
     _trainRepository = trainRepository;
 }
Exemplo n.º 31
0
 public TrainServices(HotelDbContext context, ITrainRepository trainRepository) : base(context)
 {
     TrainRepository = trainRepository;
 }
Exemplo n.º 32
0
 public TimeTableService(ITrainRepository TrainRepository)
 {
     this._trainRepository = TrainRepository;
 }
Exemplo n.º 33
0
 public WeekendPriceCalculationStrategy(IRunRepository runRepository, ITrainRepository trainRepository, IHolidayRepository holidayRepository)
 {
     _holidayRepository = holidayRepository;
     _runRepository     = runRepository;
     _trainRepository   = trainRepository;
 }