// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.ComponentModel; using System.Linq.Expressions; using System.Reflection; namespace System.Linq { public static partial class QueryableEx { private static MethodInfo s_Buffer__TSource__2__0; private static MethodInfo Buffer__TSource__2__0(Type TSource) => (s_Buffer__TSource__2__0 ?? (s_Buffer__TSource__2__0 = new Func, int, IQueryable>>(Buffer).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable> Buffer(this IQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery>(Expression.Call(Buffer__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable> Buffer(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Buffer(source, count); #endif } #pragma warning restore 1591 private static MethodInfo s_Buffer__TSource__3__0; private static MethodInfo Buffer__TSource__3__0(Type TSource) => (s_Buffer__TSource__3__0 ?? (s_Buffer__TSource__3__0 = new Func, int, int, IQueryable>>(Buffer).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable> Buffer(this IQueryable source, int count, int skip) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery>(Expression.Call(Buffer__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)), Expression.Constant(skip, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable> Buffer(IEnumerable source, int count, int skip) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Buffer(source, count, skip); #endif } #pragma warning restore 1591 private static MethodInfo s_Catch__TSource__1__0; private static MethodInfo Catch__TSource__1__0(Type TSource) => (s_Catch__TSource__1__0 ?? (s_Catch__TSource__1__0 = new Func>, IQueryable>(Catch).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Catch(this IQueryable> sources) { if (sources == null) throw new ArgumentNullException(nameof(sources)); return sources.Provider.CreateQuery(Expression.Call(Catch__TSource__1__0(typeof(TSource)), sources.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Catch(IEnumerable> sources) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Catch(sources); #endif } #pragma warning restore 1591 private static MethodInfo s_Catch__TSource__2__0; private static MethodInfo Catch__TSource__2__0(Type TSource) => (s_Catch__TSource__2__0 ?? (s_Catch__TSource__2__0 = new Func, IEnumerable, IQueryable>(Catch).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Catch(this IQueryable first, IEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); return first.Provider.CreateQuery(Expression.Call(Catch__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Catch(IEnumerable first, IEnumerable second) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Catch(first, second); #endif } #pragma warning restore 1591 private static MethodInfo s_Catch__TSource_TException__2__0; private static MethodInfo Catch__TSource_TException__2__0(Type TSource, Type TException) => (s_Catch__TSource_TException__2__0 ?? (s_Catch__TSource_TException__2__0 = new Func, Expression>>, IQueryable>(Catch).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TException); public static IQueryable Catch(this IQueryable source, Expression>> handler) where TException : Exception { if (source == null) throw new ArgumentNullException(nameof(source)); if (handler == null) throw new ArgumentNullException(nameof(handler)); return source.Provider.CreateQuery(Expression.Call(Catch__TSource_TException__2__0(typeof(TSource), typeof(TException)), source.Expression, handler)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Catch(IEnumerable source, Func> handler) where TException : Exception { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Catch(source, handler); #endif } #pragma warning restore 1591 private static MethodInfo s_Concat__TSource__1__0; private static MethodInfo Concat__TSource__1__0(Type TSource) => (s_Concat__TSource__1__0 ?? (s_Concat__TSource__1__0 = new Func>, IQueryable>(Concat).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Concat(this IQueryable> sources) { if (sources == null) throw new ArgumentNullException(nameof(sources)); return sources.Provider.CreateQuery(Expression.Call(Concat__TSource__1__0(typeof(TSource)), sources.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Concat(IEnumerable> sources) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Concat(sources); #endif } #pragma warning restore 1591 private static MethodInfo s_Distinct__TSource_TKey__2__0; private static MethodInfo Distinct__TSource_TKey__2__0(Type TSource, Type TKey) => (s_Distinct__TSource_TKey__2__0 ?? (s_Distinct__TSource_TKey__2__0 = new Func, Expression>, IQueryable>(Distinct).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IQueryable Distinct(this IQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); return source.Provider.CreateQuery(Expression.Call(Distinct__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Distinct(IEnumerable source, Func keySelector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Distinct(source, keySelector); #endif } #pragma warning restore 1591 private static MethodInfo s_Distinct__TSource_TKey__3__0; private static MethodInfo Distinct__TSource_TKey__3__0(Type TSource, Type TKey) => (s_Distinct__TSource_TKey__3__0 ?? (s_Distinct__TSource_TKey__3__0 = new Func, Expression>, IEqualityComparer, IQueryable>(Distinct).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IQueryable Distinct(this IQueryable source, Expression> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.CreateQuery(Expression.Call(Distinct__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Distinct(IEnumerable source, Func keySelector, IEqualityComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Distinct(source, keySelector, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_DistinctUntilChanged__TSource__1__0; private static MethodInfo DistinctUntilChanged__TSource__1__0(Type TSource) => (s_DistinctUntilChanged__TSource__1__0 ?? (s_DistinctUntilChanged__TSource__1__0 = new Func, IQueryable>(DistinctUntilChanged).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable DistinctUntilChanged(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(DistinctUntilChanged__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable DistinctUntilChanged(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.DistinctUntilChanged(source); #endif } #pragma warning restore 1591 private static MethodInfo s_DistinctUntilChanged__TSource__2__0; private static MethodInfo DistinctUntilChanged__TSource__2__0(Type TSource) => (s_DistinctUntilChanged__TSource__2__0 ?? (s_DistinctUntilChanged__TSource__2__0 = new Func, IEqualityComparer, IQueryable>(DistinctUntilChanged).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable DistinctUntilChanged(this IQueryable source, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.CreateQuery(Expression.Call(DistinctUntilChanged__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable DistinctUntilChanged(IEnumerable source, IEqualityComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.DistinctUntilChanged(source, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_DistinctUntilChanged__TSource_TKey__2__0; private static MethodInfo DistinctUntilChanged__TSource_TKey__2__0(Type TSource, Type TKey) => (s_DistinctUntilChanged__TSource_TKey__2__0 ?? (s_DistinctUntilChanged__TSource_TKey__2__0 = new Func, Expression>, IQueryable>(DistinctUntilChanged).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IQueryable DistinctUntilChanged(this IQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); return source.Provider.CreateQuery(Expression.Call(DistinctUntilChanged__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable DistinctUntilChanged(IEnumerable source, Func keySelector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.DistinctUntilChanged(source, keySelector); #endif } #pragma warning restore 1591 private static MethodInfo s_DistinctUntilChanged__TSource_TKey__3__0; private static MethodInfo DistinctUntilChanged__TSource_TKey__3__0(Type TSource, Type TKey) => (s_DistinctUntilChanged__TSource_TKey__3__0 ?? (s_DistinctUntilChanged__TSource_TKey__3__0 = new Func, Expression>, IEqualityComparer, IQueryable>(DistinctUntilChanged).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IQueryable DistinctUntilChanged(this IQueryable source, Expression> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.CreateQuery(Expression.Call(DistinctUntilChanged__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable DistinctUntilChanged(IEnumerable source, Func keySelector, IEqualityComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.DistinctUntilChanged(source, keySelector, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_Do__TSource__2__0; private static MethodInfo Do__TSource__2__0(Type TSource) => (s_Do__TSource__2__0 ?? (s_Do__TSource__2__0 = new Func, Expression>, IQueryable>(Do).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Do(this IQueryable source, Expression> onNext) { if (source == null) throw new ArgumentNullException(nameof(source)); if (onNext == null) throw new ArgumentNullException(nameof(onNext)); return source.Provider.CreateQuery(Expression.Call(Do__TSource__2__0(typeof(TSource)), source.Expression, onNext)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Do(IEnumerable source, Action onNext) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Do(source, onNext); #endif } #pragma warning restore 1591 private static MethodInfo s_Do__TSource__2__1; private static MethodInfo Do__TSource__2__1(Type TSource) => (s_Do__TSource__2__1 ?? (s_Do__TSource__2__1 = new Func, IObserver, IQueryable>(Do).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Do(this IQueryable source, IObserver observer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (observer == null) throw new ArgumentNullException(nameof(observer)); return source.Provider.CreateQuery(Expression.Call(Do__TSource__2__1(typeof(TSource)), source.Expression, Expression.Constant(observer, typeof(IObserver)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Do(IEnumerable source, IObserver observer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Do(source, observer); #endif } #pragma warning restore 1591 private static MethodInfo s_Do__TSource__3__0; private static MethodInfo Do__TSource__3__0(Type TSource) => (s_Do__TSource__3__0 ?? (s_Do__TSource__3__0 = new Func, Expression>, Action, IQueryable>(Do).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Do(this IQueryable source, Expression> onNext, Action onCompleted) { if (source == null) throw new ArgumentNullException(nameof(source)); if (onNext == null) throw new ArgumentNullException(nameof(onNext)); if (onCompleted == null) throw new ArgumentNullException(nameof(onCompleted)); return source.Provider.CreateQuery(Expression.Call(Do__TSource__3__0(typeof(TSource)), source.Expression, onNext, Expression.Constant(onCompleted, typeof(Action)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Do(IEnumerable source, Action onNext, Action onCompleted) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Do(source, onNext, onCompleted); #endif } #pragma warning restore 1591 private static MethodInfo s_Do__TSource__3__1; private static MethodInfo Do__TSource__3__1(Type TSource) => (s_Do__TSource__3__1 ?? (s_Do__TSource__3__1 = new Func, Expression>, Expression>, IQueryable>(Do).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Do(this IQueryable source, Expression> onNext, Expression> onError) { if (source == null) throw new ArgumentNullException(nameof(source)); if (onNext == null) throw new ArgumentNullException(nameof(onNext)); if (onError == null) throw new ArgumentNullException(nameof(onError)); return source.Provider.CreateQuery(Expression.Call(Do__TSource__3__1(typeof(TSource)), source.Expression, onNext, onError)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Do(IEnumerable source, Action onNext, Action onError) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Do(source, onNext, onError); #endif } #pragma warning restore 1591 private static MethodInfo s_Do__TSource__4__0; private static MethodInfo Do__TSource__4__0(Type TSource) => (s_Do__TSource__4__0 ?? (s_Do__TSource__4__0 = new Func, Expression>, Expression>, Action, IQueryable>(Do).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Do(this IQueryable source, Expression> onNext, Expression> onError, Action onCompleted) { if (source == null) throw new ArgumentNullException(nameof(source)); if (onNext == null) throw new ArgumentNullException(nameof(onNext)); if (onError == null) throw new ArgumentNullException(nameof(onError)); if (onCompleted == null) throw new ArgumentNullException(nameof(onCompleted)); return source.Provider.CreateQuery(Expression.Call(Do__TSource__4__0(typeof(TSource)), source.Expression, onNext, onError, Expression.Constant(onCompleted, typeof(Action)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Do(IEnumerable source, Action onNext, Action onError, Action onCompleted) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Do(source, onNext, onError, onCompleted); #endif } #pragma warning restore 1591 private static MethodInfo s_DoWhile__TResult__2__0; private static MethodInfo DoWhile__TResult__2__0(Type TResult) => (s_DoWhile__TResult__2__0 ?? (s_DoWhile__TResult__2__0 = new Func, Expression>, IQueryable>(DoWhile).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TResult); public static IQueryable DoWhile(this IQueryable source, Expression> condition) { if (source == null) throw new ArgumentNullException(nameof(source)); if (condition == null) throw new ArgumentNullException(nameof(condition)); return source.Provider.CreateQuery(Expression.Call(DoWhile__TResult__2__0(typeof(TResult)), source.Expression, condition)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable DoWhile(IEnumerable source, Func condition) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.DoWhile(source, condition); #endif } #pragma warning restore 1591 private static MethodInfo s_Expand__TSource__2__0; private static MethodInfo Expand__TSource__2__0(Type TSource) => (s_Expand__TSource__2__0 ?? (s_Expand__TSource__2__0 = new Func, Expression>>, IQueryable>(Expand).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Expand(this IQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); return source.Provider.CreateQuery(Expression.Call(Expand__TSource__2__0(typeof(TSource)), source.Expression, selector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Expand(IEnumerable source, Func> selector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Expand(source, selector); #endif } #pragma warning restore 1591 private static MethodInfo s_Finally__TSource__2__0; private static MethodInfo Finally__TSource__2__0(Type TSource) => (s_Finally__TSource__2__0 ?? (s_Finally__TSource__2__0 = new Func, Action, IQueryable>(Finally).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Finally(this IQueryable source, Action finallyAction) { if (source == null) throw new ArgumentNullException(nameof(source)); if (finallyAction == null) throw new ArgumentNullException(nameof(finallyAction)); return source.Provider.CreateQuery(Expression.Call(Finally__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(finallyAction, typeof(Action)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Finally(IEnumerable source, Action finallyAction) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Finally(source, finallyAction); #endif } #pragma warning restore 1591 private static MethodInfo s_Hide__TSource__1__0; private static MethodInfo Hide__TSource__1__0(Type TSource) => (s_Hide__TSource__1__0 ?? (s_Hide__TSource__1__0 = new Func, IQueryable>(Hide).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Hide(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(Hide__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Hide(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Hide(source); #endif } #pragma warning restore 1591 private static MethodInfo s_IgnoreElements__TSource__1__0; private static MethodInfo IgnoreElements__TSource__1__0(Type TSource) => (s_IgnoreElements__TSource__1__0 ?? (s_IgnoreElements__TSource__1__0 = new Func, IQueryable>(IgnoreElements).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable IgnoreElements(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(IgnoreElements__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable IgnoreElements(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.IgnoreElements(source); #endif } #pragma warning restore 1591 private static MethodInfo s_IsEmpty__TSource__1__0; private static MethodInfo IsEmpty__TSource__1__0(Type TSource) => (s_IsEmpty__TSource__1__0 ?? (s_IsEmpty__TSource__1__0 = new Func, bool>(IsEmpty).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static bool IsEmpty(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.Execute(Expression.Call(IsEmpty__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static bool IsEmpty(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.IsEmpty(source); #endif } #pragma warning restore 1591 private static MethodInfo s_Max__TSource__2__0; private static MethodInfo Max__TSource__2__0(Type TSource) => (s_Max__TSource__2__0 ?? (s_Max__TSource__2__0 = new Func, IComparer, TSource>(Max).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static TSource Max(this IQueryable source, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.Execute(Expression.Call(Max__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static TSource Max(IEnumerable source, IComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Max(source, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_MaxBy__TSource_TKey__2__0; private static MethodInfo MaxBy__TSource_TKey__2__0(Type TSource, Type TKey) => (s_MaxBy__TSource_TKey__2__0 ?? (s_MaxBy__TSource_TKey__2__0 = new Func, Expression>, IList>(MaxBy).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IList MaxBy(this IQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); return source.Provider.Execute>(Expression.Call(MaxBy__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IList MaxBy(IEnumerable source, Func keySelector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.MaxBy(source, keySelector); #endif } #pragma warning restore 1591 private static MethodInfo s_MaxBy__TSource_TKey__3__0; private static MethodInfo MaxBy__TSource_TKey__3__0(Type TSource, Type TKey) => (s_MaxBy__TSource_TKey__3__0 ?? (s_MaxBy__TSource_TKey__3__0 = new Func, Expression>, IComparer, IList>(MaxBy).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IList MaxBy(this IQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.Execute>(Expression.Call(MaxBy__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IList MaxBy(IEnumerable source, Func keySelector, IComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.MaxBy(source, keySelector, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_Memoize__TSource_TResult__2__0; private static MethodInfo Memoize__TSource_TResult__2__0(Type TSource, Type TResult) => (s_Memoize__TSource_TResult__2__0 ?? (s_Memoize__TSource_TResult__2__0 = new Func, Expression, IEnumerable>>, IQueryable>(Memoize).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult); public static IQueryable Memoize(this IQueryable source, Expression, IEnumerable>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); return source.Provider.CreateQuery(Expression.Call(Memoize__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Memoize(IEnumerable source, Func, IEnumerable> selector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Memoize(source, selector); #endif } #pragma warning restore 1591 private static MethodInfo s_Memoize__TSource_TResult__3__0; private static MethodInfo Memoize__TSource_TResult__3__0(Type TSource, Type TResult) => (s_Memoize__TSource_TResult__3__0 ?? (s_Memoize__TSource_TResult__3__0 = new Func, int, Expression, IEnumerable>>, IQueryable>(Memoize).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult); public static IQueryable Memoize(this IQueryable source, int readerCount, Expression, IEnumerable>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); return source.Provider.CreateQuery(Expression.Call(Memoize__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, Expression.Constant(readerCount, typeof(int)), selector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Memoize(IEnumerable source, int readerCount, Func, IEnumerable> selector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Memoize(source, readerCount, selector); #endif } #pragma warning restore 1591 private static MethodInfo s_Min__TSource__2__0; private static MethodInfo Min__TSource__2__0(Type TSource) => (s_Min__TSource__2__0 ?? (s_Min__TSource__2__0 = new Func, IComparer, TSource>(Min).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static TSource Min(this IQueryable source, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.Execute(Expression.Call(Min__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static TSource Min(IEnumerable source, IComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Min(source, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_MinBy__TSource_TKey__2__0; private static MethodInfo MinBy__TSource_TKey__2__0(Type TSource, Type TKey) => (s_MinBy__TSource_TKey__2__0 ?? (s_MinBy__TSource_TKey__2__0 = new Func, Expression>, IList>(MinBy).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IList MinBy(this IQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); return source.Provider.Execute>(Expression.Call(MinBy__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IList MinBy(IEnumerable source, Func keySelector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.MinBy(source, keySelector); #endif } #pragma warning restore 1591 private static MethodInfo s_MinBy__TSource_TKey__3__0; private static MethodInfo MinBy__TSource_TKey__3__0(Type TSource, Type TKey) => (s_MinBy__TSource_TKey__3__0 ?? (s_MinBy__TSource_TKey__3__0 = new Func, Expression>, IComparer, IList>(MinBy).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey); public static IList MinBy(this IQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); return source.Provider.Execute>(Expression.Call(MinBy__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IList MinBy(IEnumerable source, Func keySelector, IComparer comparer) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.MinBy(source, keySelector, comparer); #endif } #pragma warning restore 1591 private static MethodInfo s_OnErrorResumeNext__TSource__1__0; private static MethodInfo OnErrorResumeNext__TSource__1__0(Type TSource) => (s_OnErrorResumeNext__TSource__1__0 ?? (s_OnErrorResumeNext__TSource__1__0 = new Func>, IQueryable>(OnErrorResumeNext).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable OnErrorResumeNext(this IQueryable> sources) { if (sources == null) throw new ArgumentNullException(nameof(sources)); return sources.Provider.CreateQuery(Expression.Call(OnErrorResumeNext__TSource__1__0(typeof(TSource)), sources.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable OnErrorResumeNext(IEnumerable> sources) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.OnErrorResumeNext(sources); #endif } #pragma warning restore 1591 private static MethodInfo s_OnErrorResumeNext__TSource__2__0; private static MethodInfo OnErrorResumeNext__TSource__2__0(Type TSource) => (s_OnErrorResumeNext__TSource__2__0 ?? (s_OnErrorResumeNext__TSource__2__0 = new Func, IEnumerable, IQueryable>(OnErrorResumeNext).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable OnErrorResumeNext(this IQueryable first, IEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); return first.Provider.CreateQuery(Expression.Call(OnErrorResumeNext__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable OnErrorResumeNext(IEnumerable first, IEnumerable second) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.OnErrorResumeNext(first, second); #endif } #pragma warning restore 1591 private static MethodInfo s_Publish__TSource_TResult__2__0; private static MethodInfo Publish__TSource_TResult__2__0(Type TSource, Type TResult) => (s_Publish__TSource_TResult__2__0 ?? (s_Publish__TSource_TResult__2__0 = new Func, Expression, IEnumerable>>, IQueryable>(Publish).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult); public static IQueryable Publish(this IQueryable source, Expression, IEnumerable>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); return source.Provider.CreateQuery(Expression.Call(Publish__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Publish(IEnumerable source, Func, IEnumerable> selector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Publish(source, selector); #endif } #pragma warning restore 1591 private static MethodInfo s_Repeat__TSource__1__0; private static MethodInfo Repeat__TSource__1__0(Type TSource) => (s_Repeat__TSource__1__0 ?? (s_Repeat__TSource__1__0 = new Func, IQueryable>(Repeat).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Repeat(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(Repeat__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Repeat(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Repeat(source); #endif } #pragma warning restore 1591 private static MethodInfo s_Repeat__TSource__2__0; private static MethodInfo Repeat__TSource__2__0(Type TSource) => (s_Repeat__TSource__2__0 ?? (s_Repeat__TSource__2__0 = new Func, int, IQueryable>(Repeat).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Repeat(this IQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(Repeat__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Repeat(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Repeat(source, count); #endif } #pragma warning restore 1591 private static MethodInfo s_Retry__TSource__1__0; private static MethodInfo Retry__TSource__1__0(Type TSource) => (s_Retry__TSource__1__0 ?? (s_Retry__TSource__1__0 = new Func, IQueryable>(Retry).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Retry(this IQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(Retry__TSource__1__0(typeof(TSource)), source.Expression)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Retry(IEnumerable source) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Retry(source); #endif } #pragma warning restore 1591 private static MethodInfo s_Retry__TSource__2__0; private static MethodInfo Retry__TSource__2__0(Type TSource) => (s_Retry__TSource__2__0 ?? (s_Retry__TSource__2__0 = new Func, int, IQueryable>(Retry).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Retry(this IQueryable source, int retryCount) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(Retry__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(retryCount, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Retry(IEnumerable source, int retryCount) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Retry(source, retryCount); #endif } #pragma warning restore 1591 private static MethodInfo s_Scan__TSource__2__0; private static MethodInfo Scan__TSource__2__0(Type TSource) => (s_Scan__TSource__2__0 ?? (s_Scan__TSource__2__0 = new Func, Expression>, IQueryable>(Scan).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable Scan(this IQueryable source, Expression> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); return source.Provider.CreateQuery(Expression.Call(Scan__TSource__2__0(typeof(TSource)), source.Expression, accumulator)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Scan(IEnumerable source, Func accumulator) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Scan(source, accumulator); #endif } #pragma warning restore 1591 private static MethodInfo s_Scan__TSource_TAccumulate__3__0; private static MethodInfo Scan__TSource_TAccumulate__3__0(Type TSource, Type TAccumulate) => (s_Scan__TSource_TAccumulate__3__0 ?? (s_Scan__TSource_TAccumulate__3__0 = new Func, TAccumulate, Expression>, IQueryable>(Scan).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate); public static IQueryable Scan(this IQueryable source, TAccumulate seed, Expression> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); return source.Provider.CreateQuery(Expression.Call(Scan__TSource_TAccumulate__3__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Scan(IEnumerable source, TAccumulate seed, Func accumulator) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Scan(source, seed, accumulator); #endif } #pragma warning restore 1591 private static MethodInfo s_SelectMany__TSource_TOther__2__0; private static MethodInfo SelectMany__TSource_TOther__2__0(Type TSource, Type TOther) => (s_SelectMany__TSource_TOther__2__0 ?? (s_SelectMany__TSource_TOther__2__0 = new Func, IEnumerable, IQueryable>(SelectMany).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TOther); public static IQueryable SelectMany(this IQueryable source, IEnumerable other) { if (source == null) throw new ArgumentNullException(nameof(source)); if (other == null) throw new ArgumentNullException(nameof(other)); return source.Provider.CreateQuery(Expression.Call(SelectMany__TSource_TOther__2__0(typeof(TSource), typeof(TOther)), source.Expression, GetSourceExpression(other))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable SelectMany(IEnumerable source, IEnumerable other) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.SelectMany(source, other); #endif } #pragma warning restore 1591 private static MethodInfo s_Share__TSource_TResult__2__0; private static MethodInfo Share__TSource_TResult__2__0(Type TSource, Type TResult) => (s_Share__TSource_TResult__2__0 ?? (s_Share__TSource_TResult__2__0 = new Func, Expression, IEnumerable>>, IQueryable>(Share).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult); public static IQueryable Share(this IQueryable source, Expression, IEnumerable>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); return source.Provider.CreateQuery(Expression.Call(Share__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector)); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable Share(IEnumerable source, Func, IEnumerable> selector) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.Share(source, selector); #endif } #pragma warning restore 1591 private static MethodInfo s_SkipLast__TSource__2__0; private static MethodInfo SkipLast__TSource__2__0(Type TSource) => (s_SkipLast__TSource__2__0 ?? (s_SkipLast__TSource__2__0 = new Func, int, IQueryable>(SkipLast).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable SkipLast(this IQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(SkipLast__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable SkipLast(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.SkipLast(source, count); #endif } #pragma warning restore 1591 private static MethodInfo s_StartWith__TSource__2__0; private static MethodInfo StartWith__TSource__2__0(Type TSource) => (s_StartWith__TSource__2__0 ?? (s_StartWith__TSource__2__0 = new Func, TSource[], IQueryable>(StartWith).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable StartWith(this IQueryable source, params TSource[] values) { if (source == null) throw new ArgumentNullException(nameof(source)); if (values == null) throw new ArgumentNullException(nameof(values)); return source.Provider.CreateQuery(Expression.Call(StartWith__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(values, typeof(TSource[])))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable StartWith(IEnumerable source, TSource[] values) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.StartWith(source, values); #endif } #pragma warning restore 1591 private static MethodInfo s_TakeLast__TSource__2__0; private static MethodInfo TakeLast__TSource__2__0(Type TSource) => (s_TakeLast__TSource__2__0 ?? (s_TakeLast__TSource__2__0 = new Func, int, IQueryable>(TakeLast).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource); public static IQueryable TakeLast(this IQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); return source.Provider.CreateQuery(Expression.Call(TakeLast__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); } #pragma warning disable 1591 [EditorBrowsable(EditorBrowsableState.Never)] public static IEnumerable TakeLast(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY return default; #else return EnumerableEx.TakeLast(source, count); #endif } #pragma warning restore 1591 } }