using System; using System.Collections; using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; namespace System.Linq { /// Provides a set of static (Shared in Visual Basic) methods for querying data structures that implement . // Token: 0x02000042 RID: 66 public static class Queryable { // Token: 0x060003A5 RID: 933 RVA: 0x00011018 File Offset: 0x0000F218 private static MethodInfo MakeGeneric(MethodBase method, params Type[] parameters) { return ((MethodInfo)method).MakeGenericMethod(parameters); } // Token: 0x060003A6 RID: 934 RVA: 0x00011028 File Offset: 0x0000F228 private static Expression StaticCall(MethodInfo method, params Expression[] expressions) { return Expression.Call(null, method, expressions); } // Token: 0x060003A7 RID: 935 RVA: 0x00011034 File Offset: 0x0000F234 private static TRet Execute(this IQueryable source, MethodBase current) { return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(current, new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Applies an accumulator function over a sequence. /// The final accumulator value. /// A sequence to aggregate over. /// An accumulator function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003A8 RID: 936 RVA: 0x0001107C File Offset: 0x0000F27C public static TSource Aggregate(this IQueryable source, Expression> func) { Check.SourceAndFunc(source, func); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(func) })); } /// Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. /// The final accumulator value. /// A sequence to aggregate over. /// The initial accumulator value. /// An accumulator function to invoke on each element. /// The type of the elements of . /// The type of the accumulator value. /// /// or is null. // Token: 0x060003A9 RID: 937 RVA: 0x000110D8 File Offset: 0x0000F2D8 public static TAccumulate Aggregate(this IQueryable source, TAccumulate seed, Expression> func) { Check.SourceAndFunc(source, func); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TAccumulate) }), new Expression[] { source.Expression, Expression.Constant(seed), Expression.Quote(func) })); } /// Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. /// The transformed final accumulator value. /// A sequence to aggregate over. /// The initial accumulator value. /// An accumulator function to invoke on each element. /// A function to transform the final accumulator value into the result value. /// The type of the elements of . /// The type of the accumulator value. /// The type of the resulting value. /// /// or or is null. // Token: 0x060003AA RID: 938 RVA: 0x0001114C File Offset: 0x0000F34C public static TResult Aggregate(this IQueryable source, TAccumulate seed, Expression> func, Expression> selector) { Check.SourceAndFuncAndSelector(source, func, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TAccumulate), typeof(TResult) }), new Expression[] { source.Expression, Expression.Constant(seed), Expression.Quote(func), Expression.Quote(selector) })); } /// Determines whether all the elements of a sequence satisfy a condition. /// true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false. /// A sequence whose elements to test for a condition. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x060003AB RID: 939 RVA: 0x000111D8 File Offset: 0x0000F3D8 public static bool All(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Determines whether a sequence contains any elements. /// true if the source sequence contains any elements; otherwise, false. /// A sequence to check for being empty. /// The type of the elements of . /// /// is null. // Token: 0x060003AC RID: 940 RVA: 0x00011234 File Offset: 0x0000F434 public static bool Any(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Determines whether any element of a sequence satisfies a condition. /// true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. /// A sequence whose elements to test for a condition. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x060003AD RID: 941 RVA: 0x00011284 File Offset: 0x0000F484 public static bool Any(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Converts a generic to a generic . /// An that represents the input sequence. /// A sequence to convert. /// The type of the elements of . /// /// is null. // Token: 0x060003AE RID: 942 RVA: 0x000112E0 File Offset: 0x0000F4E0 public static IQueryable AsQueryable(this IEnumerable source) { if (source == null) { throw new ArgumentNullException("source"); } IQueryable queryable = source as IQueryable; if (queryable != null) { return queryable; } return new QueryableEnumerable(source); } /// Converts an to an . /// An that represents the input sequence. /// A sequence to convert. /// /// does not implement for some . /// /// is null. // Token: 0x060003AF RID: 943 RVA: 0x00011314 File Offset: 0x0000F514 public static IQueryable AsQueryable(this IEnumerable source) { if (source == null) { throw new ArgumentNullException("source"); } IQueryable queryable = source as IQueryable; if (queryable != null) { return queryable; } Type type = source.GetType(); if (!type.IsGenericImplementationOf(typeof(IEnumerable<>))) { throw new ArgumentException("source is not IEnumerable<>"); } return (IQueryable)Activator.CreateInstance(typeof(QueryableEnumerable<>).MakeGenericType(new Type[] { type.GetFirstGenericArgument() }), new object[] { source }); } /// Computes the average of a sequence of values. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// /// is null. /// /// contains no elements. // Token: 0x060003B0 RID: 944 RVA: 0x0001139C File Offset: 0x0000F59C public static double Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of nullable values. /// The average of the sequence of values, or null if the source sequence is empty or contains only null values. /// A sequence of nullable values to calculate the average of. /// /// is null. // Token: 0x060003B1 RID: 945 RVA: 0x000113D8 File Offset: 0x0000F5D8 public static double? Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of values. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// /// is null. /// /// contains no elements. // Token: 0x060003B2 RID: 946 RVA: 0x00011414 File Offset: 0x0000F614 public static double Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of nullable values. /// The average of the sequence of values, or null if the source sequence is empty or contains only null values. /// A sequence of nullable values to calculate the average of. /// /// is null. // Token: 0x060003B3 RID: 947 RVA: 0x00011450 File Offset: 0x0000F650 public static double? Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of values. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// /// is null. /// /// contains no elements. // Token: 0x060003B4 RID: 948 RVA: 0x0001148C File Offset: 0x0000F68C public static float Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of nullable values. /// The average of the sequence of values, or null if the source sequence is empty or contains only null values. /// A sequence of nullable values to calculate the average of. /// /// is null. // Token: 0x060003B5 RID: 949 RVA: 0x000114C8 File Offset: 0x0000F6C8 public static float? Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of values. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// /// is null. /// /// contains no elements. // Token: 0x060003B6 RID: 950 RVA: 0x00011504 File Offset: 0x0000F704 public static double Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of nullable values. /// The average of the sequence of values, or null if the source sequence is empty or contains only null values. /// A sequence of nullable values to calculate the average of. /// /// is null. // Token: 0x060003B7 RID: 951 RVA: 0x00011540 File Offset: 0x0000F740 public static double? Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of values. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// /// is null. /// /// contains no elements. // Token: 0x060003B8 RID: 952 RVA: 0x0001157C File Offset: 0x0000F77C public static decimal Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of nullable values. /// The average of the sequence of values, or null if the source sequence is empty or contains only null values. /// A sequence of nullable values to calculate the average of. /// /// is null. // Token: 0x060003B9 RID: 953 RVA: 0x000115B8 File Offset: 0x0000F7B8 public static decimal? Average(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003BA RID: 954 RVA: 0x000115F4 File Offset: 0x0000F7F4 public static double Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values, or null if the sequence is empty or contains only null values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x060003BB RID: 955 RVA: 0x00011650 File Offset: 0x0000F850 public static double? Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003BC RID: 956 RVA: 0x000116AC File Offset: 0x0000F8AC public static double Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values, or null if the sequence is empty or contains only null values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x060003BD RID: 957 RVA: 0x00011708 File Offset: 0x0000F908 public static double? Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003BE RID: 958 RVA: 0x00011764 File Offset: 0x0000F964 public static float Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values, or null if the sequence is empty or contains only null values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x060003BF RID: 959 RVA: 0x000117C0 File Offset: 0x0000F9C0 public static float? Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003C0 RID: 960 RVA: 0x0001181C File Offset: 0x0000FA1C public static double Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values, or null if the sequence is empty or contains only null values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x060003C1 RID: 961 RVA: 0x00011878 File Offset: 0x0000FA78 public static double? Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values. /// A sequence of values that are used to calculate an average. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// /// contains no elements. // Token: 0x060003C2 RID: 962 RVA: 0x000118D4 File Offset: 0x0000FAD4 public static decimal Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The average of the sequence of values, or null if the sequence is empty or contains only null values. /// A sequence of values to calculate the average of. /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x060003C3 RID: 963 RVA: 0x00011930 File Offset: 0x0000FB30 public static decimal? Average(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Converts the elements of an to the specified type. /// An that contains each element of the source sequence converted to the specified type. /// The that contains the elements to be converted. /// The type to convert the elements of to. /// /// is null. /// An element in the sequence cannot be cast to type . // Token: 0x060003C4 RID: 964 RVA: 0x0001198C File Offset: 0x0000FB8C public static IQueryable Cast(this IQueryable source) { Check.Source(source); return (IQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TResult) }), new Expression[] { source.Expression })); } /// Concatenates two sequences. /// An that contains the concatenated elements of the two input sequences. /// The first sequence to concatenate. /// The sequence to concatenate to the first sequence. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003C5 RID: 965 RVA: 0x000119E0 File Offset: 0x0000FBE0 public static IQueryable Concat(this IQueryable source1, IEnumerable source2) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2) })); } /// Determines whether a sequence contains a specified element by using the default equality comparer. /// true if the input sequence contains an element that has the specified value; otherwise, false. /// An in which to locate . /// The object to locate in the sequence. /// The type of the elements of . /// /// is null. // Token: 0x060003C6 RID: 966 RVA: 0x00011A3C File Offset: 0x0000FC3C public static bool Contains(this IQueryable source, TSource item) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(item) })); } /// Determines whether a sequence contains a specified element by using a specified . /// true if the input sequence contains an element that has the specified value; otherwise, false. /// An in which to locate . /// The object to locate in the sequence. /// An to compare values. /// The type of the elements of . /// /// is null. // Token: 0x060003C7 RID: 967 RVA: 0x00011A9C File Offset: 0x0000FC9C public static bool Contains(this IQueryable source, TSource item, IEqualityComparer comparer) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(item), Expression.Constant(comparer) })); } /// Returns the number of elements in a sequence. /// The number of elements in the input sequence. /// The that contains the elements to be counted. /// The type of the elements of . /// /// is null. /// The number of elements in is larger than . // Token: 0x060003C8 RID: 968 RVA: 0x00011B04 File Offset: 0x0000FD04 public static int Count(this IQueryable source) { Check.Source(source); return source.Execute(MethodBase.GetCurrentMethod()); } /// Returns the number of elements in the specified sequence that satisfies a condition. /// The number of elements in the sequence that satisfies the condition in the predicate function. /// An that contains the elements to be counted. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. /// The number of elements in is larger than . // Token: 0x060003C9 RID: 969 RVA: 0x00011B18 File Offset: 0x0000FD18 public static int Count(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. /// An that contains default() if is empty; otherwise, . /// The to return a default value for if empty. /// The type of the elements of . /// /// is null. // Token: 0x060003CA RID: 970 RVA: 0x00011B74 File Offset: 0x0000FD74 public static IQueryable DefaultIfEmpty(this IQueryable source) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. /// An that contains if is empty; otherwise, . /// The to return the specified value for if empty. /// The value to return if the sequence is empty. /// The type of the elements of . /// /// is null. // Token: 0x060003CB RID: 971 RVA: 0x00011BC4 File Offset: 0x0000FDC4 public static IQueryable DefaultIfEmpty(this IQueryable source, TSource defaultValue) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(defaultValue) })); } /// Returns distinct elements from a sequence by using the default equality comparer to compare values. /// An that contains distinct elements from . /// The to remove duplicates from. /// The type of the elements of . /// /// is null. // Token: 0x060003CC RID: 972 RVA: 0x00011C24 File Offset: 0x0000FE24 public static IQueryable Distinct(this IQueryable source) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns distinct elements from a sequence by using a specified to compare values. /// An that contains distinct elements from . /// The to remove duplicates from. /// An to compare values. /// The type of the elements of . /// /// or is null. // Token: 0x060003CD RID: 973 RVA: 0x00011C74 File Offset: 0x0000FE74 public static IQueryable Distinct(this IQueryable source, IEqualityComparer comparer) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(comparer) })); } /// Returns the element at a specified index in a sequence. /// The element at the specified position in . /// An to return an element from. /// The zero-based index of the element to retrieve. /// The type of the elements of . /// /// is null. /// /// is less than zero. // Token: 0x060003CE RID: 974 RVA: 0x00011CCC File Offset: 0x0000FECC public static TSource ElementAt(this IQueryable source, int index) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(index) })); } /// Returns the element at a specified index in a sequence or a default value if the index is out of range. /// default() if is outside the bounds of ; otherwise, the element at the specified position in . /// An to return an element from. /// The zero-based index of the element to retrieve. /// The type of the elements of . /// /// is null. // Token: 0x060003CF RID: 975 RVA: 0x00011D2C File Offset: 0x0000FF2C public static TSource ElementAtOrDefault(this IQueryable source, int index) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(index) })); } /// Produces the set difference of two sequences by using the default equality comparer to compare values. /// An that contains the set difference of the two sequences. /// An whose elements that are not also in will be returned. /// An whose elements that also occur in the first sequence will not appear in the returned sequence. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003D0 RID: 976 RVA: 0x00011D8C File Offset: 0x0000FF8C public static IQueryable Except(this IQueryable source1, IEnumerable source2) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2) })); } /// Produces the set difference of two sequences by using the specified to compare values. /// An that contains the set difference of the two sequences. /// An whose elements that are not also in will be returned. /// An whose elements that also occur in the first sequence will not appear in the returned sequence. /// An to compare values. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003D1 RID: 977 RVA: 0x00011DE8 File Offset: 0x0000FFE8 public static IQueryable Except(this IQueryable source1, IEnumerable source2, IEqualityComparer comparer) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2), Expression.Constant(comparer) })); } /// Returns the first element of a sequence. /// The first element in . /// The to return the first element of. /// The type of the elements of . /// /// is null. /// The source sequence is empty. // Token: 0x060003D2 RID: 978 RVA: 0x00011E4C File Offset: 0x0001004C public static TSource First(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the first element of a sequence that satisfies a specified condition. /// The first element in that passes the test in . /// An to return an element from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. /// No element satisfies the condition in .-or-The source sequence is empty. // Token: 0x060003D3 RID: 979 RVA: 0x00011E9C File Offset: 0x0001009C public static TSource First(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns the first element of a sequence, or a default value if the sequence contains no elements. /// default() if is empty; otherwise, the first element in . /// The to return the first element of. /// The type of the elements of . /// /// is null. // Token: 0x060003D4 RID: 980 RVA: 0x00011EF8 File Offset: 0x000100F8 public static TSource FirstOrDefault(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found. /// default() if is empty or if no element passes the test specified by ; otherwise, the first element in that passes the test specified by . /// An to return an element from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x060003D5 RID: 981 RVA: 0x00011F48 File Offset: 0x00010148 public static TSource FirstOrDefault(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Groups the elements of a sequence according to a specified key selector function. /// An IQueryable<IGrouping<TKey, TSource>> in C# or IQueryable(Of IGrouping(Of TKey, TSource)) in Visual Basic where each object contains a sequence of objects and a key. /// An whose elements to group. /// A function to extract the key for each element. /// The type of the elements of . /// The type of the key returned by the function represented in . /// /// or is null. // Token: 0x060003D6 RID: 982 RVA: 0x00011FA4 File Offset: 0x000101A4 public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector) { Check.SourceAndKeySelector(source, keySelector); return source.Provider.CreateQuery>(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector) })); } /// Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer. /// An IQueryable<IGrouping<TKey, TSource>> in C# or IQueryable(Of IGrouping(Of TKey, TSource)) in Visual Basic where each contains a sequence of objects and a key. /// An whose elements to group. /// A function to extract the key for each element. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function represented in . /// /// or or is null. // Token: 0x060003D7 RID: 983 RVA: 0x0001200C File Offset: 0x0001020C public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector, IEqualityComparer comparer) { Check.SourceAndKeySelector(source, keySelector); return source.Provider.CreateQuery>(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer) })); } /// Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function. /// An IQueryable<IGrouping<TKey, TElement>> in C# or IQueryable(Of IGrouping(Of TKey, TElement)) in Visual Basic where each contains a sequence of objects of type and a key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to map each source element to an element in an . /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the elements in each . /// /// or or is null. // Token: 0x060003D8 RID: 984 RVA: 0x0001207C File Offset: 0x0001027C public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector) { Check.SourceAndKeyElementSelectors(source, keySelector, elementSelector); return source.Provider.CreateQuery>(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TElement) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector) })); } /// Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. /// An T:System.Linq.IQueryable`1 that has a type argument of and where each element represents a projection over a group and its key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to create a result value from each group. /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the result value returned by . /// /// or or is null. // Token: 0x060003D9 RID: 985 RVA: 0x000120FC File Offset: 0x000102FC public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression, TResult>> resultSelector) { Check.SourceAndKeyResultSelectors(source, keySelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector) })); } /// Groups the elements of a sequence and projects the elements for each group by using a specified function. Key values are compared by using a specified comparer. /// An IQueryable<IGrouping<TKey, TElement>> in C# or IQueryable(Of IGrouping(Of TKey, TElement)) in Visual Basic where each contains a sequence of objects of type and a key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to map each source element to an element in an . /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the elements in each . /// /// or or or is null. // Token: 0x060003DA RID: 986 RVA: 0x0001217C File Offset: 0x0001037C public static IQueryable> GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer) { Check.SourceAndKeyElementSelectors(source, keySelector, elementSelector); return source.Provider.CreateQuery>(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TElement) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Constant(comparer) })); } /// Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function. /// An T:System.Linq.IQueryable`1 that has a type argument of and where each element represents a projection over a group and its key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to map each source element to an element in an . /// A function to create a result value from each group. /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the elements in each . /// The type of the result value returned by . /// /// or or or is null. // Token: 0x060003DB RID: 987 RVA: 0x00012204 File Offset: 0x00010404 public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector) { Check.GroupBySelectors(source, keySelector, elementSelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector) })); } /// Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer. /// An T:System.Linq.IQueryable`1 that has a type argument of and where each element represents a projection over a group and its key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to create a result value from each group. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the result value returned by . /// /// or or or is null. // Token: 0x060003DC RID: 988 RVA: 0x00012298 File Offset: 0x00010498 public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { Check.SourceAndKeyResultSelectors(source, keySelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector), Expression.Constant(comparer) })); } /// Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Keys are compared by using a specified comparer and the elements of each group are projected by using a specified function. /// An T:System.Linq.IQueryable`1 that has a type argument of and where each element represents a projection over a group and its key. /// An whose elements to group. /// A function to extract the key for each element. /// A function to map each source element to an element in an . /// A function to create a result value from each group. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function represented in . /// The type of the elements in each . /// The type of the result value returned by . /// /// or or or or is null. // Token: 0x060003DD RID: 989 RVA: 0x00012320 File Offset: 0x00010520 public static IQueryable GroupBy(this IQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { Check.GroupBySelectors(source, keySelector, elementSelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector), Expression.Constant(comparer) })); } /// Correlates the elements of two sequences based on key equality and groups the results. The default equality comparer is used to compare keys. /// An that contains elements of type obtained by performing a grouped join on two sequences. /// The first sequence to join. /// The sequence to join to the first sequence. /// A function to extract the join key from each element of the first sequence. /// A function to extract the join key from each element of the second sequence. /// A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. /// The type of the elements of the first sequence. /// The type of the elements of the second sequence. /// The type of the keys returned by the key selector functions. /// The type of the result elements. /// /// or or or or is null. // Token: 0x060003DE RID: 990 RVA: 0x000123C0 File Offset: 0x000105C0 public static IQueryable GroupJoin(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector) { if (outer == null) { throw new ArgumentNullException("outer"); } if (inner == null) { throw new ArgumentNullException("inner"); } if (outerKeySelector == null) { throw new ArgumentNullException("outerKeySelector"); } if (innerKeySelector == null) { throw new ArgumentNullException("innerKeySelector"); } if (resultSelector == null) { throw new ArgumentNullException("resultSelector"); } return outer.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult) }), new Expression[] { outer.Expression, Expression.Constant(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector) })); } /// Correlates the elements of two sequences based on key equality and groups the results. A specified is used to compare keys. /// An that contains elements of type obtained by performing a grouped join on two sequences. /// The first sequence to join. /// The sequence to join to the first sequence. /// A function to extract the join key from each element of the first sequence. /// A function to extract the join key from each element of the second sequence. /// A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. /// A comparer to hash and compare keys. /// The type of the elements of the first sequence. /// The type of the elements of the second sequence. /// The type of the keys returned by the key selector functions. /// The type of the result elements. /// /// or or or or is null. // Token: 0x060003DF RID: 991 RVA: 0x000124AC File Offset: 0x000106AC public static IQueryable GroupJoin(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { if (outer == null) { throw new ArgumentNullException("outer"); } if (inner == null) { throw new ArgumentNullException("inner"); } if (outerKeySelector == null) { throw new ArgumentNullException("outerKeySelector"); } if (innerKeySelector == null) { throw new ArgumentNullException("innerKeySelector"); } if (resultSelector == null) { throw new ArgumentNullException("resultSelector"); } return outer.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult) }), new Expression[] { outer.Expression, Expression.Constant(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer) })); } /// Produces the set intersection of two sequences by using the default equality comparer to compare values. /// A sequence that contains the set intersection of the two sequences. /// A sequence whose distinct elements that also appear in are returned. /// A sequence whose distinct elements that also appear in the first sequence are returned. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003E0 RID: 992 RVA: 0x000125A4 File Offset: 0x000107A4 public static IQueryable Intersect(this IQueryable source1, IEnumerable source2) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2) })); } /// Produces the set intersection of two sequences by using the specified to compare values. /// An that contains the set intersection of the two sequences. /// An whose distinct elements that also appear in are returned. /// An whose distinct elements that also appear in the first sequence are returned. /// An to compare values. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003E1 RID: 993 RVA: 0x00012600 File Offset: 0x00010800 public static IQueryable Intersect(this IQueryable source1, IEnumerable source2, IEqualityComparer comparer) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2), Expression.Constant(comparer) })); } /// Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. /// An that has elements of type obtained by performing an inner join on two sequences. /// The first sequence to join. /// The sequence to join to the first sequence. /// A function to extract the join key from each element of the first sequence. /// A function to extract the join key from each element of the second sequence. /// A function to create a result element from two matching elements. /// The type of the elements of the first sequence. /// The type of the elements of the second sequence. /// The type of the keys returned by the key selector functions. /// The type of the result elements. /// /// or or or or is null. // Token: 0x060003E2 RID: 994 RVA: 0x00012664 File Offset: 0x00010864 public static IQueryable Join(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector) { Check.JoinSelectors(outer, inner, outerKeySelector, innerKeySelector, resultSelector); return outer.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult) }), new Expression[] { outer.Expression, Expression.Constant(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector) })); } /// Correlates the elements of two sequences based on matching keys. A specified is used to compare keys. /// An that has elements of type obtained by performing an inner join on two sequences. /// The first sequence to join. /// The sequence to join to the first sequence. /// A function to extract the join key from each element of the first sequence. /// A function to extract the join key from each element of the second sequence. /// A function to create a result element from two matching elements. /// An to hash and compare keys. /// The type of the elements of the first sequence. /// The type of the elements of the second sequence. /// The type of the keys returned by the key selector functions. /// The type of the result elements. /// /// or or or or is null. // Token: 0x060003E3 RID: 995 RVA: 0x00012704 File Offset: 0x00010904 public static IQueryable Join(this IQueryable outer, IEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector, IEqualityComparer comparer) { Check.JoinSelectors(outer, inner, outerKeySelector, innerKeySelector, resultSelector); return outer.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult) }), new Expression[] { outer.Expression, Expression.Constant(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer) })); } /// Returns the last element in a sequence. /// The value at the last position in . /// An to return the last element of. /// The type of the elements of . /// /// is null. /// The source sequence is empty. // Token: 0x060003E4 RID: 996 RVA: 0x000127B0 File Offset: 0x000109B0 public static TSource Last(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the last element of a sequence that satisfies a specified condition. /// The last element in that passes the test specified by . /// An to return an element from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. /// No element satisfies the condition in .-or-The source sequence is empty. // Token: 0x060003E5 RID: 997 RVA: 0x00012800 File Offset: 0x00010A00 public static TSource Last(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns the last element in a sequence, or a default value if the sequence contains no elements. /// default() if is empty; otherwise, the last element in . /// An to return the last element of. /// The type of the elements of . /// /// is null. // Token: 0x060003E6 RID: 998 RVA: 0x0001285C File Offset: 0x00010A5C public static TSource LastOrDefault(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. /// default() if is empty or if no elements pass the test in the predicate function; otherwise, the last element of that passes the test in the predicate function. /// An to return an element from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x060003E7 RID: 999 RVA: 0x000128AC File Offset: 0x00010AAC public static TSource LastOrDefault(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns an that represents the total number of elements in a sequence. /// The number of elements in . /// An that contains the elements to be counted. /// The type of the elements of . /// /// is null. /// The number of elements exceeds . // Token: 0x060003E8 RID: 1000 RVA: 0x00012908 File Offset: 0x00010B08 public static long LongCount(this IQueryable source) { Check.Source(source); return source.Execute(MethodBase.GetCurrentMethod()); } /// Returns an that represents the number of elements in a sequence that satisfy a condition. /// The number of elements in that satisfy the condition in the predicate function. /// An that contains the elements to be counted. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. /// The number of matching elements exceeds . // Token: 0x060003E9 RID: 1001 RVA: 0x0001291C File Offset: 0x00010B1C public static long LongCount(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns the maximum value in a generic . /// The maximum value in the sequence. /// A sequence of values to determine the maximum of. /// The type of the elements of . /// /// is null. // Token: 0x060003EA RID: 1002 RVA: 0x00012978 File Offset: 0x00010B78 public static TSource Max(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Invokes a projection function on each element of a generic and returns the maximum resulting value. /// The maximum value in the sequence. /// A sequence of values to determine the maximum of. /// A projection function to apply to each element. /// The type of the elements of . /// The type of the value returned by the function represented by . /// /// or is null. // Token: 0x060003EB RID: 1003 RVA: 0x000129C8 File Offset: 0x00010BC8 public static TResult Max(this IQueryable source, Expression> selector) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Returns the minimum value of a generic . /// The minimum value in the sequence. /// A sequence of values to determine the minimum of. /// The type of the elements of . /// /// is null. // Token: 0x060003EC RID: 1004 RVA: 0x00012A30 File Offset: 0x00010C30 public static TSource Min(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Invokes a projection function on each element of a generic and returns the minimum resulting value. /// The minimum value in the sequence. /// A sequence of values to determine the minimum of. /// A projection function to apply to each element. /// The type of the elements of . /// The type of the value returned by the function represented by . /// /// or is null. // Token: 0x060003ED RID: 1005 RVA: 0x00012A80 File Offset: 0x00010C80 public static TResult Min(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Filters the elements of an based on a specified type. /// A collection that contains the elements from that have type . /// An whose elements to filter. /// The type to filter the elements of the sequence on. /// /// is null. // Token: 0x060003EE RID: 1006 RVA: 0x00012AE8 File Offset: 0x00010CE8 public static IQueryable OfType(this IQueryable source) { Check.Source(source); return (IQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TResult) }), new Expression[] { source.Expression })); } /// Sorts the elements of a sequence in ascending order according to a key. /// An whose elements are sorted according to a key. /// A sequence of values to order. /// A function to extract a key from an element. /// The type of the elements of . /// The type of the key returned by the function that is represented by . /// /// or is null. // Token: 0x060003EF RID: 1007 RVA: 0x00012B3C File Offset: 0x00010D3C public static IOrderedQueryable OrderBy(this IQueryable source, Expression> keySelector) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector) })); } /// Sorts the elements of a sequence in ascending order by using a specified comparer. /// An whose elements are sorted according to a key. /// A sequence of values to order. /// A function to extract a key from an element. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function that is represented by . /// /// or or is null. // Token: 0x060003F0 RID: 1008 RVA: 0x00012BA8 File Offset: 0x00010DA8 public static IOrderedQueryable OrderBy(this IQueryable source, Expression> keySelector, IComparer comparer) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer) })); } /// Sorts the elements of a sequence in descending order according to a key. /// An whose elements are sorted in descending order according to a key. /// A sequence of values to order. /// A function to extract a key from an element. /// The type of the elements of . /// The type of the key returned by the function that is represented by . /// /// or is null. // Token: 0x060003F1 RID: 1009 RVA: 0x00012C1C File Offset: 0x00010E1C public static IOrderedQueryable OrderByDescending(this IQueryable source, Expression> keySelector) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector) })); } /// Sorts the elements of a sequence in descending order by using a specified comparer. /// An whose elements are sorted in descending order according to a key. /// A sequence of values to order. /// A function to extract a key from an element. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function that is represented by . /// /// or or is null. // Token: 0x060003F2 RID: 1010 RVA: 0x00012C88 File Offset: 0x00010E88 public static IOrderedQueryable OrderByDescending(this IQueryable source, Expression> keySelector, IComparer comparer) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer) })); } /// Inverts the order of the elements in a sequence. /// An whose elements correspond to those of the input sequence in reverse order. /// A sequence of values to reverse. /// The type of the elements of . /// /// is null. // Token: 0x060003F3 RID: 1011 RVA: 0x00012CFC File Offset: 0x00010EFC public static IQueryable Reverse(this IQueryable source) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Projects each element of a sequence into a new form. /// An whose elements are the result of invoking a projection function on each element of . /// A sequence of values to project. /// A projection function to apply to each element. /// The type of the elements of . /// The type of the value returned by the function represented by . /// /// or is null. // Token: 0x060003F4 RID: 1012 RVA: 0x00012D4C File Offset: 0x00010F4C public static IQueryable Select(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Projects each element of a sequence into a new form by incorporating the element's index. /// An whose elements are the result of invoking a projection function on each element of . /// A sequence of values to project. /// A projection function to apply to each element. /// The type of the elements of . /// The type of the value returned by the function represented by . /// /// or is null. // Token: 0x060003F5 RID: 1013 RVA: 0x00012DB4 File Offset: 0x00010FB4 public static IQueryable Select(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Projects each element of a sequence to an and combines the resulting sequences into one sequence. /// An whose elements are the result of invoking a one-to-many projection function on each element of the input sequence. /// A sequence of values to project. /// A projection function to apply to each element. /// The type of the elements of . /// The type of the elements of the sequence returned by the function represented by . /// /// or is null. // Token: 0x060003F6 RID: 1014 RVA: 0x00012E1C File Offset: 0x0001101C public static IQueryable SelectMany(this IQueryable source, Expression>> selector) { Check.SourceAndSelector(source, selector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Projects each element of a sequence to an and combines the resulting sequences into one sequence. The index of each source element is used in the projected form of that element. /// An whose elements are the result of invoking a one-to-many projection function on each element of the input sequence. /// A sequence of values to project. /// A projection function to apply to each element; the second parameter of this function represents the index of the source element. /// The type of the elements of . /// The type of the elements of the sequence returned by the function represented by . /// /// or is null. // Token: 0x060003F7 RID: 1015 RVA: 0x00012E84 File Offset: 0x00011084 public static IQueryable SelectMany(this IQueryable source, Expression>> selector) { Check.SourceAndSelector(source, selector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Projects each element of a sequence to an that incorporates the index of the source element that produced it. A result selector function is invoked on each element of each intermediate sequence, and the resulting values are combined into a single, one-dimensional sequence and returned. /// An whose elements are the result of invoking the one-to-many projection function on each element of and then mapping each of those sequence elements and their corresponding element to a result element. /// A sequence of values to project. /// A projection function to apply to each element of the input sequence; the second parameter of this function represents the index of the source element. /// A projection function to apply to each element of each intermediate sequence. /// The type of the elements of . /// The type of the intermediate elements collected by the function represented by . /// The type of the elements of the resulting sequence. /// /// or or is null. // Token: 0x060003F8 RID: 1016 RVA: 0x00012EEC File Offset: 0x000110EC public static IQueryable SelectMany(this IQueryable source, Expression>> collectionSelector, Expression> resultSelector) { Check.SourceAndCollectionSelectorAndResultSelector(source, collectionSelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TCollection), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector) })); } /// Projects each element of a sequence to an and invokes a result selector function on each element therein. The resulting values from each intermediate sequence are combined into a single, one-dimensional sequence and returned. /// An whose elements are the result of invoking the one-to-many projection function on each element of and then mapping each of those sequence elements and their corresponding element to a result element. /// A sequence of values to project. /// A projection function to apply to each element of the input sequence. /// A projection function to apply to each element of each intermediate sequence. /// The type of the elements of . /// The type of the intermediate elements collected by the function represented by . /// The type of the elements of the resulting sequence. /// /// or or is null. // Token: 0x060003F9 RID: 1017 RVA: 0x00012F6C File Offset: 0x0001116C public static IQueryable SelectMany(this IQueryable source, Expression>> collectionSelector, Expression> resultSelector) { Check.SourceAndCollectionSelectorAndResultSelector(source, collectionSelector, resultSelector); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TCollection), typeof(TResult) }), new Expression[] { source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector) })); } /// Determines whether two sequences are equal by using the default equality comparer to compare elements. /// true if the two source sequences are of equal length and their corresponding elements compare equal; otherwise, false. /// An whose elements to compare to those of . /// An whose elements to compare to those of the first sequence. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003FA RID: 1018 RVA: 0x00012FEC File Offset: 0x000111EC public static bool SequenceEqual(this IQueryable source1, IEnumerable source2) { Check.Source1AndSource2(source1, source2); return source1.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2) })); } /// Determines whether two sequences are equal by using a specified to compare elements. /// true if the two source sequences are of equal length and their corresponding elements compare equal; otherwise, false. /// An whose elements to compare to those of . /// An whose elements to compare to those of the first sequence. /// An to use to compare elements. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x060003FB RID: 1019 RVA: 0x00013048 File Offset: 0x00011248 public static bool SequenceEqual(this IQueryable source1, IEnumerable source2, IEqualityComparer comparer) { Check.Source1AndSource2(source1, source2); return source1.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2), Expression.Constant(comparer) })); } /// Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. /// The single element of the input sequence. /// An to return the single element of. /// The type of the elements of . /// /// is null. /// /// has more than one element. // Token: 0x060003FC RID: 1020 RVA: 0x000130AC File Offset: 0x000112AC public static TSource Single(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. /// The single element of the input sequence that satisfies the condition in . /// An to return a single element from. /// A function to test an element for a condition. /// The type of the elements of . /// /// or is null. /// No element satisfies the condition in .-or-More than one element satisfies the condition in .-or-The source sequence is empty. // Token: 0x060003FD RID: 1021 RVA: 0x000130FC File Offset: 0x000112FC public static TSource Single(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. /// The single element of the input sequence, or default() if the sequence contains no elements. /// An to return the single element of. /// The type of the elements of . /// /// is null. // Token: 0x060003FE RID: 1022 RVA: 0x00013158 File Offset: 0x00011358 public static TSource SingleOrDefault(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression })); } /// Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. /// The single element of the input sequence that satisfies the condition in , or default() if no such element is found. /// An to return a single element from. /// A function to test an element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x060003FF RID: 1023 RVA: 0x000131A8 File Offset: 0x000113A8 public static TSource SingleOrDefault(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Bypasses a specified number of elements in a sequence and then returns the remaining elements. /// An that contains elements that occur after the specified index in the input sequence. /// An to return elements from. /// The number of elements to skip before returning the remaining elements. /// The type of the elements of . /// /// is null. // Token: 0x06000400 RID: 1024 RVA: 0x00013204 File Offset: 0x00011404 public static IQueryable Skip(this IQueryable source, int count) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(count) })); } /// Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. /// An that contains elements from starting at the first element in the linear series that does not pass the test specified by . /// An to return elements from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x06000401 RID: 1025 RVA: 0x00013264 File Offset: 0x00011464 public static IQueryable SkipWhile(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function. /// An that contains elements from starting at the first element in the linear series that does not pass the test specified by . /// An to return elements from. /// A function to test each element for a condition; the second parameter of this function represents the index of the source element. /// The type of the elements of . /// /// or is null. // Token: 0x06000402 RID: 1026 RVA: 0x000132C0 File Offset: 0x000114C0 public static IQueryable SkipWhile(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x06000403 RID: 1027 RVA: 0x0001331C File Offset: 0x0001151C public static int Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x06000404 RID: 1028 RVA: 0x00013378 File Offset: 0x00011578 public static int? Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x06000405 RID: 1029 RVA: 0x000133D4 File Offset: 0x000115D4 public static long Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x06000406 RID: 1030 RVA: 0x00013430 File Offset: 0x00011630 public static long? Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x06000407 RID: 1031 RVA: 0x0001348C File Offset: 0x0001168C public static float Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x06000408 RID: 1032 RVA: 0x000134E8 File Offset: 0x000116E8 public static float? Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. // Token: 0x06000409 RID: 1033 RVA: 0x00013544 File Offset: 0x00011744 public static double Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x0600040A RID: 1034 RVA: 0x000135A0 File Offset: 0x000117A0 public static double? Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x0600040B RID: 1035 RVA: 0x000135FC File Offset: 0x000117FC public static decimal Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. /// The sum of the projected values. /// A sequence of values of type . /// A projection function to apply to each element. /// The type of the elements of . /// /// or is null. /// The sum is larger than . // Token: 0x0600040C RID: 1036 RVA: 0x00013658 File Offset: 0x00011858 public static decimal? Sum(this IQueryable source, Expression> selector) { Check.SourceAndSelector(source, selector); return source.Provider.Execute(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(selector) })); } /// Computes the sum of a sequence of values. /// The sum of the values in the sequence. /// A sequence of values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x0600040D RID: 1037 RVA: 0x000136B4 File Offset: 0x000118B4 public static int Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of nullable values. /// The sum of the values in the sequence. /// A sequence of nullable values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x0600040E RID: 1038 RVA: 0x000136F0 File Offset: 0x000118F0 public static int? Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of values. /// The sum of the values in the sequence. /// A sequence of values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x0600040F RID: 1039 RVA: 0x0001372C File Offset: 0x0001192C public static long Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of nullable values. /// The sum of the values in the sequence. /// A sequence of nullable values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x06000410 RID: 1040 RVA: 0x00013768 File Offset: 0x00011968 public static long? Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of values. /// The sum of the values in the sequence. /// A sequence of values to calculate the sum of. /// /// is null. // Token: 0x06000411 RID: 1041 RVA: 0x000137A4 File Offset: 0x000119A4 public static float Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of nullable values. /// The sum of the values in the sequence. /// A sequence of nullable values to calculate the sum of. /// /// is null. // Token: 0x06000412 RID: 1042 RVA: 0x000137E0 File Offset: 0x000119E0 public static float? Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of values. /// The sum of the values in the sequence. /// A sequence of values to calculate the sum of. /// /// is null. // Token: 0x06000413 RID: 1043 RVA: 0x0001381C File Offset: 0x00011A1C public static double Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of nullable values. /// The sum of the values in the sequence. /// A sequence of nullable values to calculate the sum of. /// /// is null. // Token: 0x06000414 RID: 1044 RVA: 0x00013858 File Offset: 0x00011A58 public static double? Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of values. /// The sum of the values in the sequence. /// A sequence of values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x06000415 RID: 1045 RVA: 0x00013894 File Offset: 0x00011A94 public static decimal Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Computes the sum of a sequence of nullable values. /// The sum of the values in the sequence. /// A sequence of nullable values to calculate the sum of. /// /// is null. /// The sum is larger than . // Token: 0x06000416 RID: 1046 RVA: 0x000138D0 File Offset: 0x00011AD0 public static decimal? Sum(this IQueryable source) { Check.Source(source); return source.Provider.Execute(Queryable.StaticCall((MethodInfo)MethodBase.GetCurrentMethod(), new Expression[] { source.Expression })); } /// Returns a specified number of contiguous elements from the start of a sequence. /// An that contains the specified number of elements from the start of . /// The sequence to return elements from. /// The number of elements to return. /// The type of the elements of . /// /// is null. // Token: 0x06000417 RID: 1047 RVA: 0x0001390C File Offset: 0x00011B0C public static IQueryable Take(this IQueryable source, int count) { Check.Source(source); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Constant(count) })); } /// Returns elements from a sequence as long as a specified condition is true. /// An that contains elements from the input sequence occurring before the element at which the test specified by no longer passes. /// The sequence to return elements from. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x06000418 RID: 1048 RVA: 0x0001396C File Offset: 0x00011B6C public static IQueryable TakeWhile(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function. /// An that contains elements from the input sequence occurring before the element at which the test specified by no longer passes. /// The sequence to return elements from. /// A function to test each element for a condition; the second parameter of the function represents the index of the element in the source sequence. /// The type of the elements of . /// /// or is null. // Token: 0x06000419 RID: 1049 RVA: 0x000139C8 File Offset: 0x00011BC8 public static IQueryable TakeWhile(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key. /// An whose elements are sorted according to a key. /// An that contains elements to sort. /// A function to extract a key from each element. /// The type of the elements of . /// The type of the key returned by the function represented by . /// /// or is null. // Token: 0x0600041A RID: 1050 RVA: 0x00013A24 File Offset: 0x00011C24 public static IOrderedQueryable ThenBy(this IOrderedQueryable source, Expression> keySelector) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector) })); } /// Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. /// An whose elements are sorted according to a key. /// An that contains elements to sort. /// A function to extract a key from each element. /// An to compare keys. /// The type of the elements of . /// The type of the key returned by the function represented by . /// /// or or is null. // Token: 0x0600041B RID: 1051 RVA: 0x00013A90 File Offset: 0x00011C90 public static IOrderedQueryable ThenBy(this IOrderedQueryable source, Expression> keySelector, IComparer comparer) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer) })); } /// Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. /// An whose elements are sorted in descending order according to a key. /// An that contains elements to sort. /// A function to extract a key from each element. /// The type of the elements of . /// The type of the key returned by the function represented by . /// /// or is null. // Token: 0x0600041C RID: 1052 RVA: 0x00013B04 File Offset: 0x00011D04 public static IOrderedQueryable ThenByDescending(this IOrderedQueryable source, Expression> keySelector) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector) })); } /// Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer. /// A collection whose elements are sorted in descending order according to a key. /// An that contains elements to sort. /// A function to extract a key from each element. /// An to compare keys. /// The type of the elements of . /// The type of the key that is returned by the function. /// /// or or is null. // Token: 0x0600041D RID: 1053 RVA: 0x00013B70 File Offset: 0x00011D70 public static IOrderedQueryable ThenByDescending(this IOrderedQueryable source, Expression> keySelector, IComparer comparer) { Check.SourceAndKeySelector(source, keySelector); return (IOrderedQueryable)source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource), typeof(TKey) }), new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer) })); } /// Produces the set union of two sequences by using the default equality comparer. /// An that contains the elements from both input sequences, excluding duplicates. /// A sequence whose distinct elements form the first set for the union operation. /// A sequence whose distinct elements form the second set for the union operation. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x0600041E RID: 1054 RVA: 0x00013BE4 File Offset: 0x00011DE4 public static IQueryable Union(this IQueryable source1, IEnumerable source2) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2) })); } /// Produces the set union of two sequences by using a specified . /// An that contains the elements from both input sequences, excluding duplicates. /// A sequence whose distinct elements form the first set for the union operation. /// A sequence whose distinct elements form the second set for the union operation. /// An to compare values. /// The type of the elements of the input sequences. /// /// or is null. // Token: 0x0600041F RID: 1055 RVA: 0x00013C40 File Offset: 0x00011E40 public static IQueryable Union(this IQueryable source1, IEnumerable source2, IEqualityComparer comparer) { Check.Source1AndSource2(source1, source2); return source1.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source1.Expression, Expression.Constant(source2), Expression.Constant(comparer) })); } /// Filters a sequence of values based on a predicate. /// An that contains elements from the input sequence that satisfy the condition specified by . /// An to filter. /// A function to test each element for a condition. /// The type of the elements of . /// /// or is null. // Token: 0x06000420 RID: 1056 RVA: 0x00013CA4 File Offset: 0x00011EA4 public static IQueryable Where(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } /// Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function. /// An that contains elements from the input sequence that satisfy the condition specified by . /// An to filter. /// A function to test each element for a condition; the second parameter of the function represents the index of the element in the source sequence. /// The type of the elements of . /// /// or is null. // Token: 0x06000421 RID: 1057 RVA: 0x00013D00 File Offset: 0x00011F00 public static IQueryable Where(this IQueryable source, Expression> predicate) { Check.SourceAndPredicate(source, predicate); return source.Provider.CreateQuery(Queryable.StaticCall(Queryable.MakeGeneric(MethodBase.GetCurrentMethod(), new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) })); } } }