Esempio n. 1
0
 public static TAccumulate Aggregate <TSource, TAccumulate>(
     this List <TSource> source,
     TAccumulate seed,
     Func <TAccumulate, TSource, TAccumulate> aggregator)
 {
     return(ArrayProvider <TSource> .Extract(source).Aggregate(seed, aggregator));
 }
 public static TResult Aggregate <TSource, TAccumulate, TResult>(
     this ImmutableArray <TSource> source,
     TAccumulate seed,
     Func <TAccumulate, TSource, TAccumulate> aggregator,
     Func <TAccumulate, TResult> resultSelector)
 {
     return(ArrayProvider <TSource> .Extract(source).Aggregate(seed, aggregator, resultSelector));
 }
        public static double?Max(this ImmutableArray <double?> source)
        {
            var extractedArray = ArrayProvider <double?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Max());
            }

            return(ArrayExtensions.Max(extractedArray.Array));
        }
        public static double Average(this ImmutableArray <float> source)
        {
            var extractedArray = ArrayProvider <float> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Average());
            }

            return(ArrayExtensions.Average(extractedArray.Array));
        }
        public static float?Min(this ImmutableArray <float?> source)
        {
            var extractedArray = ArrayProvider <float?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Min());
            }

            return(ArrayExtensions.Min(extractedArray.Array));
        }
        public static long?Sum(this ImmutableArray <long?> source)
        {
            var extractedArray = ArrayProvider <long?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Sum());
            }

            return(ArrayExtensions.Sum(extractedArray.Array));
        }
Esempio n. 7
0
        public static double Average(this ReadOnlyCollection <double> source)
        {
            var extractedArray = ArrayProvider <double> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Average());
            }

            return(ArrayExtensions.Average(extractedArray.Array));
        }
Esempio n. 8
0
        public static float Max(this ReadOnlyCollection <float> source)
        {
            var extractedArray = ArrayProvider <float> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Max());
            }

            return(ArrayExtensions.Max(extractedArray.Array));
        }
Esempio n. 9
0
        public static long Min(this ReadOnlyCollection <long> source)
        {
            var extractedArray = ArrayProvider <long> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Min());
            }

            return(ArrayExtensions.Min(extractedArray.Array));
        }
Esempio n. 10
0
        public static T SingleOrDefault <T>(this List <T> source, Predicate <T> predicate)
        {
            var extractedArray = ArrayProvider <T> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.SingleOrDefault(predicate));
            }

            return(ArrayExtensions.SingleOrDefault(extractedArray.Array, predicate));
        }
Esempio n. 11
0
        public static float?Max(this List <float?> source)
        {
            var extractedArray = ArrayProvider <float?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Max());
            }

            return(ArrayExtensions.Max(extractedArray.Array));
        }
Esempio n. 12
0
        public static int?Sum(this List <int?> source)
        {
            var extractedArray = ArrayProvider <int?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Sum());
            }

            return(ArrayExtensions.Sum(extractedArray.Array));
        }
Esempio n. 13
0
        public static long?Min(this List <long?> source)
        {
            var extractedArray = ArrayProvider <long?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Min());
            }

            return(ArrayExtensions.Min(extractedArray.Array));
        }
Esempio n. 14
0
        public static int Sum(this ReadOnlyCollection <int> source)
        {
            var extractedArray = ArrayProvider <int> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Sum());
            }

            return(ArrayExtensions.Sum(extractedArray.Array));
        }
Esempio n. 15
0
        public static double?Average(this List <double?> source)
        {
            var extractedArray = ArrayProvider <double?> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Average());
            }

            return(ArrayExtensions.Average(extractedArray.Array));
        }
Esempio n. 16
0
        public static T Single <T>(this ReadOnlyCollection <T> source, Predicate <T> predicate)
        {
            var extractedArray = ArrayProvider <T> .Extract(source);

            if (!extractedArray.IsAsLongAsSourceArray)
            {
                return(extractedArray.Single(predicate));
            }

            return(ArrayExtensions.Single(extractedArray.Array, predicate));
        }
Esempio n. 17
0
 public static T Aggregate <T>(this List <T> source, Func <T, T, T> aggregator)
 {
     return(ArrayProvider <T> .Extract(source).Aggregate(aggregator));
 }
Esempio n. 18
0
 public static bool Contains <T>(this List <T> source, T item, IEqualityComparer <T> equalityComparer)
 {
     return(ArrayProvider <T> .Extract(source).Contains(item, equalityComparer));
 }
Esempio n. 19
0
 public static bool Contains <T>(this List <T> source, T item)
 {
     return(ArrayProvider <T> .Extract(source).Contains(item));
 }
Esempio n. 20
0
 public static int Count <T>(this List <T> source, Predicate <T> predicate)
 {
     return(ArrayProvider <T> .Extract(source).Count(predicate));
 }
Esempio n. 21
0
 public static WhereIterator <T> Where <T>(this List <T> source, Predicate <T> predicate)
 {
     return(ArrayProvider <T> .Extract(source).Where(predicate));
 }
Esempio n. 22
0
 public static bool All <T>(this List <T> source, Predicate <T> predicate)
 {
     return(ArrayProvider <T> .Extract(source).All(predicate));
 }
Esempio n. 23
0
 public static bool Any <T>(this List <T> source)
 {
     return(ArrayProvider <T> .Extract(source).Any());
 }
Esempio n. 24
0
 public static T First <T>(this List <T> source)
 {
     return(ArrayProvider <T> .Extract(source).First());
 }
Esempio n. 25
0
 public static T SingleOrDefault <T>(this List <T> source)
 {
     return(ArrayProvider <T> .Extract(source).SingleOrDefault());
 }
Esempio n. 26
0
 public static T ElementAtOrDefault <T>(this List <T> source, int index)
 {
     return(ArrayProvider <T> .Extract(source).ElementAtOrDefault(index));
 }
Esempio n. 27
0
 public static int Count <T>(this List <T> source)
 {
     return(ArrayProvider <T> .Extract(source).Count());
 }
Esempio n. 28
0
 public static T FirstOrDefault <T>(this ImmutableArray <T> source)
 {
     return(ArrayProvider <T> .Extract(source).FirstOrDefault());
 }
Esempio n. 29
0
 public static T FirstOrDefault <T>(this List <T> source, Predicate <T> predicate)
 {
     return(ArrayProvider <T> .Extract(source).FirstOrDefault(predicate));
 }
Esempio n. 30
0
 public static SelectIterator <TSource, TResult> Select <TSource, TResult>(
     this List <TSource> source,
     Func <TSource, TResult> selector)
 {
     return(ArrayProvider <TSource> .Extract(source).Select(selector));
 }