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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
public static T Aggregate <T>(this List <T> source, Func <T, T, T> aggregator) { return(ArrayProvider <T> .Extract(source).Aggregate(aggregator)); }
public static bool Contains <T>(this List <T> source, T item, IEqualityComparer <T> equalityComparer) { return(ArrayProvider <T> .Extract(source).Contains(item, equalityComparer)); }
public static bool Contains <T>(this List <T> source, T item) { return(ArrayProvider <T> .Extract(source).Contains(item)); }
public static int Count <T>(this List <T> source, Predicate <T> predicate) { return(ArrayProvider <T> .Extract(source).Count(predicate)); }
public static WhereIterator <T> Where <T>(this List <T> source, Predicate <T> predicate) { return(ArrayProvider <T> .Extract(source).Where(predicate)); }
public static bool All <T>(this List <T> source, Predicate <T> predicate) { return(ArrayProvider <T> .Extract(source).All(predicate)); }
public static bool Any <T>(this List <T> source) { return(ArrayProvider <T> .Extract(source).Any()); }
public static T First <T>(this List <T> source) { return(ArrayProvider <T> .Extract(source).First()); }
public static T SingleOrDefault <T>(this List <T> source) { return(ArrayProvider <T> .Extract(source).SingleOrDefault()); }
public static T ElementAtOrDefault <T>(this List <T> source, int index) { return(ArrayProvider <T> .Extract(source).ElementAtOrDefault(index)); }
public static int Count <T>(this List <T> source) { return(ArrayProvider <T> .Extract(source).Count()); }
public static T FirstOrDefault <T>(this ImmutableArray <T> source) { return(ArrayProvider <T> .Extract(source).FirstOrDefault()); }
public static T FirstOrDefault <T>(this List <T> source, Predicate <T> predicate) { return(ArrayProvider <T> .Extract(source).FirstOrDefault(predicate)); }
public static SelectIterator <TSource, TResult> Select <TSource, TResult>( this List <TSource> source, Func <TSource, TResult> selector) { return(ArrayProvider <TSource> .Extract(source).Select(selector)); }