コード例 #1
0
ファイル: GuideInfo.cs プロジェクト: piet5211/RPLiveTV
        /// <summary>
        /// Store a keyed dictionary of scheduled events, keyed by name and start time
        /// </summary>
        /// <param name="_startWindow"></param>
        /// <param name="_endWindow"></param>
        /// <param name="_state"></param>
        /// <returns></returns>
        public static bool CacheRedDotRecordingsForDateRange(DateTime _startWindow, DateTime _endWindow, ScheduleEventStates _state)
        {
            if (!EventScheduleExists)
            {
                return(false);
            }

            _cachedScheduledEventNames.Clear();

            ICollection <ScheduleEvent> events = es.GetScheduleEvents(_startWindow, _endWindow, _state);

            foreach (ScheduleEvent se in events)
            {
                try
                {
                    _cachedScheduledEventNames.Add(se.ToKey(), se.Id);
                }
                catch (Exception ex) {
                    Functions.WriteLineToLogFile("Error adding scheduled event to cached list:");
                    Functions.WriteExceptionToLogFile(ex);
                }  // in case of duplicates etc
            }
            return(true);
        }
コード例 #2
0
ファイル: GuideInfo.cs プロジェクト: piet5211/RPLiveTV
        public static bool CacheScheduleEventsForDateRange(DateTime _startWindow, DateTime _endWindow, ScheduleEventStates _state)
        {
            if (!EventScheduleExists)
            {
                return(false);
            }

            _cachedScheduleEvents = es.GetScheduleEvents(_startWindow, _endWindow, _state);
            return(true);
        }