コード例 #1
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);
        }
コード例 #2
0
ファイル: CalendarEventModel.cs プロジェクト: agamat/Ribbon-1
 public IList <CalendarEvent> GetAll()
 {
     return(_calendarEventRepository.GetAll());
 }
コード例 #3
0
 public IActionResult Get()
 {
     return(Ok(_calendarRepository.GetAll()));
 }