public void SetUp() { dbContext = DbContextUtility.CreateMockDb(); seasonService = Substitute.For <ISeasonService>(); testObj = new SetService(dbContext, seasonService); }
public TrophiesController(IAuthenticationService authenticationService, ITrophyService trophyService, ISeasonService seasonService) : base(authenticationService) { _trophyService = trophyService; _seasonService = seasonService; }
public ChallengeController(IAuthenticationService authenticationService, IChallengesService challengesService, ISeasonService seasonService) : base(authenticationService) { _challengesService = challengesService; _seasonService = seasonService; }
public LeagueService(IServiceScopeFactory scopeFactory, IAlarmClock alarmClock) { _serviceScope = scopeFactory.CreateScope(); _alarmClock = alarmClock; _dateTimeService = _serviceScope.ServiceProvider.GetRequiredService <IDateTimeService>(); _seasonService = _serviceScope.ServiceProvider.GetRequiredService <ISeasonService>(); _leagueContext = _serviceScope.ServiceProvider.GetRequiredService <LeagueContext>(); }
public ResultModule(ISeasonService seasonService) : base("results") { //Injection _seasonService = seasonService; //Routes Get["/"] = parameters => Default(parameters); }
public SeasonController(IAuthenticationService authenticationService, ISeasonService seasonService, IUserService userService, IRankingBySeasonService rankingBySeasonService) : base(authenticationService) { _seasonService = seasonService; _userService = userService; _rankingBySeasonService = rankingBySeasonService; }
public RoundsController( IRoundService roundService, ISeasonService seasonService, IModelStatePopulator <Round, int> roundModelStatePopulator) { _roundService = roundService ?? throw new ArgumentNullException(nameof(roundService)); _seasonService = seasonService ?? throw new ArgumentNullException(nameof(seasonService)); _roundModelStatePopulator = roundModelStatePopulator ?? throw new ArgumentNullException(nameof(roundModelStatePopulator)); }
public EvaluationsController(IHostingEnvironment hostingEnviroment, IEmailSender emailSender, ILogger <EvaluationsController> logger, ISeasonService seasonService, IEvaluationService evaluationService, IUserService userService) { this._logger = logger; this._evaluationService = evaluationService; this._userService = userService; this._seasonService = seasonService; this._emailSender = emailSender; this._environment = hostingEnviroment; }
public TeamPositionController( ITeamPositionService teamPositionService, ISeasonService seasonService, IClubService clubService) { this.teamPositionService = teamPositionService; this.seasonService = seasonService; this.clubService = clubService; }
public void SetUp() { seasonService = Substitute.For <ISeasonService>(); dbContext = DbContextUtility.CreateMockDb(); var logger = Substitute.For <ILogger <SeasonController> >(); var userManager = Substitute.For <IUserManager>(); testObj = new SeasonController(seasonService, dbContext, logger, userManager); }
public SeasonEntriesController( ISeasonService seasonService, ISeasonEntryService seasonEntryService, IModelStatePopulator <SeasonEntry, SeasonEntry.SeasonEntryKey> seasonEntryModelStatePopulator) { _seasonService = seasonService ?? throw new ArgumentNullException(nameof(seasonService)); _seasonEntryService = seasonEntryService ?? throw new ArgumentNullException(nameof(seasonEntryService)); _seasonEntryModelStatePopulator = seasonEntryModelStatePopulator ?? throw new ArgumentNullException(nameof(seasonEntryModelStatePopulator)); }
public SeasonController( CoreServices.IClubService clubService, ISeasonService seasonService, IAuthorizationService authService) { _clubService = clubService; _seasonService = seasonService; _authService = authService; }
private static void SeedRegistration(LeagueContext leagueContext, ISeasonService seasonService) { IEnumerable <int> userIds = leagueContext.Users.Select(u => u.Id); foreach (int userId in userIds) { seasonService.Register(userId); } }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWorkManager"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"></param> /// <param name="roleService"></param> /// <param name="settingsService"> </param> /// <param name="loggingService"> </param> public ProbabilitiesController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITeamService teamService, ILeagueService leagueService, ISeasonService seasonService, IProbabilitiesService probabilitiesService) : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService) { _teamService = teamService; _leagueService = leagueService; _seasonService = seasonService; _probabilitiesService = probabilitiesService; }
public HomeController( LeagueContext leagueContext, ISeasonService seasonService, IMatchesStatisticsService matchesStatisticsService ) { _leagueContext = leagueContext; _seasonService = seasonService; _matchesStatisticsService = matchesStatisticsService; }
public AdminModule(IBlogService blogService, ISeasonService seasonService) : base("/admin") { //Injections _blogService = blogService; _seasonService = seasonService; //Routes Get["/"] = parameters => Default(parameters); }
public BannerWidgetService( IRepository<SeasonPartRecord> seasonRepository, IOrchardServices services, IEntryService entryService, ISeasonService seasonService) { _seasonRepository = seasonRepository; Services = services; _entryService = entryService; _seasonService = seasonService; }
public SeasonController( IOrchardServices services, ISeasonService seasonService, ICategoryService categoryService, ISiteService siteService, IShapeFactory shapeFactory) { _services = services; _seasonService = seasonService; _categoryService = categoryService; _siteService = siteService; Shape = shapeFactory; }
public ServiceFacade(IGameService gameService, ITeamService teamService, IGameGoalieStatisticService gameGoalieStatisticService, IGameSkaterStatisticService gameSkaterStatisticService, IGamePlayedService gamePlayedService, IPlayerService playerService, IPenaltyService penaltyService, ILeagueService leagueService, ISeasonService seasonService) { _gameService = gameService; _teamService = teamService; _gameGoalieStatisticService = gameGoalieStatisticService; _gameSkaterStatisticService = gameSkaterStatisticService; _gamePlayedService = gamePlayedService; _playerService = playerService; _penaltyService = penaltyService; _seasonService = seasonService; _leagueService = leagueService; }
public SubscriptionController(IMapper mapper, ISubscriptionService subscriptionService, ITeamService teamService, ISectionService sectionService, ISeasonService seasonService) { _mapper = mapper; _subscriptionService = subscriptionService; _teamService = teamService; _sectionService = sectionService; _seasonService = seasonService; }
public DriversController(FormulaContext context, UserManager <SimUser> userManager, PagingHelper pagingHelper, IDriverService dataService, ISeasonService seasonService, ITraitService traitService) : base(context, userManager, pagingHelper, dataService) { _drivers = dataService; _seasons = seasonService; _traits = traitService; }
public void SetUp() { dbContext = DbContextUtility.CreateMockDb(); var game = DbContextUtility.AddNew <Game>(dbContext); gameID = game.ID; seasonService = Substitute.For <ISeasonService>(); var logger = Substitute.For <ILogger <SeasonApi> >(); testObj = new SeasonApi(logger, dbContext, seasonService); }
public EpisodeService(ApplicationDbContext context, ISeasonService seasonService, IMapper mapper, ILogger <EpisodeService> logger, IWebHostEnvironment hostingEnvironment) { _context = context; _episodeContext = _context.Episodes; _seasonService = seasonService; _mapper = mapper; _logger = logger; wwwRoot = hostingEnvironment.WebRootPath; }
public MatchController( IMatchService matchService, IClubService clubService, ISeasonService seasonService, IStadiumService stadiumService, IRefereeService refereeService) { this.matchService = matchService; this.clubService = clubService; this.seasonService = seasonService; this.stadiumService = stadiumService; this.refereeService = refereeService; }
public SeasonController(FormulaContext context, UserManager <SimUser> userManager, ISeasonService seasons, IChampionshipService championships, ITrackService tracks, RaceBuilder raceBuilder) : base(context, userManager) { _seasons = seasons; _championships = championships; _tracks = tracks; _raceBuilder = raceBuilder; }
public StartNewGameController( ITeamService teamService, IGameDetailsService gameDetailsService, IPlayerCreatorService playerCreatorService, ISeasonService seasonService, ITeamSeasonService teamSeasonService) { _teamSeasonService = teamSeasonService; _teamService = teamService; _gameDetailsService = gameDetailsService; _playerCreatorService = playerCreatorService; _seasonService = seasonService; }
public RacesController(FormulaContext context, UserManager <SimUser> userManager, IRaceService raceService, ISeasonService seasonService, ITrackService trackService, RaceResultGenerator raceResultGenerator, RaceBuilder raceBuilder) : base(context, userManager) { _raceService = raceService; _seasonService = seasonService; _trackService = trackService; _resultGenerator = raceResultGenerator; _raceBuilder = raceBuilder; }
public HomeController(FormulaContext context, UserManager <SimUser> userManager, IChampionshipService championshipService, ISeasonService seasonService, IRaceService raceService, ISeasonDriverService seasonDriverService, ISeasonTeamService seasonTeamService) : base(context, userManager) { _championships = championshipService; _seasons = seasonService; _races = raceService; _seasonDrivers = seasonDriverService; _seasonTeams = seasonTeamService; }
private static void SeedSeason(LeagueContext leagueContext, ISeasonService seasonService, IDateTimeService dateTimeService) { seasonService.Create(new TimeSpan(SeasonOptions.DefaultDaysBetweenRounds, 0, 0, 0)); SeedRegistration(leagueContext, seasonService); seasonService.CreateGroupStage(DateTime.Now); SeedGroupMatchesResults(leagueContext); DateTime currentRoundStartMoments = dateTimeService.GetDateTimeOfStartOfPlayoffsOfCurrentSeason(DateTime.Now); seasonService.CreateFirstPlayoffsRound(currentRoundStartMoments); do { SeedCurrentPlayoffsRoundResults(leagueContext); }while (seasonService.TryCreateNextPlayoffsRound( currentRoundStartMoments = dateTimeService.GetNextRoundStartMoment(currentRoundStartMoments) )); }
public AdminController(ITitleService titleService, ISeasonService seasonService, IEpisodeService episodeService, IMovieService movieService, IMapper mapper, ILogger <AdminController> logger, IMediaService mediaService, IFfMpegProvider ffMpeg) { _titleService = titleService; _seasonService = seasonService; _episodeService = episodeService; _movieService = movieService; _mapper = mapper; _logger = logger; _mediaService = mediaService; _ffMpeg = ffMpeg; }
public GameDetailsService(IGameDetailsQuery gameDetailsQuery, ISeasonService seasonService, IConfiguration configuration, ITeamService teamService, ITeamSeasonService teamSeasonService, INewsService newsService, IPlayerCreatorService playerCreatorService, IPlayerService playerService) { _gameDetailsQuery = gameDetailsQuery; _seasonService = seasonService; _configuration = configuration; _teamService = teamService; _teamSeasonService = teamSeasonService; _playerCreatorService = playerCreatorService; _newsService = newsService; _playerService = playerService; }
public NeedAssessmentController(INeedAssessmentService needAssessmentService, IAdminUnitService adminUnitService, INeedAssessmentHeaderService needAssessmentHeaderService, INeedAssessmentDetailService needAssessmentDetailService, ISeasonService seasonService, ITypeOfNeedAssessmentService typeOfNeedAssessmentService, ILog log, IPlanService planService, ICommonService commonService) { _needAssessmentService = needAssessmentService; _adminUnitService = adminUnitService; _needAssessmentHeaderService = needAssessmentHeaderService; _needAssessmentDetailService = needAssessmentDetailService; _seasonService = seasonService; _typeOfNeedAssessmentService = typeOfNeedAssessmentService; _log = log; _planService = planService; _commonService = commonService; }
protected override IEnumerator OnShow(params object[] parameters) { IPropertyEffectFeatureProvider propertyEffectFeatureProvider = this.context as IPropertyEffectFeatureProvider; if (this.context is OrbCostTooltipData) { propertyEffectFeatureProvider = (this.context as OrbCostTooltipData).Context; this.Value.Text = string.Empty; } if (propertyEffectFeatureProvider != null) { SimulationObject simulationObject = propertyEffectFeatureProvider.GetSimulationObject(); float propertyValue = simulationObject.GetPropertyValue("NumberOfPastWinters"); float num = simulationObject.GetPropertyValue("PrayerCostByTurnsSinceSeasonStart") * simulationObject.GetPropertyValue("NumberOfTurnsSinceSummerStart"); List <EffectDescription> list = new List <EffectDescription>(); if (propertyValue > 0f) { string toStringOverride = AgeLocalizer.Instance.LocalizeString("%FeatureOrbCostFromPastWinters").Replace("$Value", propertyValue.ToString()); list.Add(new EffectDescription(toStringOverride)); } if (num > 0f) { string toStringOverride2 = AgeLocalizer.Instance.LocalizeString("%FeatureOrbCostFromTurns").Replace("$Value", num.ToString()); list.Add(new EffectDescription(toStringOverride2)); } this.EffectMapper.LoadEffects(list, true); float num2 = 0f; IGameService service = Services.GetService <IGameService>(); if (service != null) { IPlayerControllerRepositoryService service2 = service.Game.Services.GetService <IPlayerControllerRepositoryService>(); ISeasonService service3 = service.Game.Services.GetService <ISeasonService>(); if (service3 != null && service2 != null) { num2 = service3.ComputePrayerOrbCost(service2.ActivePlayerController.Empire as global::Empire); } } this.Value.Text = num2.ToString() + base.GuiService.FormatSymbol(DepartmentOfTheTreasury.Resources.Orb); } yield return(base.OnShow(parameters)); yield break; }
public ProductController(IProductService productService, ICategoryService categoryService, ISeasonService seasonService, IBasketService basketService, IOrderService orderService, IUserService userService) { try { if (productService == null) { throw new ArgumentNullException("productService"); } if (basketService == null) { throw new ArgumentNullException("basketService"); } if (categoryService == null) { throw new ArgumentNullException("categoryService"); } if (seasonService == null) { throw new ArgumentNullException("seasonService"); } if (orderService == null) { throw new ArgumentNullException("orderService"); } if (userService == null) { throw new ArgumentNullException("userService"); } _productService = productService; _categoryService = categoryService; _seasonService = seasonService; _basketService = basketService; _orderService = orderService; _userService = userService; } catch (NullReferenceException) { View("Create"); } }
public HRDController(IAdminUnitService adminUnitService, IHRDService hrdService, IRationService rationservice, IRationDetailService rationDetailService, IHRDDetailService hrdDetailService, ICommodityService commodityService, INeedAssessmentDetailService needAssessmentDetailService, INeedAssessmentHeaderService needAssessmentService, IWorkflowStatusService workflowStatusService, ISeasonService seasonService, IUserAccountService userAccountService, ILog log,IPlanService planService) { _adminUnitService = adminUnitService; _hrdService = hrdService; _hrdDetailService = hrdDetailService; _commodityService = commodityService; _rationService = rationservice; _rationDetailService = rationDetailService; _needAssessmentDetailService = needAssessmentDetailService; _needAssessmentService = needAssessmentService; _workflowStatusService = workflowStatusService; _seasonService = seasonService; _userAccountService = userAccountService; _log = log; _planService = planService; }
public AdminMenu(ISeasonService seasonService) { _seasonService = seasonService; }
public SeasonController(ISeasonService seasonService) { this.seasonService = seasonService; }
public SeasonController(ISeasonService seasonService) { Check.Require(seasonService != null, "seasonService may not be null"); this.seasonService = seasonService; }