/// <summary> /// Transform the input stream into a similar stream but with a different structure and calculation using a processor based on the occurrence index /// </summary> /// <param name="stream">Input stream</param> /// <param name="name">Name of the operation</param> /// <param name="processor">Processor that will handle the transformation using the occurrence index</param> /// <typeparam name="TIn">Input type</typeparam> /// <typeparam name="TOut">Output type</typeparam> /// <returns>Output stream</returns> public static IStream <TOut> Select <TIn, TOut>(this IStream <TIn> stream, string name, ISelectWithIndexProcessor <TIn, TOut> processor, bool withNoDispose = false) { return(new SelectWithIndexStreamNode <TIn, TOut>(name, new SelectWithIndexArgs <TIn, TOut> { Stream = stream, Processor = processor, WithNoDispose = withNoDispose }).Output); }
public static ISingleStream <TOut> Select <TIn, TOut>(this ISingleStream <TIn> stream, string name, ISelectWithIndexProcessor <TIn, TOut> processor, bool excludeNull = false) { return(new SelectSingleWithIndexStreamNode <TIn, TOut>(name, new SelectSingleWithIndexArgs <TIn, TOut> { Stream = stream, Processor = processor, ExcludeNull = excludeNull }).Output); }