Class EnumerableEx 
  - Namespace
- DynamicData .Kernel
- Assembly
- DynamicData.dll
Enumerable extensions.
- Inheritance
- 
      
      EnumerableEx 
Methods
AsArray<T>(IEnumerable<T>)
Casts the enumerable to an array if it is already an array. Otherwise call ToArray.
Parameters
- sourceIEnumerable<T>
- The source. 
Returns
- T[]
- The array of items. 
Type Parameters
- T
- The type of the item. 
AsList<T>(IEnumerable<T>)
Casts the enumerable to a List if it is already a List. Otherwise call ToList.
Parameters
- sourceIEnumerable<T>
- The source. 
Returns
- List<T>
- The list. 
Type Parameters
- T
- The type of the item. 
Duplicates<T, TValue>(IEnumerable<T>, Func<T, TValue>)
Returns any duplicated values from the source.
public static IEnumerable<T> Duplicates<T, TValue>(this IEnumerable<T> source, Func<T, TValue> valueSelector)Parameters
- sourceIEnumerable<T>
- The source. 
- valueSelectorFunc<T, TValue>
- The value selector. 
Returns
- IEnumerable<T>
- The enumerable of items. 
Type Parameters
- T
- The type of the item. 
- TValue
- The type of the value. 
IndexOfMany<T>(IEnumerable<T>, IEnumerable<T>)
Finds the index of many items as specified in the secondary enumerable.
public static IEnumerable<ItemWithIndex<T>> IndexOfMany<T>(this IEnumerable<T> source, IEnumerable<T> itemsToFind)Parameters
- sourceIEnumerable<T>
- The source. 
- itemsToFindIEnumerable<T>
- The items to find in the source enumerable. 
Returns
- IEnumerable<ItemWith <T>>Index 
- A result as specified by the result selector. 
Type Parameters
- T
- The type of the item. 
IndexOfMany<TObject, TResult>(IEnumerable<TObject>, IEnumerable<TObject>, Func<TObject, int, TResult>)
Finds the index of many items as specified in the secondary enumerable.
public static IEnumerable<TResult> IndexOfMany<TObject, TResult>(this IEnumerable<TObject> source, IEnumerable<TObject> itemsToFind, Func<TObject, int, TResult> resultSelector)Parameters
- sourceIEnumerable<TObject>
- The source. 
- itemsToFindIEnumerable<TObject>
- The items to find. 
- resultSelectorFunc<TObject, int, TResult>
- The result selector. 
Returns
- IEnumerable<TResult>
- A result as specified by the result selector. 
Type Parameters
- TObject
- The type of the object. 
- TResult
- The type of the result.