MoreEnumerableScanByTSource, TKey, TState Method (IEnumerableTSource, FuncTSource, TKey, FuncTKey, TState, FuncTState, TKey, TSource, TState, IEqualityComparerTKey) | 
 
            Applies an accumulator function over sequence element keys,
            returning the keys along with intermediate accumulator states. An
            additional parameter specifies the comparer to use to compare keys.
            
 
    Namespace: 
   MoreLinq
    Assembly:
   MoreLinq (in MoreLinq.dll) Version: 3.2.0+5205ea241d72b079436060d330cd5c2eae7cdcdf
Syntaxpublic static IEnumerable<KeyValuePair<TKey, TState>> ScanBy<TSource, TKey, TState>(
	this IEnumerable<TSource> source,
	Func<TSource, TKey> keySelector,
	Func<TKey, TState> seedSelector,
	Func<TState, TKey, TSource, TState> accumulator,
	IEqualityComparer<TKey> comparer
)
<ExtensionAttribute>
Public Shared Function ScanBy(Of TSource, TKey, TState) ( 
	source As IEnumerable(Of TSource),
	keySelector As Func(Of TSource, TKey),
	seedSelector As Func(Of TKey, TState),
	accumulator As Func(Of TState, TKey, TSource, TState),
	comparer As IEqualityComparer(Of TKey)
) As IEnumerable(Of KeyValuePair(Of TKey, TState))
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey, typename TState>
static IEnumerable<KeyValuePair<TKey, TState>>^ ScanBy(
	IEnumerable<TSource>^ source, 
	Func<TSource, TKey>^ keySelector, 
	Func<TKey, TState>^ seedSelector, 
	Func<TState, TKey, TSource, TState>^ accumulator, 
	IEqualityComparer<TKey>^ comparer
)
[<ExtensionAttribute>]
static member ScanBy : 
        source : IEnumerable<'TSource> * 
        keySelector : Func<'TSource, 'TKey> * 
        seedSelector : Func<'TKey, 'TState> * 
        accumulator : Func<'TState, 'TKey, 'TSource, 'TState> * 
        comparer : IEqualityComparer<'TKey> -> IEnumerable<KeyValuePair<'TKey, 'TState>> 
Parameters
- source
 - Type: System.Collections.GenericIEnumerableTSource
The source sequence. - keySelector
 - Type: SystemFuncTSource, TKey
            A function that returns the key given an element. - seedSelector
 - Type: SystemFuncTKey, TState
            A function to determine the initial value for the accumulator that is
            invoked once per key encountered. - accumulator
 - Type: SystemFuncTState, TKey, TSource, TState
            An accumulator function invoked for each element. - comparer
 - Type: System.Collections.GenericIEqualityComparerTKey
The equality comparer to use to determine
            whether or not keys are equal. If null, the default equality
            comparer for TSource is used. 
Type Parameters
- TSource
 - Type of the elements of the source sequence.
 - TKey
 - The type of the key.
 - TState
 - Type of the state.
 
Return Value
Type: 
IEnumerableKeyValuePairTKey, 
TState
            A sequence of keys paired with intermediate accumulator states.
            
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
IEnumerableTSource. 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).
See Also