Beispiel #1
0
        public TeamHoursRepository(
            ILogger <TeamHoursRepository> logger,
            IOptions <TimeTrackerOptions> timeTrackerOptions,
            IUserContext userContext,
            GraphAppUserService graphUserService,
            GraphAppSharePointService graphSharePointService,
            GraphAppCalendarService graphCalendarService,
            GraphAppTasksService graphTasksService,
            GraphAppMailService graphMailService,
            IWorkflowService <WorkHours> workHoursWorkflowService,
            ICacheService <ListCollectionPage <TeamHours> > teamHoursCache,
            ICacheService <ListCollectionPage <GraphResultItem> > directReportsCache)
        {
            _logger                   = logger ?? throw new ArgumentNullException(nameof(logger));
            _timeTrackerOptions       = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
            _userContext              = userContext ?? throw new ArgumentNullException(nameof(userContext));
            _graphUserService         = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
            _graphSharePointService   = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
            _graphCalendarService     = graphCalendarService ?? throw new ArgumentNullException(nameof(graphCalendarService));
            _graphTasksService        = graphTasksService ?? throw new ArgumentNullException(nameof(graphTasksService));
            _graphMailService         = graphMailService ?? throw new ArgumentNullException(nameof(graphMailService));
            _workHoursWorkflowService = workHoursWorkflowService ?? throw new ArgumentNullException(nameof(workHoursWorkflowService));
            _teamHoursCache           = teamHoursCache ?? throw new ArgumentNullException(nameof(teamHoursCache));
            _directReportsCache       = directReportsCache ?? throw new ArgumentNullException(nameof(directReportsCache));

            _teamHoursDataList = new List <TeamHours>();
        }
 public ReportHoursRepository(
     TimeTrackerOptions timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService)
 {
     _timeTrackerOptions     = timeTrackerOptions ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
 }
 public AnalyticsRepository(
     ILogger <AnalyticsRepository> logger,
     IOptions <TimeTrackerOptions> timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService)
 {
     _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     _timeTrackerOptions     = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public WorkflowServiceHelper(
     TimeTrackerOptions timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     UserProfileRepository userProfileRepository)
 {
     _timeTrackerOptions     = timeTrackerOptions ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _userProfileRepository  = userProfileRepository ?? throw new ArgumentNullException(nameof(userProfileRepository));
 }
Beispiel #5
0
 public ReportHoursRepository(
     ILogger <ReportHoursRepository> logger,
     IOptions <TimeTrackerOptions> timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     ICacheService <ListCollectionPage <ReportHours> > reportHoursCache)
 {
     _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     _timeTrackerOptions     = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _reportHoursCache       = reportHoursCache ?? throw new ArgumentNullException(nameof(reportHoursCache));
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public WorkflowServiceHelper(
     ILogger <WorkflowServiceHelper> logger,
     IOptions <TimeTrackerOptions> timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     IRepository <Notifications> notificationsRepository,
     IRepository <UserProfile> userProfileRepository)
 {
     _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     _timeTrackerOptions     = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _userProfileRepository  = userProfileRepository ?? throw new ArgumentNullException(nameof(userProfileRepository));
 }
Beispiel #7
0
 public UserProfileRepository(
     TimeTrackerOptions timeTrackerOptions,
     IUserContext userContext,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     string objectIdentifier
     )
 {
     _timeTrackerOptions     = timeTrackerOptions ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _userContext            = userContext ?? throw new ArgumentNullException(nameof(userContext));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _objectIdentifier       = objectIdentifier;
 }
Beispiel #8
0
 public UserProfileRepository(
     ILogger <UserProfileRepository> logger,
     IOptions <TimeTrackerOptions> timeTrackerOptions,
     IUserContext userContext,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     ICacheService <UserProfile> memoryCacheService)
 {
     _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     _timeTrackerOptions     = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _userContext            = userContext ?? throw new ArgumentNullException(nameof(userContext));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _memoryCacheService     = memoryCacheService ?? throw new ArgumentNullException(nameof(memoryCacheService));
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public WorkHoursWorkflowService(
     ILogger <WorkHoursWorkflowService> logger,
     IOptionsSnapshot <TimeTrackerOptions> timeTrackerOptions,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     WorkflowServiceHelper workflowServiceHelper,
     IRepository <Notifications> notificationsRepository,
     IRepository <UserProfile> userProfileRepository,
     ICacheService <ListCollectionPage <WorkHours> > cacheService)
 {
     _logger                  = logger ?? throw new ArgumentNullException(nameof(logger));
     _timeTrackerOptions      = timeTrackerOptions.Value ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _graphUserService        = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService  = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _workflowServiceHelper   = workflowServiceHelper ?? throw new ArgumentNullException(nameof(workflowServiceHelper));
     _notificationsRepository = notificationsRepository ?? throw new ArgumentNullException(nameof(notificationsRepository));
     _userProfileRepository   = userProfileRepository ?? throw new ArgumentNullException(nameof(userProfileRepository));
     _cacheService            = cacheService ?? throw new ArgumentNullException(nameof(cacheService));
 }
 public TeamHoursRepository(
     TimeTrackerOptions timeTrackerOptions,
     IUserContext userContext,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     GraphAppCalendarService graphCalendarService,
     GraphAppTasksService graphTasksService,
     GraphAppMailService graphMailService,
     String objectIdentifier
     )
 {
     _timeTrackerOptions     = timeTrackerOptions ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _userContext            = userContext ?? throw new ArgumentNullException(nameof(userContext));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _graphCalendarService   = graphCalendarService ?? throw new ArgumentNullException(nameof(graphCalendarService));
     _graphTasksService      = graphTasksService ?? throw new ArgumentNullException(nameof(graphTasksService));
     _graphMailService       = graphMailService ?? throw new ArgumentNullException(nameof(graphMailService));
     _teamHoursDataList      = new List <TeamHours>();
     _objectIdentifier       = objectIdentifier;//?? throw new ArgumentNullException(nameof(userContext));
 }
 public WorkHoursRepository(
     // IOptions<TimeTrackerOptions> timeTrackerOptions,
     TimeTrackerOptions timeTrackerOptions,
     IUserContext userContext,
     GraphAppUserService graphUserService,
     GraphAppSharePointService graphSharePointService,
     GraphAppCalendarService graphCalendarService,
     GraphAppTasksService graphTasksService,
     GraphAppMailService graphMailService,
     TimezoneHelper timezoneHelper,
     String objectIdentifier
     )
 {
     _timeTrackerOptions     = timeTrackerOptions ?? throw new ArgumentNullException(nameof(timeTrackerOptions));
     _userContext            = userContext ?? throw new ArgumentNullException(nameof(userContext));
     _graphUserService       = graphUserService ?? throw new ArgumentNullException(nameof(graphUserService));
     _graphSharePointService = graphSharePointService ?? throw new ArgumentNullException(nameof(graphSharePointService));
     _graphCalendarService   = graphCalendarService ?? throw new ArgumentNullException(nameof(graphCalendarService));
     _graphTasksService      = graphTasksService ?? throw new ArgumentNullException(nameof(graphTasksService));
     _graphMailService       = graphMailService ?? throw new ArgumentNullException(nameof(graphMailService));
     this.timezoneHelper     = timezoneHelper ?? throw new ArgumentNullException(nameof(timezoneHelper));
     _objectIdentifier       = objectIdentifier;      //?? throw new ArgumentNullException(nameof(userContext));
 }