Esempio n. 1
0
 public Scheduler(IDateTimeRepository dateTimeRepository, IScheduler scheduler, CronTimeStreamBase cronTimeStream, bool callbackOnScheduler = false)
 {
     _dateTimeRepository  = dateTimeRepository;
     _scheduler           = scheduler;
     _cronTimeStream      = cronTimeStream;
     _callbackOnScheduler = callbackOnScheduler;
 }
Esempio n. 2
0
        public CronSchedulerStreamTests()
        {
            _dateTimeRepository = new DateTimeRepositoryRx(_testScheduler);

            var breakTemplate = new CronTemplateBuilder()
                                .WithMinutes(0, 15, 30)
                                .WithHours(9, 14)
                                .WithAllDaysOfMonth()
                                .WithDaysOfWeek(1, 2, 3, 4, 5)
                                .WithAllMonths()
                                .Build();

            var hourlyTemplate = new CronTemplateBuilder()
                                 .WithMinutes(0)
                                 .WithHours(11, 12, 13, 16, 17)
                                 .WithAllDaysOfMonth()
                                 .WithDaysOfWeek(1, 2, 3, 4, 5)
                                 .WithAllMonths()
                                 .Build();

            _simpleStreamBase  = new CronTimeStreamSimple(breakTemplate, DateTime.Now);
            _complexStreamBase = new CronTimeStreamComplex(DateTime.Now, breakTemplate, hourlyTemplate);

            _simpleScheduler  = new Scheduler(_dateTimeRepository, _testScheduler, _simpleStreamBase, true);
            _complexScheduler = new Scheduler(_dateTimeRepository, _testScheduler, _complexStreamBase, true);
        }
Esempio n. 3
0
 public EventController(
     IDateTimeRepository datetimeRepository,
     IRepository <Event> eventRepository,
     IConfigurationRepository configurationRepository,
     IEventService eventService)
 {
     this._datetimeRepository      = datetimeRepository;
     this._eventRepository         = eventRepository;
     this._configurationRepository = configurationRepository;
     this._eventService            = eventService;
 }
Esempio n. 4
0
 public AccountController(
     IApplicationUserServices applicationUserServices,
     IDateTimeRepository datetimeRepository,
     IConfigurationRepository configurationRepository,
     IReferenceUserService referenceUserService,
     IPersonalFileService personalFileService)
 {
     this._applicationUserServices = applicationUserServices;
     this._datetimeRepository      = datetimeRepository;
     this._configurationRepository = configurationRepository;
     this._referenceUserService    = referenceUserService;
     this._personalFileService     = personalFileService;
 }
Esempio n. 5
0
 public ResearchController(
     IRepository2 <Research> researchRepository,
     IRepository <ResearchCategory> researchCategoryRepository,
     IConfigurationRepository configurationRepository,
     IDateTimeRepository datetimeRepository,
     IResearchService researchService)
 {
     this._researchRepository         = researchRepository;
     this._researchCategoryRepository = researchCategoryRepository;
     this._configurationRepository    = configurationRepository;
     this._datetimeRepository         = datetimeRepository;
     this._researchService            = researchService;
 }
        public CronSchedulerStreamReactiveTests()
        {
            _dateTimeRepository = new DateTimeRepositoryRx(_testScheduler);

            var breakTemplate = new CronTemplateBuilder()
                                .WithMinutes(0, 15, 30)
                                .WithHours(9, 14)
                                .WithAllDaysOfMonth()
                                .WithDaysOfWeek(1, 2, 3, 4, 5)
                                .WithAllMonths()
                                .Build();

            _simpleStreamBase  = new CronTimeStreamSimple(breakTemplate, _dateTimeRepository.Now());
            _reactiveScheduler = new ReactiveScheduler(
                _dateTimeRepository, _testScheduler, _simpleStreamBase);
        }
Esempio n. 7
0
 public ForumController(
     IRepository2 <Forum> forumRepository,
     IRepository <ForumCategory> forumCategoryRepository,
     IRepository <Comment> commentRepository,
     IConfigurationRepository configurationRepository,
     ICommentService commentService,
     IDateTimeRepository datetimeRepository,
     IForumService forumService)
 {
     this._forumRepository         = forumRepository;
     this._forumCategoryRepository = forumCategoryRepository;
     this._commentRepository       = commentRepository;
     this._configurationRepository = configurationRepository;
     this._commentService          = commentService;
     this._datetimeRepository      = datetimeRepository;
     this._forumService            = forumService;
 }
Esempio n. 8
0
 public CourseController(
     IDateTimeRepository datetimeRepository,
     IRepository2 <Course> courseRepository,
     IRepository2 <PhotoAlbum> photoAlbumRepository,
     IRepository <CourseCategory> courseCategoryRepository,
     ICourseService courseService,
     ICurriculumRepository curriculumRepository,
     IStudentCourseRepository studentCourseRepository,
     IRepository <StudentScore> studentScoreRepository,
     IConfigurationRepository configurationRepository,
     IPhotoAlbumService photoAlbumService,
     IRepository <Photo> photoRepository,
     ICurriculumService curriculumService,
     IStudentCourseService studentCourseService,
     IStudentScoreService studentScoreService,
     IBannerService bannerService,
     IRepository <Banner> bannerRepository,
     IRepository <Handout> handoutRepository,
     IHandoutService handoutService)
 {
     this._datetimeRepository       = datetimeRepository;
     this._courseRepository         = courseRepository;
     this._photoAlbumRepository     = photoAlbumRepository;
     this._courseCategoryRepository = courseCategoryRepository;
     this._courseService            = courseService;
     this._curriculumRepository     = curriculumRepository;
     this._studentCourseRepository  = studentCourseRepository;
     this._studentScoreRepository   = studentScoreRepository;
     this._configurationRepository  = configurationRepository;
     this._photoAlbumService        = photoAlbumService;
     this._photoRepository          = photoRepository;
     this._curriculumService        = curriculumService;
     this._studentCourseService     = studentCourseService;
     this._studentScoreService      = studentScoreService;
     this._bannerService            = bannerService;
     this._bannerRepository         = bannerRepository;
     this._handoutRepository        = handoutRepository;
     this._handoutService           = handoutService;
 }
Esempio n. 9
0
 public SharedController(
     IEmailSender emailSender,
     IRepository <Photo> photoRepository,
     IRepository2 <PhotoAlbum> photoAlbumRepository,
     IDateTimeRepository datetimeRepository,
     IConfigurationRepository configRepository,
     IPhotoAlbumService photoAlbumService,
     IRepository <Banner> bannerRepository,
     IBannerService bannerService,
     IAlumniService alumniService,
     IRepository <Alumni> alumniRepository)
 {
     this._emailSender          = emailSender;
     this._photoRepository      = photoRepository;
     this._photoAlbumRepository = photoAlbumRepository;
     this._datetimeRepository   = datetimeRepository;
     this._configRepository     = configRepository;
     this._photoAlbumService    = photoAlbumService;
     this._bannerRepository     = bannerRepository;
     this._bannerService        = bannerService;
     this._alumniService        = alumniService;
     this._alumniRepository     = alumniRepository;
 }
Esempio n. 10
0
        /// <summary>
        /// Gets the date in X working days from the current date.
        /// </summary>
        /// <param name="workingDays">The working days (can be negative to deduct working days).</param>
        /// <returns>The date in x working days.</returns>
        DateTime?IDateTimeRepository.GetDateInXWorkingDaysFromCurrentDate(int workingDays)
        {
            IDateTimeRepository dateTimeRepository = this;

            return(dateTimeRepository.GetDateInXWorkingDays(dateTimeRepository.GetCurrentDateTime().Date, workingDays));
        }
Esempio n. 11
0
 public CommitteeController(IDateTimeRepository datetimeRepository)
 {
     this._datetimeRepository = datetimeRepository;
 }
 public ReactiveScheduler(IDateTimeRepository dateTimeRepository, IScheduler scheduler, CronTimeStreamBase cronTimeStream, bool callbackOnScheduler = false)
 {
     _scheduler = new Scheduler(dateTimeRepository, scheduler, cronTimeStream, callbackOnScheduler);
     _schedulerCallbackObservable = new SubjectWithHookableDispose <CronTime>(DisposedCalled);
 }
Esempio n. 13
0
 public ExamRegistrationController(IDateTimeRepository datetimeRepository)
 {
     this._datetimeRepository = datetimeRepository;
 }
Esempio n. 14
0
 public VideoController(IDateTimeRepository datetimeRepository, IRepository <Video> videoRepository)
 {
     this._datetimeRepository = datetimeRepository;
     this._videoRepository    = videoRepository;
 }
Esempio n. 15
0
 public PointlessService(IDateTimeRepository dateTimeRepository)
 {
     _dateTimeRepository = dateTimeRepository;
 }
Esempio n. 16
0
 public NewsController(IDateTimeRepository datetimeRepository, IRepository <News> newsRepository, INewsService newsService)
 {
     this._datetimeRepository = datetimeRepository;
     this._newsRepository     = newsRepository;
     this._newsService        = newsService;
 }