コード例 #1
0
        public void Init(EventPaging progress)
        {
            EventPaging existing = EventTypePaging.Where(et => et.Type.Equals(progress.Type, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

            if (existing is null)
            {
                EventTypePaging.Add(progress);
            }
        }
コード例 #2
0
        public void MarkEventTypeProgress(EventPaging progress)
        {
            EventPaging existing = EventTypePaging.Where(et => et.Type.Equals(progress.Type, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

            if (existing is null)
            {
                EventTypePaging.Add(progress);
            }
            else
            {
                existing.PaginationToken = progress.PaginationToken;
                existing.ProcessedCount  = progress.ProcessedCount;
                existing.TotalCount      = progress.TotalCount;
            }
        }
コード例 #3
0
        public void MarkPaginationTokenAsProcessed(string eventTypeId, string paginationToken)
        {
            EventTypeRebuildPaging existing = EventTypePaging.Where(et => et.Type.Equals(eventTypeId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

            if (existing is null)
            {
                existing = new EventTypeRebuildPaging()
                {
                    Type            = eventTypeId,
                    PaginationToken = paginationToken
                };

                EventTypePaging.Add(existing);
            }
            else
            {
                existing.PaginationToken = paginationToken;
            }
        }