Beispiel #1
0
        private void OnReadyTimerTick(object state)           //selects suitable objects
        {
            var items = _storage.FindBy(ReminderItemFilter.FromNow());

            foreach (var item in items)
            {
                item.Status = ReminderItemStatus.Ready;
                _storage.Update(item);
            }
        }
Beispiel #2
0
        private void OnReadyTimerTick(object state)
        {
            var items = _storage.FindBy(ReminderItemFilter.FromNow());

            _logger.LogInformation("Found {0} matching items", items.Length);

            foreach (var item in items)
            {
                UpdateStatus(item, ReminderItemStatus.Ready);
            }
        }
Beispiel #3
0
        // goto Почемуто передается в datetime дeфолтное время
        public IActionResult List(ReminderItemStatus status, DateTimeOffset datetime)
        {
            var items  = _storage.FindBy(new ReminderItemFilter(status, datetime));
            var result = items.OrderBy(_ => _.DateTimeUTC).Select(item => new ReminderItemViewModel(item));

            return(Ok(result));
        }