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); } }
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; } }
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; } }