Max() публичный статический Метод

public static Max ( IEnumerable source ) : T
source IEnumerable
Результат T
Пример #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();
    }
Пример #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();
    }
Пример #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();
    }
Пример #4
0
 public static int Max(this IEnumerable <int> source) =>
 LinqEnumerable.Max(source);
Пример #5
0
 public static long Max(this IEnumerable <long> source) =>
 LinqEnumerable.Max(source);
Пример #6
0
 public static float Max <TSource>(this IEnumerable <TSource> source, Func <TSource, float> selector) =>
 LinqEnumerable.Max(source, selector);
Пример #7
0
 public static TSource Max <TSource>(this IEnumerable <TSource> source) =>
 LinqEnumerable.Max(source);
Пример #8
0
 public static double?Max <TSource>(this IEnumerable <TSource> source, Func <TSource, double?> selector) =>
 LinqEnumerable.Max(source, selector);
Пример #9
0
 public static int?Max(this IEnumerable <int?> source)
 => Enumerable.Max(source);
Пример #10
0
 public static float Max(this IEnumerable <float> source) =>
 LinqEnumerable.Max(source);
Пример #11
0
 public static long Max <TSource>(this IEnumerable <TSource> source, Func <TSource, long> selector) =>
 LinqEnumerable.Max(source, selector);
Пример #12
0
 public static decimal?Max(this IEnumerable <decimal?> source)
 => Enumerable.Max(source);
Пример #13
0
 public static float?Max(this IEnumerable <float?> source)
 => Enumerable.Max(source);
Пример #14
0
 public static double?Max(this IEnumerable <double?> source)
 => Enumerable.Max(source);
Пример #15
0
 public static long?Max(this IEnumerable <long?> source)
 => Enumerable.Max(source);
Пример #16
0
 public static double Max(this IEnumerable <double> source) =>
 LinqEnumerable.Max(source);
Пример #17
0
 public static decimal Max(this IEnumerable <decimal> source) =>
 LinqEnumerable.Max(source);
Пример #18
0
 public static decimal Max <TSource>(this IEnumerable <TSource> source, Func <TSource, decimal> selector) =>
 LinqEnumerable.Max(source, selector);
Пример #19
0
 public static TResult Max <TSource, TResult>(this IEnumerable <TSource> source, Func <TSource, TResult> selector) =>
 LinqEnumerable.Max(source, selector);
Пример #20
0
 public static int?Max <TSource>(this IEnumerable <TSource> source, Func <TSource, int?> selector)
 => Enumerable.Max(source, selector);