Beispiel #1
0
 public RaceService(IRaceFileReader raceFileProcessor,
                    IRaceRepository raceRepository,
                    IRaceQuery raceQuery,
                    IRaceTypeRepository raceTypeRepository,
                    IRaceTypeQuery raceTypeQuery,
                    IUserRepository userRepository,
                    IUserQuery userQuery,
                    ILapRepository lapRepository,
                    IDriverResultRepository driverResultRepository,
                    IDriverResultQuery driverResultQuery,
                    IOptions <FileServerSettings> fileServerOptions,
                    IOptions <RaceFileSettings> raceFileOptions,
                    IMapper mapper)
 {
     this._raceFileReader         = raceFileProcessor;
     this._raceRepository         = raceRepository;
     this._raceQuery              = raceQuery;
     this._raceTypeRepository     = raceTypeRepository;
     this._raceTypeQuery          = raceTypeQuery;
     this._userRepository         = userRepository;
     this._userQuery              = userQuery;
     this._lapRepository          = lapRepository;
     this._driverResultRepository = driverResultRepository;
     this._driverResultQuery      = driverResultQuery;
     this._fileServerSettings     = fileServerOptions.Value;
     this._raceFileSettings       = raceFileOptions.Value;
     this._mapper = mapper;
 }
Beispiel #2
0
 public LapController(
     IMapper mapper,
     ILapRepository repo)
 {
     this.mapper = mapper;
     this.repo   = repo;
 }
Beispiel #3
0
        private FormulaOneCommand(string template, ILapRepository lapRepository)
        {
            if (!string.IsNullOrEmpty(template))
            {
                _path = template;
            }

            LapRepository = lapRepository ?? throw new ArgumentNullException("File with the grid details can not be null or empty");
        }
Beispiel #4
0
 /// <summary>
 /// Initialises a new instance of the <see cref="RaceTraceService"/> object.
 /// </summary>
 /// <param name="lapRepository">The lap time repository.</param>
 /// <param name="driverService">The driver service.</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="referenceTimeCalculator">The reference time calculator.</param>
 /// <param name="raceTraceFactory">The race trace factory.</param>
 /// <param name="dataIsLoadingObserver">Observer to notify if data is loading.</param>
 public RaceTraceService(ILapRepository lapRepository,
                         IDriverService driverService,
                         DriverLapTimesMapper mapper,
                         ReferenceTimeCalculator referenceTimeCalculator,
                         RaceTraceFactory raceTraceFactory,
                         DataLoadingObserver dataIsLoadingObserver)
 {
     _lapRepository           = lapRepository;
     _driverService           = driverService;
     _mapper                  = mapper;
     _referenceTimeCalculator = referenceTimeCalculator;
     _raceTraceFactory        = raceTraceFactory;
     _dataIsLoadingObserver   = dataIsLoadingObserver;
 }
Beispiel #5
0
 public static IAddLapCommandHandler Initializer(string template, ILapRepository lapRepository)
 {
     return(new FormulaOneCommand(template, lapRepository));
 }
Beispiel #6
0
 public static LapQuery Create(ILapRepository lapRepository)
 {
     return(new LapQuery(lapRepository));
 }
Beispiel #7
0
 private LapQuery(ILapRepository lapRepository)
 {
     _lapRepository             = lapRepository;
     _driverPositionsDictionary = new Dictionary <long, double>();
 }