Memoize__2_1 - waf/Rx.NET GitHub Wiki
EnumerableEx.Memoize<TSource, TResult> Method (IEnumerable<TSource>, Int32, Func<IEnumerable<TSource>, IEnumerable<TResult>>)
Memoizes the source sequence within a selector function where a specified number of enumerators can get access to all of the sequence's elements without causing multiple enumerations over the source.
Namespace: System.Linq
Assembly: System.Interactive (in System.Interactive.dll)
public static IEnumerable<TResult> Memoize<TSource, TResult>(
this IEnumerable<TSource> source,
int readerCount,
Func<IEnumerable<TSource>, IEnumerable<TResult>> selector
)
Type: System.Collections.Generic.IEnumerable<TSource>
Source sequence.
Type: System.Int32
Number of enumerators that can access the underlying buffer. Once every enumerator has obtained an element from the buffer, the element is removed from the buffer.
Type: System.Func<IEnumerable<TSource>, IEnumerable<TResult>>
Selector function with memoized access to the source sequence for a specified number of enumerators.
Source sequence element type.
Result sequence element type.
Type: IEnumerable<TResult>
Sequence resulting from applying the selector function to the memoized view over the source sequence.
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).