private IEnumerable <BulkLoadItem> GetAllItemsToCreate(BulkLoadContext context, CancellationToken cancellationToken) { ItemMapper mapper = new ItemMapper(); while (!Completed) { if (_itemsToCreate.TryTake(out var remoteData, int.MaxValue, cancellationToken)) { yield return(mapper.ToBulkLoadItem(remoteData, context, BulkLoadAction.Update)); } else { break; } } }