Class Renumerable
Provides additional methods for working with objects that implement
IEnumerable<T>.
Assembly: Recore.dll
Syntax
public static class Renumerable
Methods
|
Improve this Doc
View Source
Argmax(IEnumerable<Decimal>)
Returns the maximum value and the index of the maximum value from a sequence of Decimal values.
Declaration
public static (int Argmax, decimal Max) Argmax(this IEnumerable<decimal> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Double>)
Returns the maximum value and the index of the maximum value from a sequence of Double values.
Declaration
public static (int Argmax, double Max) Argmax(this IEnumerable<double> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Int32>)
Returns the maximum value and the index of the maximum value from a sequence of Int32 values.
Declaration
public static (int Argmax, int Max) Argmax(this IEnumerable<int> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Int64>)
Returns the maximum value and the index of the maximum value from a sequence of Int64 values.
Declaration
public static (int Argmax, long Max) Argmax(this IEnumerable<long> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Nullable<Decimal>>)
Returns the maximum value and the index of the maximum value from a sequence of nullable Decimal values.
Declaration
public static (int Argmax, decimal? Max) Argmax(this IEnumerable<decimal?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Nullable<Double>>)
Returns the maximum value and the index of the maximum value from a sequence of nullable Double values.
Declaration
public static (int Argmax, double? Max) Argmax(this IEnumerable<double?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Nullable<Int32>>)
Returns the maximum value and the index of the maximum value from a sequence of nullable Int32 values.
Declaration
public static (int Argmax, int? Max) Argmax(this IEnumerable<int?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Nullable<Int64>>)
Returns the maximum value and the index of the maximum value from a sequence of nullable Int64 values.
Declaration
public static (int Argmax, long? Max) Argmax(this IEnumerable<long?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Nullable<Single>>)
Returns the maximum value and the index of the maximum value from a sequence of nullable Single values.
Declaration
public static (int Argmax, float? Max) Argmax(this IEnumerable<float?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax(IEnumerable<Single>)
Returns the maximum value and the index of the maximum value from a sequence of Single values.
Declaration
public static (int Argmax, float Max) Argmax(this IEnumerable<float> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>)
Returns the maximum value and the index of the maximum value from a sequence of values.
Declaration
public static (int Argmax, TSource Max) Argmax<TSource>(this IEnumerable<TSource> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Decimal>)
Returns the maximum value and the maximizing value for a function returning Decimal on a sequence of values.
Declaration
public static (TSource Argmax, decimal Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Double>)
Returns the maximum value and the maximizing value for a function returning Double on a sequence of values.
Declaration
public static (TSource Argmax, double Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Int32>)
Returns the maximum value and the maximizing value for a function returning Int32 on a sequence of values.
Declaration
public static (TSource Argmax, int Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Int64>)
Returns the maximum value and the maximizing value for a function returning Int64 on a sequence of values.
Declaration
public static (TSource Argmax, long Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Decimal>>)
Returns the maximum value and the maximizing value for a function returning nullable Decimal on a sequence of values.
Declaration
public static (TSource Argmax, decimal? Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Double>>)
Returns the maximum value and the maximizing value for a function returning nullable Double on a sequence of values.
Declaration
public static (TSource Argmax, double? Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int32>>)
Returns the maximum value and the maximizing value for a function returning nullable Int32 on a sequence of values.
Declaration
public static (TSource Argmax, int? Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int64>>)
Returns the maximum value and the maximizing value for a function returning nullable Int64 on a sequence of values.
Declaration
public static (TSource Argmax, long? Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Single>>)
Returns the maximum value and the maximizing value for a function returning nullable Single on a sequence of values.
Declaration
public static (TSource Argmax, float? Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource>(IEnumerable<TSource>, Func<TSource, Single>)
Returns the maximum value and the maximizing value for a function returning Single on a sequence of values.
Declaration
public static (TSource Argmax, float Max) Argmax<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmax<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>)
Returns the maximum value and the maximizing value for a function on a sequence of values.
Declaration
public static (TSource Argmax, TResult Max) Argmax<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
Parameters
Type |
Name |
Description |
IEnumerable<TSource> |
source |
|
Func<TSource, TResult> |
selector |
|
Returns
Type Parameters
Name |
Description |
TSource |
|
TResult |
|
|
Improve this Doc
View Source
Argmin(IEnumerable<Decimal>)
Returns the minimum value and the index of the minimum value from a sequence of Decimal values.
Declaration
public static (int Argmin, decimal Min) Argmin(this IEnumerable<decimal> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Double>)
Returns the minimum value and the index of the minimum value from a sequence of Double values.
Declaration
public static (int Argmin, double Min) Argmin(this IEnumerable<double> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Int32>)
Returns the minimum value and the index of the minimum value from a sequence of Int32 values.
Declaration
public static (int Argmin, int Min) Argmin(this IEnumerable<int> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Int64>)
Returns the minimum value and the index of the minimum value from a sequence of Int64 values.
Declaration
public static (int Argmin, long Min) Argmin(this IEnumerable<long> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Nullable<Decimal>>)
Returns the minimum value and the index of the minimum value from a sequence of nullable Decimal values.
Declaration
public static (int Argmin, decimal? Min) Argmin(this IEnumerable<decimal?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Nullable<Double>>)
Returns the minimum value and the index of the minimum value from a sequence of nullable Double values.
Declaration
public static (int Argmin, double? Min) Argmin(this IEnumerable<double?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Nullable<Int32>>)
Returns the minimum value and the index of the minimum value from a sequence of nullable Int32 values.
Declaration
public static (int Argmin, int? Min) Argmin(this IEnumerable<int?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Nullable<Int64>>)
Returns the minimum value and the index of the minimum value from a sequence of nullable Int64 values.
Declaration
public static (int Argmin, long? Min) Argmin(this IEnumerable<long?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Nullable<Single>>)
Returns the minimum value and the index of the minimum value from a sequence of nullable Single values.
Declaration
public static (int Argmin, float? Min) Argmin(this IEnumerable<float?> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin(IEnumerable<Single>)
Returns the minimum value and the index of the minimum value from a sequence of Single values.
Declaration
public static (int Argmin, float Min) Argmin(this IEnumerable<float> source)
Parameters
Returns
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>)
Returns the minimum value and the index of the minimum value from a sequence of values.
Declaration
public static (int Argmin, TSource Min) Argmin<TSource>(this IEnumerable<TSource> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Decimal>)
Returns the minimum value and the minimizing value for a function returning nullable Decimal on a sequence of values.
Declaration
public static (TSource Argmin, decimal Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Double>)
Returns the minimum value and the minimizing value for a function returning Double on a sequence of values.
Declaration
public static (TSource Argmin, double Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Int32>)
Returns the minimum value and the minimizing value for a function returning Int32 on a sequence of values.
Declaration
public static (TSource Argmin, int Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Int64>)
Returns the minimum value and the minimizing value for a function returning Int64 on a sequence of values.
Declaration
public static (TSource Argmin, long Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Decimal>>)
Returns the minimum value and the minimizing value for a function returning nullable Decimal on a sequence of values.
Declaration
public static (TSource Argmin, decimal? Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Double>>)
Returns the minimum value and the minimizing value for a function returning nullable Double on a sequence of values.
Declaration
public static (TSource Argmin, double? Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int32>>)
Returns the minimum value and the minimizing value for a function returning nullable Int32 on a sequence of values.
Declaration
public static (TSource Argmin, int? Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int64>>)
Returns the minimum value and the minimizing value for a function returning nullable Int64 on a sequence of values.
Declaration
public static (TSource Argmin, long? Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Single>>)
Returns the minimum value and the minimizing value for a function returning nullable Single on a sequence of values.
Declaration
public static (TSource Argmin, float? Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource>(IEnumerable<TSource>, Func<TSource, Single>)
Returns the minimum value and the minimizing value for a function returning Single on a sequence of values.
Declaration
public static (TSource Argmin, float Min) Argmin<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Argmin<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>)
Returns the minimum value and the minimizing value for a function on a sequence of values.
Declaration
public static (TSource Argmin, TResult Min) Argmin<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
Parameters
Type |
Name |
Description |
IEnumerable<TSource> |
source |
|
Func<TSource, TResult> |
selector |
|
Returns
Type Parameters
Name |
Description |
TSource |
|
TResult |
|
|
Improve this Doc
View Source
Enumerate<TSource>(IEnumerable<TSource>)
Returns each element from a sequence along with its number from the beginning of the sequence, starting from zero.
Declaration
public static IEnumerable<(int Index, TSource Item)> Enumerate<TSource>(this IEnumerable<TSource> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Flatten<TSource>(IEnumerable<IEnumerable<TSource>>)
Converts a sequence of sequences into a single sequence.
Declaration
public static IEnumerable<TSource> Flatten<TSource>(this IEnumerable<IEnumerable<TSource>> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
ForEach<TSource>(IEnumerable<TSource>, Action<TSource>)
Performs an action on each element in a sequence.
Declaration
public static void ForEach<TSource>(this IEnumerable<TSource> source, Action<TSource> action)
Parameters
Type Parameters
|
Improve this Doc
View Source
Lift<T>(Action<T>)
Converts an action operating on a scalar value to an action operating on a sequence of values.
Declaration
public static Action<IEnumerable<T>> Lift<T>(Action<T> action)
Parameters
Type |
Name |
Description |
Action<T> |
action |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Lift<T, TResult>(Func<T, TResult>)
Converts a function operating on a scalar value to a function operating on a sequence of values.
Declaration
public static Func<IEnumerable<T>, IEnumerable<TResult>> Lift<T, TResult>(Func<T, TResult> func)
Parameters
Type |
Name |
Description |
Func<T, TResult> |
func |
|
Returns
Type Parameters
Name |
Description |
T |
|
TResult |
|
|
Improve this Doc
View Source
NonNull<TSource>(IEnumerable<TSource>)
Collects all non-null values from the sequence.
Declaration
public static IEnumerable<TSource> NonNull<TSource>(this IEnumerable<TSource> source)
where TSource : class
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
NonNull<TSource>(IEnumerable<Nullable<TSource>>)
Collects all non-null values from the sequence.
Declaration
public static IEnumerable<TSource> NonNull<TSource>(this IEnumerable<TSource?> source)
where TSource : struct
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnKeys<TKey, TValue, TResult>(IEnumerable<KeyValuePair<TKey, TValue>>, Func<TKey, TResult>)
Projects each key in a sequence of key-value pairs to a new form.
Declaration
public static IEnumerable<KeyValuePair<TResult, TValue>> OnKeys<TKey, TValue, TResult>(this IEnumerable<KeyValuePair<TKey, TValue>> source, Func<TKey, TResult> func)
Parameters
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
TResult |
|
|
Improve this Doc
View Source
OnValues<TKey, TValue, TResult>(IEnumerable<KeyValuePair<TKey, TValue>>, Func<TValue, TResult>)
Projects each value in a sequence of key-value pairs to a new form.
Declaration
public static IEnumerable<KeyValuePair<TKey, TResult>> OnValues<TKey, TValue, TResult>(this IEnumerable<KeyValuePair<TKey, TValue>> source, Func<TValue, TResult> func)
Parameters
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
TResult |
|
|
Improve this Doc
View Source
Product<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)
Returns each element from a sequence along with its number from the beginning of the sequence, starting from zero.
Declaration
public static IEnumerable<(TFirst first, TSecond second)> Product<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second)
Parameters
Returns
Type Parameters
Name |
Description |
TFirst |
|
TSecond |
|
|
Improve this Doc
View Source
ToAsyncEnumerable<T>(IEnumerable<Task<T>>)
Declaration
public static IAsyncEnumerable<T> ToAsyncEnumerable<T>(this IEnumerable<Task<T>> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
ToAsyncEnumerable<T>(Task<IEnumerable<T>>)
Declaration
public static IAsyncEnumerable<T> ToAsyncEnumerable<T>(this Task<IEnumerable<T>> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
ToDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>)
Declaration
public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)
Parameters
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
|
Improve this Doc
View Source
ToLinkedList<TSource>(IEnumerable<TSource>)
Declaration
public static LinkedList<TSource> ToLinkedList<TSource>(this IEnumerable<TSource> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Zip<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)
Merges two sequences to a single sequence of tuples.
Declaration
public static IEnumerable<(TFirst first, TSecond second)> Zip<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second)
Parameters
Returns
Type Parameters
Name |
Description |
TFirst |
|
TSecond |
|