public ShiftChangeHandler(TeamOrchestratorOptions teamOptions, IScheduleConnectorService scheduleConnectorService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer, IScheduleCacheService scheduleCacheService, ISystemTimeService systemTimeService) : base(scheduleConnectorService, requestCacheService, secretsService, stringLocalizer) { _teamOptions = teamOptions ?? throw new ArgumentNullException(nameof(teamOptions)); _scheduleCacheService = scheduleCacheService ?? throw new ArgumentNullException(nameof(scheduleCacheService)); _systemTimeService = systemTimeService ?? throw new ArgumentNullException(nameof(systemTimeService)); }
public TeamOrchestrator(TeamOrchestratorOptions options, IScheduleConnectorService scheduleConnectorService, IScheduleSourceService scheduleSourceService, ITimeZoneService timeZoneService) { _options = options ?? throw new ArgumentNullException(nameof(options)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _scheduleSourceService = scheduleSourceService ?? throw new ArgumentNullException(nameof(scheduleSourceService)); _timeZoneService = timeZoneService ?? throw new ArgumentNullException(nameof(timeZoneService)); }
public OrchestratorTimerTrigger(TeamOrchestratorOptions teamOrchestratorOptions, FeatureOptions featureOptions, IScheduleConnectorService scheduleConnectorService, ISystemTimeService systemTimeService) { _options = teamOrchestratorOptions ?? throw new ArgumentNullException(nameof(teamOrchestratorOptions)); _featureOptions = featureOptions ?? throw new ArgumentNullException(nameof(featureOptions)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _systemTimeService = systemTimeService ?? throw new ArgumentNullException(nameof(systemTimeService)); }
public UnsubscribeTrigger(FeatureOptions options, ConnectorOptions connectorOptions, ISecretsService secretsService, IScheduleConnectorService scheduleConnectorService) { _options = options ?? throw new ArgumentNullException(nameof(options)); _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _connectorOptions = connectorOptions ?? throw new ArgumentNullException(nameof(connectorOptions)); }
protected ChangeRequestHandler(IScheduleConnectorService scheduleConnectorService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer) { _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _requestCacheService = requestCacheService ?? throw new ArgumentNullException(nameof(requestCacheService)); _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _stringLocalizer = stringLocalizer ?? throw new ArgumentNullException(nameof(stringLocalizer)); }
public ShiftPreferenceChangeRequestHandler(IScheduleConnectorService scheduleConnectorService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer, ICacheService cacheService, IWfmActionService wfmActionService, IAvailabilityMap availabilityMap) : base(scheduleConnectorService, requestCacheService, secretsService, stringLocalizer) { _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); _wfmActionService = wfmActionService ?? throw new ArgumentNullException(nameof(wfmActionService)); _availabilityMap = availabilityMap ?? throw new ArgumentNullException(nameof(availabilityMap)); }
public ManagerAssignOpenShiftHandler(TeamOrchestratorOptions teamOptions, IScheduleConnectorService scheduleConnectorService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <Triggers.ChangeRequestTrigger> stringLocalizer, IScheduleCacheService scheduleCacheService, ICacheService cacheService, IWfmActionService wfmActionService) : base(scheduleConnectorService, requestCacheService, secretsService, stringLocalizer) { _teamOptions = teamOptions ?? throw new ArgumentNullException(nameof(teamOptions)); _scheduleCacheService = scheduleCacheService ?? throw new ArgumentNullException(nameof(scheduleCacheService)); _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); _wfmActionService = wfmActionService ?? throw new ArgumentNullException(nameof(wfmActionService)); }
public TeamHealthTrigger(ConnectorOptions options, ISecretsService secretsService, IScheduleSourceService scheduleSourceService, IScheduleConnectorService scheduleConnectorService, IScheduleDestinationService scheduleDestinationService, IScheduleCacheService scheduleCacheService) { _options = options ?? throw new ArgumentNullException(nameof(options)); _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _scheduleSourceService = scheduleSourceService ?? throw new ArgumentNullException(nameof(scheduleSourceService)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _scheduleDestinationService = scheduleDestinationService ?? throw new ArgumentNullException(nameof(scheduleDestinationService)); _scheduleCacheService = scheduleCacheService ?? throw new ArgumentNullException(nameof(scheduleCacheService)); }
public SubscribeTrigger(MicrosoftGraphOptions options, IScheduleConnectorService scheduleConnectorService, IScheduleSourceService scheduleSourceService, IScheduleDestinationService scheduleDestinationService, ISecretsService secretsService, IHttpClientFactory httpClientFactory) { _options = options ?? throw new ArgumentNullException(nameof(options)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _scheduleSourceService = scheduleSourceService ?? throw new ArgumentNullException(nameof(scheduleSourceService)); _scheduleDestinationService = scheduleDestinationService ?? throw new ArgumentNullException(nameof(scheduleDestinationService)); _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory)); }
public TeamHealthTrigger(FeatureOptions featureOptions, ConnectorOptions options, IWfmDataService wfmDataService, IScheduleConnectorService scheduleConnectorService, ITeamsService teamsService, IScheduleCacheService scheduleCacheService, ICacheService cacheService) { _featureOptions = featureOptions ?? throw new ArgumentNullException(nameof(featureOptions)); _options = options ?? throw new ArgumentNullException(nameof(options)); _wfmDataService = wfmDataService ?? throw new ArgumentNullException(nameof(wfmDataService)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _teamsService = teamsService ?? throw new ArgumentNullException(nameof(teamsService)); _scheduleCacheService = scheduleCacheService ?? throw new ArgumentNullException(nameof(scheduleCacheService)); _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); }
public SubscribeTrigger(TeamOrchestratorOptions teamOrchestratorOptions, MicrosoftGraphOptions options, FeatureOptions featureOptions, IScheduleConnectorService scheduleConnectorService, IWfmDataService wfmDataService, ITeamsService teamsService, ISecretsService secretsService, IHttpClientFactory httpClientFactory, ISystemTimeService systemTimeService, ITimeZoneService timeZoneService) { _teamOrchestratorOptions = teamOrchestratorOptions ?? throw new ArgumentNullException(nameof(teamOrchestratorOptions)); _options = options ?? throw new ArgumentNullException(nameof(options)); _featureOptions = featureOptions ?? throw new ArgumentNullException(nameof(featureOptions)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _wfmDataService = wfmDataService ?? throw new ArgumentNullException(nameof(wfmDataService)); _teamsService = teamsService ?? throw new ArgumentNullException(nameof(teamsService)); _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory)); _systemTimeService = systemTimeService ?? throw new ArgumentNullException(nameof(systemTimeService)); _timeZoneService = timeZoneService ?? throw new ArgumentNullException(nameof(timeZoneService)); }
public StartTrigger(IScheduleConnectorService scheduleConnectorService) { _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); }
public static async Task <string> GetTimeZoneAsync(string teamId, int?timeZoneId, ITimeZoneService timeZoneService, IScheduleSourceService scheduleSourceService, IScheduleConnectorService scheduleConnectorService, ILogger log) { if (timeZoneId.HasValue) { var jdaTimeZoneName = await scheduleSourceService.GetJdaTimeZoneNameAsync(teamId, timeZoneId.Value).ConfigureAwait(false); try { return(await timeZoneService.GetTimeZoneInfoIdAsync(jdaTimeZoneName).ConfigureAwait(false)); } catch (KeyNotFoundException ex) { // the BY time zone name was not found in the map table so just return null log.LogTimeZoneError(ex, teamId, timeZoneId.Value, jdaTimeZoneName); } } return(null); }
public static async Task <string> GetAndUpdateTimeZoneAsync(string teamId, ITimeZoneService timeZoneService, IScheduleConnectorService scheduleConnectorService, IScheduleSourceService scheduleSourceService) { var connection = await scheduleConnectorService.GetConnectionAsync(teamId).ConfigureAwait(false); if (connection == null) { // the team must have been unsubscribed throw new ArgumentException("This team cannot be found in the teams table.", teamId); } if (!string.IsNullOrEmpty(connection.TimeZoneInfoId)) { return(connection.TimeZoneInfoId); } else { // we don't have a timezone for this existing connection, so try to get one var store = await scheduleSourceService.GetStoreAsync(connection.TeamId, connection.StoreId).ConfigureAwait(false); if (store?.TimeZoneId != null) { var jdaTimeZoneName = await scheduleSourceService.GetJdaTimeZoneNameAsync(teamId, store.TimeZoneId.Value).ConfigureAwait(false); var timeZoneInfoId = await timeZoneService.GetTimeZoneInfoIdAsync(jdaTimeZoneName).ConfigureAwait(false); if (timeZoneInfoId != null) { connection.TimeZoneInfoId = timeZoneInfoId; await scheduleConnectorService.SaveConnectionAsync(connection).ConfigureAwait(false); return(timeZoneInfoId); } } } return(null); }
public ConnectorHealthTimerTrigger(ConnectorHealthOptions options, IScheduleConnectorService scheduleConnectorService, ITeamsService teamsService) { _options = options ?? throw new ArgumentNullException(nameof(options)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); _teamsService = teamsService ?? throw new ArgumentNullException(nameof(teamsService)); }
public UnsubscribeTrigger(ISecretsService secretsService, IScheduleConnectorService scheduleConnectorService) { _secretsService = secretsService ?? throw new ArgumentNullException(nameof(secretsService)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); }
public OpenShiftChangeHandler(IScheduleConnectorService scheduleConnectorService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer) : base(scheduleConnectorService, requestCacheService, secretsService, stringLocalizer) { }
public CancelOpenShiftRequestHandler(TeamOrchestratorOptions teamOptions, FeatureOptions featureOptions, IScheduleConnectorService scheduleConnectorService, IScheduleCacheService scheduleCacheService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer, ICacheService cacheService, IWfmActionService wfmActionService) : base(teamOptions, featureOptions, scheduleConnectorService, scheduleCacheService, requestCacheService, secretsService, stringLocalizer, cacheService, wfmActionService) { }
public ClearScheduleTrigger(TeamOrchestratorOptions options, ISystemTimeService timeService, IScheduleConnectorService scheduleConnectorService) { _options = options ?? throw new System.ArgumentNullException(nameof(options)); _timeService = timeService ?? throw new ArgumentNullException(nameof(timeService)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); }
public ConfigTrigger(MicrosoftGraphOptions microsoftGraphOptions, JdaPersonaOptions jdaPersonaOptions, IScheduleConnectorService scheduleConnectorService) { _microsoftGraphOptions = microsoftGraphOptions ?? throw new ArgumentNullException(nameof(microsoftGraphOptions)); _jdaPersonaOptions = jdaPersonaOptions ?? throw new ArgumentNullException(nameof(jdaPersonaOptions)); _scheduleConnectorService = scheduleConnectorService ?? throw new ArgumentNullException(nameof(scheduleConnectorService)); }
protected SwapRequestHandler(TeamOrchestratorOptions teamOptions, FeatureOptions featureOptions, IScheduleConnectorService scheduleConnectorService, IScheduleCacheService scheduleCacheService, IRequestCacheService requestCacheService, ISecretsService secretsService, IStringLocalizer <ChangeRequestTrigger> stringLocalizer, ICacheService cacheService, IWfmActionService wfmActionService) : base(scheduleConnectorService, requestCacheService, secretsService, stringLocalizer) { _teamOptions = teamOptions ?? throw new ArgumentNullException(nameof(teamOptions)); _featureOptions = featureOptions ?? throw new ArgumentNullException(nameof(featureOptions)); _scheduleCacheService = scheduleCacheService ?? throw new ArgumentNullException(nameof(scheduleCacheService)); _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); _wfmActionService = wfmActionService ?? throw new ArgumentNullException(nameof(wfmActionService)); }