Method ConvertItems
ConvertItems<TSource, TDest>(Func<TSource, TDest?>, Func<IEnumerable<TDest>, bool>, IEnumerable<TSource>, int)
Converts items from the IEnumerable<T> specified in the
source parameter to the destination by calling addToDest
function. Item type is converted using convertItem function.
public static void ConvertItems<TSource, TDest>(Func<TSource, TDest?> convertItem, Func<IEnumerable<TDest>, bool> addToDest, IEnumerable<TSource> source, int bufferSize = 10)
Parameters
convertItemFunc<TSource, TDest>The function which converts item from the
TSourcetype to theTDesttype. Return Null to ignore the item.addToDestFunc<IEnumerable<TDest>, bool>The function which is used to add items to the destination.
sourceIEnumerable<TSource>Source of the items for the conversion.
bufferSizeintSize of the buffer for the items. Optional. Default is 10.
Type Parameters
TSourceType of the item in the
source.TDestType of the destination item.