public async Task Add(CatalogItem item) { _currentBatch.Add(item); if (_currentBatch.Count == _batchSize) { await SubmitCurrentBatch(); _currentBatch.Clear(); } }
public void Add(CatalogItem item) { Check(); _batch.Add(item); }