Exemple #1
0
 public CalendarEventService()
 {
     if (Repository == null)
     {
         Repository = new CalendarEventRepository();
     }
 }
Exemple #2
0
 public CalendarService(ICalendarEventRepository calendarEventRepository,
                        IEventPermissionRepository eventPermissionRepository, IUnitOfWork unitOfWork)
 {
     _calendarEventRepository = calendarEventRepository;
     _eventPermissionRepository = eventPermissionRepository;
     _unitOfWork = unitOfWork;
 }
 public AppointmentQueueController(ILeadAccessRepository LeadRepository, ILeadRepository LRepository, IUserRepository UserRepository, IGenericUsageRepositoryInterface ToGetLeadByCardType, IAppointmentSheet GetAppointments, ICalendarEventRepository EventsRepository)
 {
     _UserRepository   = UserRepository;
     _LeadRepository   = LeadRepository;
     _LeadRepos        = LRepository;
     _UsageRepository  = ToGetLeadByCardType;
     _AppointmentRepos = GetAppointments;
     _EventsRepository = EventsRepository;
 }
        public EditCalendarEventCommandHandlerTests()
        {
            var options = new DbContextOptionsBuilder <CalendarContext>()
                          .UseInMemoryDatabase(databaseName: "Test")
                          .Options;

            _context = new CalendarContext(options);
            _calendarEventRepository = new CalendarCalendarEventRepository(_context);
        }
Exemple #5
0
 public CalendarController(IThresholdRepository Threshold, IUserRepository UserRepository, ICalendarEventRepository eventsRepository, ITimeSlotRepository timeSlotRepository, IAppointmentSheet appointmentsRepository)//, LeadProfileService leadRepos)
 {
     //eventsRepository = new StaticCalendarEventRepository();
     this._eventsRepository  = eventsRepository;
     _timeSlotRepository     = timeSlotRepository;
     _UserRepository         = UserRepository;
     _ThresholdRepository    = Threshold;
     _appointmentsRepository = appointmentsRepository;
 }
Exemple #6
0
 public UserController(IUserRepository UserRepository, IZoneRepository ZoneRepository, IUserZoneRepository UserZoneRepository, IPhoneUserRepository PhoneUserRepository, ITimeSlotRepository timeSlotRepository, IThresholdRepository Threshold, ICalendarEventRepository eventsRepository)
 {
     _UserRepository      = UserRepository;
     _ZoneRepository      = ZoneRepository;
     _UserZoneRepository  = UserZoneRepository;
     _PhoneUserRepos      = PhoneUserRepository;
     _timeSlotRepository  = timeSlotRepository;
     _ThresholdRepository = Threshold;
     _eventsRepository    = eventsRepository;
 }
Exemple #7
0
        public ConflictCheck(ICalendarEventRepository <CalendarEvent> repository
                             , [Optional] IOverlappingCheck olc)
        {
            _events = repository.GetAll(); // The idea is that, there will be many rule checks (my previous projects have over 30 rules) as well as many events (aka 1000+), so we do not want to connect to database multiple times

            IConflictCheck handler = BuildCheckChain(olc);

            handler.SetNext(new NullCheck()); // Null check always the last one
            _chain = new ConflictCheckChain(handler);
        }
Exemple #8
0
        public DeleteCalendarEventCommandHandlerTests()
        {
            var runner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 10);
            var server = new MongoClient(runner.ConnectionString);

            var database = server.GetDatabase("inMemoryDatabase");

            _context = new MongoDbContext(database);
            _calendarEventRepository = new CalendarEventRepository(_context);
        }
Exemple #9
0
        public void Can_Get_Events()
        {
            // Arrange
            ICalendarEventRepository repo = UnitTestHelpers.MockEventsRepository(
                //new CalendarEvent { title = "meeting", StartTime = DateTime.Now, EndTime = DateTime.Now.AddHours(3) },
                //new CalendarEvent { title = "meeting 2", StartTime = DateTime.Now.AddDays(10), EndTime = DateTime.Now.AddHours(3) }
                );
            //var controller = new CalendarController(repo);

            // Act
            //var actual = controller.GetEvents(UnitTestHelpers.ToUnixTimespan(DateTime.Now.AddDays(-1)),
            //UnitTestHelpers.ToUnixTimespan(DateTime.Now.AddDays(7))) as JsonResult;
            //List<CalendarDTO> result = actual.Data as List<CalendarDTO>;

            // Assert
            //Assert.AreEqual(2, result.Count);
        }
Exemple #10
0
 public LeadController(IThresholdRepository Threshold, IAAPSReportRepository ReportRepostitory, ILeadProfileService service, IAccountRepository accountservice, IUserRepository UserRepository,
                       ILeadRepository leadRepos, IGenericUsageRepositoryInterface genericUsage, ICardRepository cardRepos, IAppointmentSheet appointmentSheetRepos,
                       ICalendarEventRepository eventsRepository, IPhoneUserRepository PhoneUserRepos, ITimeSlotRepository timeSlotRepository, IAppointmentSheet appointmentsRepository)
 {
     _service                    = service;
     _AccountRepository          = accountservice;
     _UserRepository             = UserRepository;
     _leadRepos                  = leadRepos;
     _genericRepos               = genericUsage;
     _CardRepository             = cardRepos;
     _AppointmentSheetRepository = appointmentSheetRepos;
     _ReportRepository           = ReportRepostitory;
     _EventsRepository           = eventsRepository;
     _PhoneUserRepos             = PhoneUserRepos;
     _TimeSlotRepository         = timeSlotRepository;
     _ThresholdRepository        = Threshold;
     _appointmentsRepository     = appointmentsRepository;
 }
 public GetAllCalendarEventsQueryHandler(ICalendarEventRepository repository)
 {
     _repository = repository;
 }
Exemple #12
0
 public CalendarController(ICalendarEventRepository _calendarEventRepository, IUserRepository _userRepository)
 {
     this._calendarEventRepository = _calendarEventRepository;
     this._userRepository          = _userRepository;
 }
Exemple #13
0
 public CalendarEventModel(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
 public HomeController(ICalendarEventRepository toDoRepository)
 {
     _toDoRepository = toDoRepository;
 }
 public EventCollectionsApiController(ICalendarEventRepository calendarEventRepository)
 {
     _calendarRepository = calendarEventRepository;
 }
Exemple #16
0
 public EventController(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
Exemple #17
0
 public CalendarEventContrller(ILogger <CalendarEventContrller> logger, ICalendarEventRepository calendarRepository)
 {
     _logger             = logger;
     _calendarRepository = calendarRepository;
 }
Exemple #18
0
 public AddNewCalendarEventCommandHandler(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
Exemple #19
0
 public CalendarEventService(ICalendarEventRepository calendarEventRepository)
 {
     this.calendarEventRepository = calendarEventRepository;
 }
 public UnitOfWork(AppDataContext context, ILogEntryRepository logEntryRepository, ICalendarEventRepository calendarEventRepository)
 {
     this.context                 = context;
     this.logEntryRepository      = logEntryRepository;
     this.calendarEventRepository = calendarEventRepository;
 }
		public CalendarEventsController(ICalendarEventRepository repo) 
		{
			repository = repo;
		}
 public EditCalendarEventCommandHandler(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
 public RemoveCalendarEventCommandHandler(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
Exemple #24
0
 public GetCalendarEventsSortedPerTimeQueryHandler(ICalendarEventRepository repository)
 {
     _repository = repository;
 }
Exemple #25
0
 public CalendarEventModel(ICalendarEventRepository calendarEventRepository)
 {
     _calendarEventRepository = calendarEventRepository;
 }
Exemple #26
0
 public GetCalendarEventsFilterQueryHandler(ICalendarEventRepository repository)
 {
     _repository = repository;
 }