Max() public static method

public static Max ( IEnumerable source ) : T
source IEnumerable
return T
Beispiel #1
0
    public void BlinqShouldEqualLinqNativeArrayMaxComparableSelector([ArrayValues] int[] sourceArr)
    {
        var arr            = Linq.ToArray(Linq.Select(sourceArr, (i) => (Comparable)i));
        var srcNativeArray = new NativeArray <Comparable>(arr, Allocator.Persistent);
        var expected       = ExceptionAndValue(() => Linq.Max(srcNativeArray, SelectSelf <Comparable>().Invoke));
        var actual         = ExceptionAndValue(() => Blinq.Max(srcNativeArray, SelectSelf <Comparable>()));

        srcNativeArray.Dispose();
    }
Beispiel #2
0
    public void BlinqShouldEqualLinqNativeArrayMaxSelector_int(
        [ValueSource(typeof(Values_int), nameof(Values_int.Values))] int[] sourceArr
        )
    {
        var srcNativeArray = new NativeArray <int>(sourceArr, Allocator.Persistent);
        var expected       = ExceptionAndValue(() => Linq.Max(srcNativeArray, SelectSelf <int>().Invoke));
        var actual         = ExceptionAndValue(() => Blinq.Max(srcNativeArray, SelectSelf <int>()));

        srcNativeArray.Dispose();
    }
Beispiel #3
0
    public void BlinqShouldEqualLinqNativeArrayMax_double(
        [ValueSource(typeof(Values_double), nameof(Values_double.Values))] double[] sourceArr
        )
    {
        var srcNativeArray = new NativeArray <double>(sourceArr, Allocator.Persistent);
        var expected       = ExceptionAndValue(() => Linq.Max(srcNativeArray));
        var actual         = ExceptionAndValue(() => Blinq.Max(srcNativeArray));

        srcNativeArray.Dispose();
    }
Beispiel #4
0
 public static int Max(this IEnumerable <int> source) =>
 LinqEnumerable.Max(source);
Beispiel #5
0
 public static long Max(this IEnumerable <long> source) =>
 LinqEnumerable.Max(source);
Beispiel #6
0
 public static float Max <TSource>(this IEnumerable <TSource> source, Func <TSource, float> selector) =>
 LinqEnumerable.Max(source, selector);
Beispiel #7
0
 public static TSource Max <TSource>(this IEnumerable <TSource> source) =>
 LinqEnumerable.Max(source);
Beispiel #8
0
 public static double?Max <TSource>(this IEnumerable <TSource> source, Func <TSource, double?> selector) =>
 LinqEnumerable.Max(source, selector);
 public static int?Max(this IEnumerable <int?> source)
 => Enumerable.Max(source);
Beispiel #10
0
 public static float Max(this IEnumerable <float> source) =>
 LinqEnumerable.Max(source);
Beispiel #11
0
 public static long Max <TSource>(this IEnumerable <TSource> source, Func <TSource, long> selector) =>
 LinqEnumerable.Max(source, selector);
 public static decimal?Max(this IEnumerable <decimal?> source)
 => Enumerable.Max(source);
 public static float?Max(this IEnumerable <float?> source)
 => Enumerable.Max(source);
 public static double?Max(this IEnumerable <double?> source)
 => Enumerable.Max(source);
 public static long?Max(this IEnumerable <long?> source)
 => Enumerable.Max(source);
Beispiel #16
0
 public static double Max(this IEnumerable <double> source) =>
 LinqEnumerable.Max(source);
Beispiel #17
0
 public static decimal Max(this IEnumerable <decimal> source) =>
 LinqEnumerable.Max(source);
Beispiel #18
0
 public static decimal Max <TSource>(this IEnumerable <TSource> source, Func <TSource, decimal> selector) =>
 LinqEnumerable.Max(source, selector);
Beispiel #19
0
 public static TResult Max <TSource, TResult>(this IEnumerable <TSource> source, Func <TSource, TResult> selector) =>
 LinqEnumerable.Max(source, selector);
 public static int?Max <TSource>(this IEnumerable <TSource> source, Func <TSource, int?> selector)
 => Enumerable.Max(source, selector);