/// <summary>
 /// CTOR. None of the dependency injection parameters must have scoped lifetime.
 /// </summary>
 /// <param name="backgroundWebHost"></param>
 /// <param name="mailMergeService"></param>
 /// <param name="timeZoneConverter"></param>
 /// <param name="logger"></param>
 public FixtureEmailTask(BackgroundWebHost backgroundWebHost, IMailMergeService mailMergeService,
                         Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
                         ILogger <FixtureEmailTask> logger)
     : base(backgroundWebHost, mailMergeService, logger)
 {
     _timeZoneConverter = timeZoneConverter;
 }
Esempio n. 2
0
 internal AvailableMatchDates(ITenantContext tenantContext,
                              Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, ILogger <AvailableMatchDates> logger)
 {
     _tenantContext     = tenantContext;
     _appDb             = tenantContext.DbContext.AppDb;
     _timeZoneConverter = timeZoneConverter;
     _logger            = logger;
 }
Esempio n. 3
0
 /// <summary>
 /// CTOR.
 /// </summary>
 /// <param name="tenantContext"></param>
 /// <param name="timeZoneConverter"></param>
 /// <param name="loggerFactory"></param>
 public MatchPlanner(ITenantContext tenantContext,
                     Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, ILoggerFactory loggerFactory)
 {
     _tenantContext       = tenantContext;
     _appDb               = tenantContext.DbContext.AppDb;
     _timeZoneConverter   = timeZoneConverter;
     _availableMatchDates = new AvailableMatchDates(tenantContext, timeZoneConverter, loggerFactory.CreateLogger <AvailableMatchDates>());
     _loggerFactory       = loggerFactory;
     _logger              = loggerFactory.CreateLogger <MatchPlanner>();
 }
Esempio n. 4
0
 public Team(SiteContext siteContext, Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, IWebHostEnvironment webHostEnvironment, IStringLocalizer <Team> localizer, IAuthorizationService authorizationService, SignInManager <Identity.ApplicationUser> signInManger, ILogger <Team> logger)
 {
     _siteContext        = siteContext;
     _timeZoneConverter  = timeZoneConverter;
     _webHostEnvironment = webHostEnvironment;
     _appDb                = siteContext.AppDb;
     _signInManager        = signInManger;
     _localizer            = localizer;
     _authorizationService = authorizationService;
     _logger               = logger;
 }
Esempio n. 5
0
 public LeagueTemplateRenderer(
     ITemplateContentProvider templateContentProvider,
     ITemplateDefinitionManager templateDefinitionManager,
     IStringLocalizerFactory stringLocalizerFactory,
     Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
     TournamentManager.MultiTenancy.ITenantContext tenantContext,
     IOptions <LeagueTemplateRendererOptions> options) : base(templateContentProvider,
                                                              templateDefinitionManager, stringLocalizerFactory)
 {
     _timeZoneConverter     = timeZoneConverter;
     _tenantContext         = tenantContext;
     VariableNotFoundAction = options.Value.VariableNotFoundAction;
     MemberNotFoundAction   = options.Value.MemberNotFoundAction;
 }
Esempio n. 6
0
 public Match(SiteContext siteContext, IStringLocalizer <Match> localizer, IAuthorizationService authorizationService,
              Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, Axuno.BackgroundTask.IBackgroundQueue queue,
              FixtureEmailTask fixtureEmailTask, ResultEmailTask resultEmailTask, RankingUpdateTask rankingUpdateTask, RazorViewToStringRenderer razorViewToStringRenderer, ILogger <Match> logger)
 {
     _siteContext               = siteContext;
     _appDb                     = siteContext.AppDb;
     _localizer                 = localizer;
     _authorizationService      = authorizationService;
     _timeZoneConverter         = timeZoneConverter;
     _queue                     = queue;
     _fixtureEmailTask          = fixtureEmailTask;
     _resultEmailTask           = resultEmailTask;
     _rankingUpdateTask         = rankingUpdateTask;
     _razorViewToStringRenderer = razorViewToStringRenderer;
     _logger                    = logger;
 }
Esempio n. 7
0
        public EnterResultViewModel(TournamentEntity tournament, RoundEntity round,
                                    MatchEntity match, MatchRuleEntity matchRule, IList <TeamInRoundEntity> teamInRound,
                                    Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
        {
            Tournament = tournament ?? throw new ArgumentNullException(nameof(tournament));
            Round      = round ?? throw new ArgumentNullException(nameof(round));
            Match      = match ?? throw new ArgumentNullException(nameof(match));
            Opponent   = new Opponent(
                teamInRound.FirstOrDefault(o => o.TeamId == match.HomeTeamId)?.TeamNameForRound ?? throw new ArgumentNullException(nameof(teamInRound)),
                teamInRound.FirstOrDefault(o => o.TeamId == match.GuestTeamId)?.TeamNameForRound ?? throw new ArgumentNullException(nameof(teamInRound)));;
            TimeZoneConverter = timeZoneConverter ?? throw new ArgumentNullException(nameof(timeZoneConverter));

            _localizer = CreateModelStringLocalizer();

            _maxNumberOfSets = matchRule.MaxNumOfSets();
            MapEntityToFormFields();
        }
Esempio n. 8
0
 public TeamApplication(ITenantContext tenantContext,
                        Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
                        IStringLocalizer <TeamApplication> localizer, IAuthorizationService authorizationService,
                        RegionInfo regionInfo,
                        IConfiguration configuration, Axuno.BackgroundTask.IBackgroundQueue queue,
                        SendEmailTask sendEmailTask, ILogger <TeamApplication> logger)
 {
     _tenantContext     = tenantContext;
     _timeZoneConverter = timeZoneConverter;
     _regionInfo        = regionInfo;
     _googleConfig      = new GoogleConfiguration();
     configuration.Bind(nameof(GoogleConfiguration), _googleConfig);
     _queue                = queue;
     _sendEmailTask        = sendEmailTask;
     _appDb                = tenantContext.DbContext.AppDb;
     _authorizationService = authorizationService;
     _logger               = logger;
 }
Esempio n. 9
0
 public Match(ITenantContext tenantContext, IStringLocalizer <Match> localizer,
              IAuthorizationService authorizationService,
              Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, Axuno.BackgroundTask.IBackgroundQueue queue,
              SendEmailTask sendMailTask, RankingUpdateTask rankingUpdateTask,
              RazorViewToStringRenderer razorViewToStringRenderer, IConfiguration configuration, ILogger <Match> logger)
 {
     _tenantContext             = tenantContext;
     _appDb                     = tenantContext.DbContext.AppDb;
     _localizer                 = localizer;
     _authorizationService      = authorizationService;
     _timeZoneConverter         = timeZoneConverter;
     _queue                     = queue;
     _sendMailTask              = sendMailTask;
     _rankingUpdateTask         = rankingUpdateTask;
     _razorViewToStringRenderer = razorViewToStringRenderer;
     _configuration             = configuration;
     _logger                    = logger;
 }
Esempio n. 10
0
        public EditFixtureViewModel(PlannedMatchRow plannedMatch, Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
        {
            PlannedMatch      = plannedMatch;
            TimeZoneConverter = timeZoneConverter;

            // Set form fields
            if (plannedMatch != null)
            {
                Id      = PlannedMatch.Id;
                VenueId = PlannedMatch.VenueId;
                // set date and time for the current time zone
                var currentDate =
                    TimeZoneConverter.ToZonedTime(PlannedMatch.PlannedStart);
                MatchDate = currentDate?.DateTimeOffset.Date;
                MatchTime = currentDate?.DateTimeOffset.TimeOfDay;

                // mark a list item as selected
                VenueNotSpecifiedKey = null;  // "not specified" will not show in the list
                VenueId = PlannedMatch.VenueId ?? VenueNotSpecifiedKey ?? 0;
            }
        }
Esempio n. 11
0
 public Manage(
     SignInManager <ApplicationUser> signInManager, IStringLocalizer <Manage> localizer,
     Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
     Axuno.BackgroundTask.IBackgroundQueue queue,
     UserEmailTask userEmailTask,
     MetaDataHelper metaData, SiteContext siteContext,
     RegionInfo regionInfo, PhoneNumberService phoneNumberService,
     ILogger <Manage> logger)
 {
     _userManager        = signInManager.UserManager;
     _signInManager      = signInManager;
     _localizer          = localizer;
     _timeZoneConverter  = timeZoneConverter;
     _queue              = queue;
     _userEmailTask1     = userEmailTask;
     _userEmailTask2     = userEmailTask.CreateNew();
     _metaData           = metaData;
     _siteContext        = siteContext;
     _phoneNumberService = phoneNumberService;
     _regionInfo         = regionInfo;
     _logger             = logger;
 }
Esempio n. 12
0
 public Manage(
     SignInManager <ApplicationUser> signInManager, IStringLocalizer <Manage> localizer,
     Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
     Axuno.BackgroundTask.IBackgroundQueue queue,
     SendEmailTask sendEmailTask,
     IOptions <DataProtectionTokenProviderOptions> dataProtectionTokenProviderOptions,
     MetaDataHelper metaData, ITenantContext tenantContext,
     RegionInfo regionInfo, PhoneNumberService phoneNumberService,
     ILogger <Manage> logger)
 {
     _userManager       = signInManager.UserManager;
     _signInManager     = signInManager;
     _localizer         = localizer;
     _timeZoneConverter = timeZoneConverter;
     _queue             = queue;
     _sendEmailTask     = sendEmailTask;
     _dataProtectionTokenProviderOptions = dataProtectionTokenProviderOptions;
     _metaData           = metaData;
     _tenantContext      = tenantContext;
     _phoneNumberService = phoneNumberService;
     _regionInfo         = regionInfo;
     _logger             = logger;
 }
Esempio n. 13
0
 public GermanHolidayImporter(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter,
                              ILogger <GermanHolidayImporter> logger)
 {
     _timeZoneConverter = timeZoneConverter;
     _logger            = logger;
 }
Esempio n. 14
0
 public TeamSingleModel(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
 {
     TimeZoneConverter = timeZoneConverter;
 }
Esempio n. 15
0
 public ApplicationListModel(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
 {
     _timeZoneConverter = timeZoneConverter;
 }
Esempio n. 16
0
 public FixturesViewModel(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
 {
     _timeZoneConverter = timeZoneConverter;
 }
Esempio n. 17
0
 public MyTeamShowModel(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
 {
     TimeZoneConverter = timeZoneConverter;
 }
Esempio n. 18
0
 /// <summary>
 /// CTOR.
 /// </summary>
 /// <param name="timeZoneConverter"></param>
 /// <param name="logger"></param>
 public ExcelImporter(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter, ILogger <ExcelImporter> logger)
 {
     ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
     _timeZoneConverter          = timeZoneConverter;
     _logger = logger;
 }
 public ResultsViewModel(Axuno.Tools.DateAndTime.TimeZoneConverter timeZoneConverter)
 {
     _timeZoneConverter = timeZoneConverter;
 }