Пример #1
0
        public ActionResult <LastModifiedResponse> GetLastModifiedDate([FromQuery] string scope = null)
        {
            var result = new LastModifiedResponse
            {
                Scope            = scope,
                LastModifiedDate = _lastModifiedDateTime.LastModified.UtcDateTime
            };

            return(Ok(result));
        }
Пример #2
0
        public IHttpActionResult GetLastModifiedDate(string scope = null)
        {
            var result = new LastModifiedResponse
            {
                Scope            = scope,
                LastModifiedDate = _changesTrackingService.GetLastModifiedDate(scope),
            };

            return(Ok(result));
        }
Пример #3
0
        public ActionResult <LastModifiedResponse> GetLastModifiedDate([FromQuery] string module = null)
        {
            var result = new LastModifiedResponse
            {
                Scope            = module,
                LastModifiedDate = _lastChangesService.GetLastModified(module).UtcDateTime
            };

            return(Ok(result));
        }
Пример #4
0
        public async Task <ActionResult <LastModifiedResponse> > GetLastModifiedDate([FromQuery] string scope = null)
        {
            var criteria = new ChangeLogSearchCriteria
            {
                Take = 1
            };
            // Get latest change  from operation log
            var latestChange = (await _changeLogSearchService.SearchAsync(criteria)).Results.FirstOrDefault();

            var result = new LastModifiedResponse
            {
                Scope            = scope,
                LastModifiedDate = new DateTime(Math.Max((latestChange?.ModifiedDate ?? _lastTimestamp).Ticks, _lastTimestamp.Ticks))
            };

            return(Ok(result));
        }