private void DuplicateRow(TInput row) { if (row == null) { return; } OutputBuffer.SendAsync(row).Wait(); LogProgress(); for (int i = 0; i < NumberOfDuplicates; i++) { if (CanDuplicate?.Invoke(row) ?? true) { TInput copy = ObjectCopy.Clone(row); OutputBuffer.SendAsync(copy).Wait(); LogProgress(); } } }
private IEnumerable <TInput> DuplicateRow(TInput row) { if (row == null) { return(null); } List <TInput> result = new List <TInput>(NumberOfDuplicates); result.Add(row); LogProgress(); for (int i = 0; i < NumberOfDuplicates; i++) { if (CanDuplicate?.Invoke(row) ?? true) { TInput copy = ObjectCopy.Clone(row); result.Add(copy); LogProgress(); } } return(result); }