• API Reference

    Show / Hide Table of Contents
    • Recore
      • AbsoluteUri
      • AsyncAction
      • AsyncAction<T>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8, T9>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7, T8>
      • AsyncAction<T1, T2, T3, T4, T5, T6, T7>
      • AsyncAction<T1, T2, T3, T4, T5, T6>
      • AsyncAction<T1, T2, T3, T4, T5>
      • AsyncAction<T1, T2, T3, T4>
      • AsyncAction<T1, T2, T3>
      • AsyncAction<T1, T2>
      • AsyncDefer
      • AsyncFunc<T, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, T7, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, T6, TResult>
      • AsyncFunc<T1, T2, T3, T4, T5, TResult>
      • AsyncFunc<T1, T2, T3, T4, TResult>
      • AsyncFunc<T1, T2, T3, TResult>
      • AsyncFunc<T1, T2, TResult>
      • AsyncFunc<TResult>
      • Defer
      • Either
      • Either<TLeft, TRight>
      • Func
      • ObjectExtensions
      • Of<T>
      • OfJsonAttribute
      • Optional
      • Optional<T>
      • RelativeUri
      • Result
      • Result.AsyncCatcher<TValue>
      • Result.Catcher<TValue>
      • Result<TValue, TError>
      • Unit
      • UriExtensions
    • Recore.Collections.Generic
      • AnonymousEqualityComparer<T>
      • ICollectionExtensions
      • IDictionaryExtensions
      • IIterator<T>
      • Iterator
      • LinkedListExtensions
      • ListExtensions
      • MappedComparer<T, TMapped>
      • MappedEqualityComparer<T, TMapped>
    • Recore.Linq
      • Renumerable
    • Recore.Security.Cryptography
      • SecureCompare
    • Recore.Text.Json.Serialization.Converters
      • OverrideEitherConverter<TLeft, TRight>
      • OverrideResultConverter<TValue, TError>
    • Recore.Threading.Tasks
      • TaskExtensions

    Class Renumerable

    Provides additional methods for working with objects that implement IEnumerable<T>.

    Inheritance
    Object
    Renumerable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Recore.Linq
    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
    Type Name Description
    IEnumerable<Decimal> source
    Returns
    Type Description
    ValueTuple<Int32, Decimal>
    | 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
    Type Name Description
    IEnumerable<Double> source
    Returns
    Type Description
    ValueTuple<Int32, Double>
    | 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
    Type Name Description
    IEnumerable<Int32> source
    Returns
    Type Description
    ValueTuple<Int32, Int32>
    | 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
    Type Name Description
    IEnumerable<Int64> source
    Returns
    Type Description
    ValueTuple<Int32, Int64>
    | 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
    Type Name Description
    IEnumerable<Nullable<Decimal>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Decimal>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Double>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Double>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Int32>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Int32>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Int64>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Int64>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Single>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Single>>
    | 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
    Type Name Description
    IEnumerable<Single> source
    Returns
    Type Description
    ValueTuple<Int32, Single>
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Returns
    Type Description
    ValueTuple<Int32, TSource>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Decimal> selector
    Returns
    Type Description
    ValueTuple<TSource, Decimal>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Double> selector
    Returns
    Type Description
    ValueTuple<TSource, Double>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Int32> selector
    Returns
    Type Description
    ValueTuple<TSource, Int32>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Int64> selector
    Returns
    Type Description
    ValueTuple<TSource, Int64>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Decimal>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Decimal>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Double>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Double>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Int32>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Int32>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Int64>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Int64>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Single>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Single>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Single> selector
    Returns
    Type Description
    ValueTuple<TSource, Single>
    Type Parameters
    Name Description
    TSource
    | 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 Description
    ValueTuple<TSource, TResult>
    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
    Type Name Description
    IEnumerable<Decimal> source
    Returns
    Type Description
    ValueTuple<Int32, Decimal>
    | 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
    Type Name Description
    IEnumerable<Double> source
    Returns
    Type Description
    ValueTuple<Int32, Double>
    | 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
    Type Name Description
    IEnumerable<Int32> source
    Returns
    Type Description
    ValueTuple<Int32, Int32>
    | 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
    Type Name Description
    IEnumerable<Int64> source
    Returns
    Type Description
    ValueTuple<Int32, Int64>
    | 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
    Type Name Description
    IEnumerable<Nullable<Decimal>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Decimal>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Double>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Double>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Int32>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Int32>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Int64>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Int64>>
    | 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
    Type Name Description
    IEnumerable<Nullable<Single>> source
    Returns
    Type Description
    ValueTuple<Int32, Nullable<Single>>
    | 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
    Type Name Description
    IEnumerable<Single> source
    Returns
    Type Description
    ValueTuple<Int32, Single>
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Returns
    Type Description
    ValueTuple<Int32, TSource>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Decimal> selector
    Returns
    Type Description
    ValueTuple<TSource, Decimal>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Double> selector
    Returns
    Type Description
    ValueTuple<TSource, Double>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Int32> selector
    Returns
    Type Description
    ValueTuple<TSource, Int32>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Int64> selector
    Returns
    Type Description
    ValueTuple<TSource, Int64>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Decimal>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Decimal>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Double>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Double>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Int32>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Int32>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Int64>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Int64>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Nullable<Single>> selector
    Returns
    Type Description
    ValueTuple<TSource, Nullable<Single>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<TSource> source
    Func<TSource, Single> selector
    Returns
    Type Description
    ValueTuple<TSource, Single>
    Type Parameters
    Name Description
    TSource
    | 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 Description
    ValueTuple<TSource, TResult>
    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
    Type Name Description
    IEnumerable<TSource> source
    Returns
    Type Description
    IEnumerable<ValueTuple<Int32, TSource>>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<IEnumerable<TSource>> source
    Returns
    Type Description
    IEnumerable<TSource>
    Type Parameters
    Name Description
    TSource
    | 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 Name Description
    IEnumerable<TSource> source
    Action<TSource> action
    Type Parameters
    Name Description
    TSource
    Remarks

    This method is evaluated eagerly.

    | 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 Description
    Action<IEnumerable<T>>
    Type Parameters
    Name Description
    T
    | 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 Description
    Func<IEnumerable<T>, IEnumerable<TResult>>
    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
    Type Name Description
    IEnumerable<TSource> source
    Returns
    Type Description
    IEnumerable<TSource>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<Nullable<TSource>> source
    Returns
    Type Description
    IEnumerable<TSource>
    Type Parameters
    Name Description
    TSource
    | 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
    Type Name Description
    IEnumerable<KeyValuePair<TKey, TValue>> source
    Func<TKey, TResult> func
    Returns
    Type Description
    IEnumerable<KeyValuePair<TResult, TValue>>
    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
    Type Name Description
    IEnumerable<KeyValuePair<TKey, TValue>> source
    Func<TValue, TResult> func
    Returns
    Type Description
    IEnumerable<KeyValuePair<TKey, TResult>>
    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
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Returns
    Type Description
    IEnumerable<ValueTuple<TFirst, TSecond>>
    Type Parameters
    Name Description
    TFirst
    TSecond
    | Improve this Doc View Source

    ToAsyncEnumerable<T>(IEnumerable<Task<T>>)

    Converts an sequence of tasks to IAsyncEnumerable<T>.

    Declaration
    public static IAsyncEnumerable<T> ToAsyncEnumerable<T>(this IEnumerable<Task<T>> source)
    Parameters
    Type Name Description
    IEnumerable<Task<T>> source
    Returns
    Type Description
    IAsyncEnumerable<T>
    Type Parameters
    Name Description
    T
    Remarks

    This is a shim to help more methods work with IAsyncEnumerable<T> and encourage its use in a codebase.

    | Improve this Doc View Source

    ToAsyncEnumerable<T>(Task<IEnumerable<T>>)

    Converts an asynchronously-returned sequence of T to IAsyncEnumerable<T>.

    Declaration
    public static IAsyncEnumerable<T> ToAsyncEnumerable<T>(this Task<IEnumerable<T>> source)
    Parameters
    Type Name Description
    Task<IEnumerable<T>> source
    Returns
    Type Description
    IAsyncEnumerable<T>
    Type Parameters
    Name Description
    T
    Remarks

    The IAsyncEnumerable<T> returned by this method won't yield the same throughput improvement of asynchronously generating each element in the sequence. Rather, this is a shim to help more methods work with IAsyncEnumerable<T> and encourage its use in a codebase.

    | Improve this Doc View Source

    ToDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>)

    Creates a Dictionary<TKey,TValue> from a sequence of key-value pairs.

    Declaration
    public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<TKey, TValue>> source
    Returns
    Type Description
    Dictionary<TKey, TValue>
    Type Parameters
    Name Description
    TKey
    TValue
    | Improve this Doc View Source

    ToLinkedList<TSource>(IEnumerable<TSource>)

    Creates a LinkedList<T> from an IEnumerable<T>.

    Declaration
    public static LinkedList<TSource> ToLinkedList<TSource>(this IEnumerable<TSource> source)
    Parameters
    Type Name Description
    IEnumerable<TSource> source
    Returns
    Type Description
    LinkedList<TSource>
    Type Parameters
    Name Description
    TSource
    Remarks

    Linked lists don't need to be resized when adding elements, which can give this method better performance than ToList<TSource>(IEnumerable<TSource>) or ToArray<TSource>(IEnumerable<TSource>). A common case is when you just want to force eager evaluation of a series of operations on an IEnumerable<T> or when you want to cache elements when performing multiple enumerations. For these cases, you don't need random access to elements, which makes LinkedList<T> a suitable data structure for storing the elements.

    | 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
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Returns
    Type Description
    IEnumerable<ValueTuple<TFirst, TSecond>>
    Type Parameters
    Name Description
    TFirst
    TSecond
    Remarks

    If the sequences are of different lengths,

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX