AsyncQueryableEx.Generated.cs 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Collections.Generic;
  5. using System.Linq.Expressions;
  6. using System.Reflection;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. namespace System.Linq
  10. {
  11. public static partial class AsyncQueryableEx
  12. {
  13. private static MethodInfo s_Amb__TSource__2__0;
  14. private static MethodInfo Amb__TSource__2__0(Type TSource) =>
  15. (s_Amb__TSource__2__0 ??
  16. (s_Amb__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Amb<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  17. public static IAsyncQueryable<TSource> Amb<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  18. {
  19. if (first == null)
  20. throw new ArgumentNullException(nameof(first));
  21. if (second == null)
  22. throw new ArgumentNullException(nameof(second));
  23. return first.Provider.CreateQuery<TSource>(Expression.Call(Amb__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  24. }
  25. private static MethodInfo s_Buffer__TSource__2__0;
  26. private static MethodInfo Buffer__TSource__2__0(Type TSource) =>
  27. (s_Buffer__TSource__2__0 ??
  28. (s_Buffer__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<IList<object>>>(Buffer<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  29. public static IAsyncQueryable<IList<TSource>> Buffer<TSource>(this IAsyncQueryable<TSource> source, int count)
  30. {
  31. if (source == null)
  32. throw new ArgumentNullException(nameof(source));
  33. return source.Provider.CreateQuery<IList<TSource>>(Expression.Call(Buffer__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  34. }
  35. private static MethodInfo s_Buffer__TSource__3__0;
  36. private static MethodInfo Buffer__TSource__3__0(Type TSource) =>
  37. (s_Buffer__TSource__3__0 ??
  38. (s_Buffer__TSource__3__0 = new Func<IAsyncQueryable<object>, int, int, IAsyncQueryable<IList<object>>>(Buffer<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  39. public static IAsyncQueryable<IList<TSource>> Buffer<TSource>(this IAsyncQueryable<TSource> source, int count, int skip)
  40. {
  41. if (source == null)
  42. throw new ArgumentNullException(nameof(source));
  43. return source.Provider.CreateQuery<IList<TSource>>(Expression.Call(Buffer__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)), Expression.Constant(skip, typeof(int))));
  44. }
  45. private static MethodInfo s_Catch__TSource__2__0;
  46. private static MethodInfo Catch__TSource__2__0(Type TSource) =>
  47. (s_Catch__TSource__2__0 ??
  48. (s_Catch__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Catch<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  49. public static IAsyncQueryable<TSource> Catch<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  50. {
  51. if (first == null)
  52. throw new ArgumentNullException(nameof(first));
  53. if (second == null)
  54. throw new ArgumentNullException(nameof(second));
  55. return first.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  56. }
  57. private static MethodInfo s_Catch__TSource_TException__2__0;
  58. private static MethodInfo Catch__TSource_TException__2__0(Type TSource, Type TException) =>
  59. (s_Catch__TSource_TException__2__0 ??
  60. (s_Catch__TSource_TException__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Catch<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TException);
  61. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, CancellationToken, ValueTask<IAsyncEnumerable<TSource>>>> handler)
  62. {
  63. if (source == null)
  64. throw new ArgumentNullException(nameof(source));
  65. if (handler == null)
  66. throw new ArgumentNullException(nameof(handler));
  67. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__0(typeof(TSource), typeof(TException)), source.Expression, handler));
  68. }
  69. private static MethodInfo s_Catch__TSource_TException__2__1;
  70. private static MethodInfo Catch__TSource_TException__2__1(Type TSource, Type TException) =>
  71. (s_Catch__TSource_TException__2__1 ??
  72. (s_Catch__TSource_TException__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, IAsyncEnumerable<object>>>, IAsyncQueryable<object>>(Catch<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TException);
  73. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, IAsyncEnumerable<TSource>>> handler)
  74. {
  75. if (source == null)
  76. throw new ArgumentNullException(nameof(source));
  77. if (handler == null)
  78. throw new ArgumentNullException(nameof(handler));
  79. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__1(typeof(TSource), typeof(TException)), source.Expression, handler));
  80. }
  81. private static MethodInfo s_Catch__TSource_TException__2__2;
  82. private static MethodInfo Catch__TSource_TException__2__2(Type TSource, Type TException) =>
  83. (s_Catch__TSource_TException__2__2 ??
  84. (s_Catch__TSource_TException__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Catch<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TException);
  85. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, ValueTask<IAsyncEnumerable<TSource>>>> handler)
  86. {
  87. if (source == null)
  88. throw new ArgumentNullException(nameof(source));
  89. if (handler == null)
  90. throw new ArgumentNullException(nameof(handler));
  91. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__2(typeof(TSource), typeof(TException)), source.Expression, handler));
  92. }
  93. private static MethodInfo s_Concat__TSource__1__0;
  94. private static MethodInfo Concat__TSource__1__0(Type TSource) =>
  95. (s_Concat__TSource__1__0 ??
  96. (s_Concat__TSource__1__0 = new Func<IAsyncQueryable<IAsyncEnumerable<object>>, IAsyncQueryable<object>>(Concat<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  97. public static IAsyncQueryable<TSource> Concat<TSource>(this IAsyncQueryable<IAsyncEnumerable<TSource>> sources)
  98. {
  99. if (sources == null)
  100. throw new ArgumentNullException(nameof(sources));
  101. return sources.Provider.CreateQuery<TSource>(Expression.Call(Concat__TSource__1__0(typeof(TSource)), sources.Expression));
  102. }
  103. private static MethodInfo s_Distinct__TSource_TKey__2__0;
  104. private static MethodInfo Distinct__TSource_TKey__2__0(Type TSource, Type TKey) =>
  105. (s_Distinct__TSource_TKey__2__0 ??
  106. (s_Distinct__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  107. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  108. {
  109. if (source == null)
  110. throw new ArgumentNullException(nameof(source));
  111. if (keySelector == null)
  112. throw new ArgumentNullException(nameof(keySelector));
  113. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  114. }
  115. private static MethodInfo s_Distinct__TSource_TKey__2__1;
  116. private static MethodInfo Distinct__TSource_TKey__2__1(Type TSource, Type TKey) =>
  117. (s_Distinct__TSource_TKey__2__1 ??
  118. (s_Distinct__TSource_TKey__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  119. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  120. {
  121. if (source == null)
  122. throw new ArgumentNullException(nameof(source));
  123. if (keySelector == null)
  124. throw new ArgumentNullException(nameof(keySelector));
  125. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  126. }
  127. private static MethodInfo s_Distinct__TSource_TKey__2__2;
  128. private static MethodInfo Distinct__TSource_TKey__2__2(Type TSource, Type TKey) =>
  129. (s_Distinct__TSource_TKey__2__2 ??
  130. (s_Distinct__TSource_TKey__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  131. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  132. {
  133. if (source == null)
  134. throw new ArgumentNullException(nameof(source));
  135. if (keySelector == null)
  136. throw new ArgumentNullException(nameof(keySelector));
  137. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  138. }
  139. private static MethodInfo s_Distinct__TSource_TKey__3__0;
  140. private static MethodInfo Distinct__TSource_TKey__3__0(Type TSource, Type TKey) =>
  141. (s_Distinct__TSource_TKey__3__0 ??
  142. (s_Distinct__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  143. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  144. {
  145. if (source == null)
  146. throw new ArgumentNullException(nameof(source));
  147. if (keySelector == null)
  148. throw new ArgumentNullException(nameof(keySelector));
  149. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  150. }
  151. private static MethodInfo s_Distinct__TSource_TKey__3__1;
  152. private static MethodInfo Distinct__TSource_TKey__3__1(Type TSource, Type TKey) =>
  153. (s_Distinct__TSource_TKey__3__1 ??
  154. (s_Distinct__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  155. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
  156. {
  157. if (source == null)
  158. throw new ArgumentNullException(nameof(source));
  159. if (keySelector == null)
  160. throw new ArgumentNullException(nameof(keySelector));
  161. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  162. }
  163. private static MethodInfo s_Distinct__TSource_TKey__3__2;
  164. private static MethodInfo Distinct__TSource_TKey__3__2(Type TSource, Type TKey) =>
  165. (s_Distinct__TSource_TKey__3__2 ??
  166. (s_Distinct__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  167. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  168. {
  169. if (source == null)
  170. throw new ArgumentNullException(nameof(source));
  171. if (keySelector == null)
  172. throw new ArgumentNullException(nameof(keySelector));
  173. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  174. }
  175. private static MethodInfo s_DistinctUntilChanged__TSource__1__0;
  176. private static MethodInfo DistinctUntilChanged__TSource__1__0(Type TSource) =>
  177. (s_DistinctUntilChanged__TSource__1__0 ??
  178. (s_DistinctUntilChanged__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  179. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource>(this IAsyncQueryable<TSource> source)
  180. {
  181. if (source == null)
  182. throw new ArgumentNullException(nameof(source));
  183. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource__1__0(typeof(TSource)), source.Expression));
  184. }
  185. private static MethodInfo s_DistinctUntilChanged__TSource__2__0;
  186. private static MethodInfo DistinctUntilChanged__TSource__2__0(Type TSource) =>
  187. (s_DistinctUntilChanged__TSource__2__0 ??
  188. (s_DistinctUntilChanged__TSource__2__0 = new Func<IAsyncQueryable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  189. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource>(this IAsyncQueryable<TSource> source, IEqualityComparer<TSource>? comparer)
  190. {
  191. if (source == null)
  192. throw new ArgumentNullException(nameof(source));
  193. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  194. }
  195. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__2__0;
  196. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__0(Type TSource, Type TKey) =>
  197. (s_DistinctUntilChanged__TSource_TKey__2__0 ??
  198. (s_DistinctUntilChanged__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  199. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  200. {
  201. if (source == null)
  202. throw new ArgumentNullException(nameof(source));
  203. if (keySelector == null)
  204. throw new ArgumentNullException(nameof(keySelector));
  205. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  206. }
  207. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__2__1;
  208. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__1(Type TSource, Type TKey) =>
  209. (s_DistinctUntilChanged__TSource_TKey__2__1 ??
  210. (s_DistinctUntilChanged__TSource_TKey__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  211. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  212. {
  213. if (source == null)
  214. throw new ArgumentNullException(nameof(source));
  215. if (keySelector == null)
  216. throw new ArgumentNullException(nameof(keySelector));
  217. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  218. }
  219. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__2__2;
  220. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__2(Type TSource, Type TKey) =>
  221. (s_DistinctUntilChanged__TSource_TKey__2__2 ??
  222. (s_DistinctUntilChanged__TSource_TKey__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  223. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  224. {
  225. if (source == null)
  226. throw new ArgumentNullException(nameof(source));
  227. if (keySelector == null)
  228. throw new ArgumentNullException(nameof(keySelector));
  229. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  230. }
  231. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__3__0;
  232. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__0(Type TSource, Type TKey) =>
  233. (s_DistinctUntilChanged__TSource_TKey__3__0 ??
  234. (s_DistinctUntilChanged__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  235. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  236. {
  237. if (source == null)
  238. throw new ArgumentNullException(nameof(source));
  239. if (keySelector == null)
  240. throw new ArgumentNullException(nameof(keySelector));
  241. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  242. }
  243. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__3__1;
  244. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__1(Type TSource, Type TKey) =>
  245. (s_DistinctUntilChanged__TSource_TKey__3__1 ??
  246. (s_DistinctUntilChanged__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  247. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
  248. {
  249. if (source == null)
  250. throw new ArgumentNullException(nameof(source));
  251. if (keySelector == null)
  252. throw new ArgumentNullException(nameof(keySelector));
  253. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  254. }
  255. private static MethodInfo s_DistinctUntilChanged__TSource_TKey__3__2;
  256. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__2(Type TSource, Type TKey) =>
  257. (s_DistinctUntilChanged__TSource_TKey__3__2 ??
  258. (s_DistinctUntilChanged__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  259. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  260. {
  261. if (source == null)
  262. throw new ArgumentNullException(nameof(source));
  263. if (keySelector == null)
  264. throw new ArgumentNullException(nameof(keySelector));
  265. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  266. }
  267. private static MethodInfo s_Do__TSource__2__0;
  268. private static MethodInfo Do__TSource__2__0(Type TSource) =>
  269. (s_Do__TSource__2__0 ??
  270. (s_Do__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  271. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext)
  272. {
  273. if (source == null)
  274. throw new ArgumentNullException(nameof(source));
  275. if (onNext == null)
  276. throw new ArgumentNullException(nameof(onNext));
  277. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__0(typeof(TSource)), source.Expression, onNext));
  278. }
  279. private static MethodInfo s_Do__TSource__2__1;
  280. private static MethodInfo Do__TSource__2__1(Type TSource) =>
  281. (s_Do__TSource__2__1 ??
  282. (s_Do__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  283. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext)
  284. {
  285. if (source == null)
  286. throw new ArgumentNullException(nameof(source));
  287. if (onNext == null)
  288. throw new ArgumentNullException(nameof(onNext));
  289. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__1(typeof(TSource)), source.Expression, onNext));
  290. }
  291. private static MethodInfo s_Do__TSource__2__2;
  292. private static MethodInfo Do__TSource__2__2(Type TSource) =>
  293. (s_Do__TSource__2__2 ??
  294. (s_Do__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  295. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext)
  296. {
  297. if (source == null)
  298. throw new ArgumentNullException(nameof(source));
  299. if (onNext == null)
  300. throw new ArgumentNullException(nameof(onNext));
  301. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__2(typeof(TSource)), source.Expression, onNext));
  302. }
  303. private static MethodInfo s_Do__TSource__2__3;
  304. private static MethodInfo Do__TSource__2__3(Type TSource) =>
  305. (s_Do__TSource__2__3 ??
  306. (s_Do__TSource__2__3 = new Func<IAsyncQueryable<object>, IObserver<object>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  307. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, IObserver<TSource> observer)
  308. {
  309. if (source == null)
  310. throw new ArgumentNullException(nameof(source));
  311. if (observer == null)
  312. throw new ArgumentNullException(nameof(observer));
  313. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__3(typeof(TSource)), source.Expression, Expression.Constant(observer, typeof(IObserver<TSource>))));
  314. }
  315. private static MethodInfo s_Do__TSource__3__0;
  316. private static MethodInfo Do__TSource__3__0(Type TSource) =>
  317. (s_Do__TSource__3__0 ??
  318. (s_Do__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Action, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  319. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Action onCompleted)
  320. {
  321. if (source == null)
  322. throw new ArgumentNullException(nameof(source));
  323. if (onNext == null)
  324. throw new ArgumentNullException(nameof(onNext));
  325. if (onCompleted == null)
  326. throw new ArgumentNullException(nameof(onCompleted));
  327. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__0(typeof(TSource)), source.Expression, onNext, Expression.Constant(onCompleted, typeof(Action))));
  328. }
  329. private static MethodInfo s_Do__TSource__3__1;
  330. private static MethodInfo Do__TSource__3__1(Type TSource) =>
  331. (s_Do__TSource__3__1 ??
  332. (s_Do__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Expression<Action<Exception>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  333. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Expression<Action<Exception>> onError)
  334. {
  335. if (source == null)
  336. throw new ArgumentNullException(nameof(source));
  337. if (onNext == null)
  338. throw new ArgumentNullException(nameof(onNext));
  339. if (onError == null)
  340. throw new ArgumentNullException(nameof(onError));
  341. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__1(typeof(TSource)), source.Expression, onNext, onError));
  342. }
  343. private static MethodInfo s_Do__TSource__3__2;
  344. private static MethodInfo Do__TSource__3__2(Type TSource) =>
  345. (s_Do__TSource__3__2 ??
  346. (s_Do__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, Task>>, Expression<Func<CancellationToken, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  347. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext, Expression<Func<CancellationToken, Task>> onCompleted)
  348. {
  349. if (source == null)
  350. throw new ArgumentNullException(nameof(source));
  351. if (onNext == null)
  352. throw new ArgumentNullException(nameof(onNext));
  353. if (onCompleted == null)
  354. throw new ArgumentNullException(nameof(onCompleted));
  355. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__2(typeof(TSource)), source.Expression, onNext, onCompleted));
  356. }
  357. private static MethodInfo s_Do__TSource__3__3;
  358. private static MethodInfo Do__TSource__3__3(Type TSource) =>
  359. (s_Do__TSource__3__3 ??
  360. (s_Do__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, Task>>, Expression<Func<Exception, CancellationToken, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  361. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext, Expression<Func<Exception, CancellationToken, Task>> onError)
  362. {
  363. if (source == null)
  364. throw new ArgumentNullException(nameof(source));
  365. if (onNext == null)
  366. throw new ArgumentNullException(nameof(onNext));
  367. if (onError == null)
  368. throw new ArgumentNullException(nameof(onError));
  369. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__3(typeof(TSource)), source.Expression, onNext, onError));
  370. }
  371. private static MethodInfo s_Do__TSource__3__4;
  372. private static MethodInfo Do__TSource__3__4(Type TSource) =>
  373. (s_Do__TSource__3__4 ??
  374. (s_Do__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, Expression<Func<Exception, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  375. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Exception, Task>> onError)
  376. {
  377. if (source == null)
  378. throw new ArgumentNullException(nameof(source));
  379. if (onNext == null)
  380. throw new ArgumentNullException(nameof(onNext));
  381. if (onError == null)
  382. throw new ArgumentNullException(nameof(onError));
  383. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__4(typeof(TSource)), source.Expression, onNext, onError));
  384. }
  385. private static MethodInfo s_Do__TSource__3__5;
  386. private static MethodInfo Do__TSource__3__5(Type TSource) =>
  387. (s_Do__TSource__3__5 ??
  388. (s_Do__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, Expression<Func<Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  389. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Task>> onCompleted)
  390. {
  391. if (source == null)
  392. throw new ArgumentNullException(nameof(source));
  393. if (onNext == null)
  394. throw new ArgumentNullException(nameof(onNext));
  395. if (onCompleted == null)
  396. throw new ArgumentNullException(nameof(onCompleted));
  397. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__5(typeof(TSource)), source.Expression, onNext, onCompleted));
  398. }
  399. private static MethodInfo s_Do__TSource__4__0;
  400. private static MethodInfo Do__TSource__4__0(Type TSource) =>
  401. (s_Do__TSource__4__0 ??
  402. (s_Do__TSource__4__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Expression<Action<Exception>>, Action, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  403. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Expression<Action<Exception>> onError, Action onCompleted)
  404. {
  405. if (source == null)
  406. throw new ArgumentNullException(nameof(source));
  407. if (onNext == null)
  408. throw new ArgumentNullException(nameof(onNext));
  409. if (onError == null)
  410. throw new ArgumentNullException(nameof(onError));
  411. if (onCompleted == null)
  412. throw new ArgumentNullException(nameof(onCompleted));
  413. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__0(typeof(TSource)), source.Expression, onNext, onError, Expression.Constant(onCompleted, typeof(Action))));
  414. }
  415. private static MethodInfo s_Do__TSource__4__1;
  416. private static MethodInfo Do__TSource__4__1(Type TSource) =>
  417. (s_Do__TSource__4__1 ??
  418. (s_Do__TSource__4__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, Task>>, Expression<Func<Exception, CancellationToken, Task>>, Expression<Func<CancellationToken, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  419. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext, Expression<Func<Exception, CancellationToken, Task>> onError, Expression<Func<CancellationToken, Task>> onCompleted)
  420. {
  421. if (source == null)
  422. throw new ArgumentNullException(nameof(source));
  423. if (onNext == null)
  424. throw new ArgumentNullException(nameof(onNext));
  425. if (onError == null)
  426. throw new ArgumentNullException(nameof(onError));
  427. if (onCompleted == null)
  428. throw new ArgumentNullException(nameof(onCompleted));
  429. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__1(typeof(TSource)), source.Expression, onNext, onError, onCompleted));
  430. }
  431. private static MethodInfo s_Do__TSource__4__2;
  432. private static MethodInfo Do__TSource__4__2(Type TSource) =>
  433. (s_Do__TSource__4__2 ??
  434. (s_Do__TSource__4__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, Expression<Func<Exception, Task>>, Expression<Func<Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  435. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Exception, Task>> onError, Expression<Func<Task>> onCompleted)
  436. {
  437. if (source == null)
  438. throw new ArgumentNullException(nameof(source));
  439. if (onNext == null)
  440. throw new ArgumentNullException(nameof(onNext));
  441. if (onError == null)
  442. throw new ArgumentNullException(nameof(onError));
  443. if (onCompleted == null)
  444. throw new ArgumentNullException(nameof(onCompleted));
  445. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__2(typeof(TSource)), source.Expression, onNext, onError, onCompleted));
  446. }
  447. private static MethodInfo s_Expand__TSource__2__0;
  448. private static MethodInfo Expand__TSource__2__0(Type TSource) =>
  449. (s_Expand__TSource__2__0 ??
  450. (s_Expand__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  451. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<IAsyncEnumerable<TSource>>>> selector)
  452. {
  453. if (source == null)
  454. throw new ArgumentNullException(nameof(source));
  455. if (selector == null)
  456. throw new ArgumentNullException(nameof(selector));
  457. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__0(typeof(TSource)), source.Expression, selector));
  458. }
  459. private static MethodInfo s_Expand__TSource__2__1;
  460. private static MethodInfo Expand__TSource__2__1(Type TSource) =>
  461. (s_Expand__TSource__2__1 ??
  462. (s_Expand__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, IAsyncEnumerable<object>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  463. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, IAsyncEnumerable<TSource>>> selector)
  464. {
  465. if (source == null)
  466. throw new ArgumentNullException(nameof(source));
  467. if (selector == null)
  468. throw new ArgumentNullException(nameof(selector));
  469. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__1(typeof(TSource)), source.Expression, selector));
  470. }
  471. private static MethodInfo s_Expand__TSource__2__2;
  472. private static MethodInfo Expand__TSource__2__2(Type TSource) =>
  473. (s_Expand__TSource__2__2 ??
  474. (s_Expand__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  475. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<IAsyncEnumerable<TSource>>>> selector)
  476. {
  477. if (source == null)
  478. throw new ArgumentNullException(nameof(source));
  479. if (selector == null)
  480. throw new ArgumentNullException(nameof(selector));
  481. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__2(typeof(TSource)), source.Expression, selector));
  482. }
  483. private static MethodInfo s_Finally__TSource__2__0;
  484. private static MethodInfo Finally__TSource__2__0(Type TSource) =>
  485. (s_Finally__TSource__2__0 ??
  486. (s_Finally__TSource__2__0 = new Func<IAsyncQueryable<object>, Action, IAsyncQueryable<object>>(Finally<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  487. public static IAsyncQueryable<TSource> Finally<TSource>(this IAsyncQueryable<TSource> source, Action finallyAction)
  488. {
  489. if (source == null)
  490. throw new ArgumentNullException(nameof(source));
  491. if (finallyAction == null)
  492. throw new ArgumentNullException(nameof(finallyAction));
  493. return source.Provider.CreateQuery<TSource>(Expression.Call(Finally__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(finallyAction, typeof(Action))));
  494. }
  495. private static MethodInfo s_Finally__TSource__2__1;
  496. private static MethodInfo Finally__TSource__2__1(Type TSource) =>
  497. (s_Finally__TSource__2__1 ??
  498. (s_Finally__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<Task>>, IAsyncQueryable<object>>(Finally<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  499. public static IAsyncQueryable<TSource> Finally<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<Task>> finallyAction)
  500. {
  501. if (source == null)
  502. throw new ArgumentNullException(nameof(source));
  503. if (finallyAction == null)
  504. throw new ArgumentNullException(nameof(finallyAction));
  505. return source.Provider.CreateQuery<TSource>(Expression.Call(Finally__TSource__2__1(typeof(TSource)), source.Expression, finallyAction));
  506. }
  507. private static MethodInfo s_IgnoreElements__TSource__1__0;
  508. private static MethodInfo IgnoreElements__TSource__1__0(Type TSource) =>
  509. (s_IgnoreElements__TSource__1__0 ??
  510. (s_IgnoreElements__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(IgnoreElements<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  511. public static IAsyncQueryable<TSource> IgnoreElements<TSource>(this IAsyncQueryable<TSource> source)
  512. {
  513. if (source == null)
  514. throw new ArgumentNullException(nameof(source));
  515. return source.Provider.CreateQuery<TSource>(Expression.Call(IgnoreElements__TSource__1__0(typeof(TSource)), source.Expression));
  516. }
  517. private static MethodInfo s_IsEmptyAsync__TSource__2__0;
  518. private static MethodInfo IsEmptyAsync__TSource__2__0(Type TSource) =>
  519. (s_IsEmptyAsync__TSource__2__0 ??
  520. (s_IsEmptyAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<bool>>(IsEmptyAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  521. public static ValueTask<bool> IsEmptyAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  522. {
  523. if (source == null)
  524. throw new ArgumentNullException(nameof(source));
  525. return source.Provider.ExecuteAsync<bool>(Expression.Call(IsEmptyAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  526. }
  527. private static MethodInfo s_MaxAsync__TSource__3__0;
  528. private static MethodInfo MaxAsync__TSource__3__0(Type TSource) =>
  529. (s_MaxAsync__TSource__3__0 ??
  530. (s_MaxAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IComparer<object>, CancellationToken, ValueTask<object>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  531. public static ValueTask<TSource> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, IComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  532. {
  533. if (source == null)
  534. throw new ArgumentNullException(nameof(source));
  535. return source.Provider.ExecuteAsync<TSource>(Expression.Call(MaxAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer<TSource>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  536. }
  537. private static MethodInfo s_MaxByAsync__TSource_TKey__3__0;
  538. private static MethodInfo MaxByAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  539. (s_MaxByAsync__TSource_TKey__3__0 ??
  540. (s_MaxByAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  541. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  542. {
  543. if (source == null)
  544. throw new ArgumentNullException(nameof(source));
  545. if (keySelector == null)
  546. throw new ArgumentNullException(nameof(keySelector));
  547. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  548. }
  549. private static MethodInfo s_MaxByAsync__TSource_TKey__3__1;
  550. private static MethodInfo MaxByAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  551. (s_MaxByAsync__TSource_TKey__3__1 ??
  552. (s_MaxByAsync__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  553. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  554. {
  555. if (source == null)
  556. throw new ArgumentNullException(nameof(source));
  557. if (keySelector == null)
  558. throw new ArgumentNullException(nameof(keySelector));
  559. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  560. }
  561. private static MethodInfo s_MaxByAsync__TSource_TKey__3__2;
  562. private static MethodInfo MaxByAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  563. (s_MaxByAsync__TSource_TKey__3__2 ??
  564. (s_MaxByAsync__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  565. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  566. {
  567. if (source == null)
  568. throw new ArgumentNullException(nameof(source));
  569. if (keySelector == null)
  570. throw new ArgumentNullException(nameof(keySelector));
  571. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  572. }
  573. private static MethodInfo s_MaxByAsync__TSource_TKey__4__0;
  574. private static MethodInfo MaxByAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  575. (s_MaxByAsync__TSource_TKey__4__0 ??
  576. (s_MaxByAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  577. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  578. {
  579. if (source == null)
  580. throw new ArgumentNullException(nameof(source));
  581. if (keySelector == null)
  582. throw new ArgumentNullException(nameof(keySelector));
  583. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  584. }
  585. private static MethodInfo s_MaxByAsync__TSource_TKey__4__1;
  586. private static MethodInfo MaxByAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  587. (s_MaxByAsync__TSource_TKey__4__1 ??
  588. (s_MaxByAsync__TSource_TKey__4__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  589. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  590. {
  591. if (source == null)
  592. throw new ArgumentNullException(nameof(source));
  593. if (keySelector == null)
  594. throw new ArgumentNullException(nameof(keySelector));
  595. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__4__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  596. }
  597. private static MethodInfo s_MaxByAsync__TSource_TKey__4__2;
  598. private static MethodInfo MaxByAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  599. (s_MaxByAsync__TSource_TKey__4__2 ??
  600. (s_MaxByAsync__TSource_TKey__4__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  601. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  602. {
  603. if (source == null)
  604. throw new ArgumentNullException(nameof(source));
  605. if (keySelector == null)
  606. throw new ArgumentNullException(nameof(keySelector));
  607. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByAsync__TSource_TKey__4__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  608. }
  609. private static MethodInfo s_Merge__TSource__1__0;
  610. private static MethodInfo Merge__TSource__1__0(Type TSource) =>
  611. (s_Merge__TSource__1__0 ??
  612. (s_Merge__TSource__1__0 = new Func<IAsyncQueryable<IAsyncEnumerable<object>>, IAsyncQueryable<object>>(Merge<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  613. public static IAsyncQueryable<TSource> Merge<TSource>(this IAsyncQueryable<IAsyncEnumerable<TSource>> sources)
  614. {
  615. if (sources == null)
  616. throw new ArgumentNullException(nameof(sources));
  617. return sources.Provider.CreateQuery<TSource>(Expression.Call(Merge__TSource__1__0(typeof(TSource)), sources.Expression));
  618. }
  619. private static MethodInfo s_MinAsync__TSource__3__0;
  620. private static MethodInfo MinAsync__TSource__3__0(Type TSource) =>
  621. (s_MinAsync__TSource__3__0 ??
  622. (s_MinAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IComparer<object>, CancellationToken, ValueTask<object>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  623. public static ValueTask<TSource> MinAsync<TSource>(this IAsyncQueryable<TSource> source, IComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  624. {
  625. if (source == null)
  626. throw new ArgumentNullException(nameof(source));
  627. return source.Provider.ExecuteAsync<TSource>(Expression.Call(MinAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer<TSource>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  628. }
  629. private static MethodInfo s_MinByAsync__TSource_TKey__3__0;
  630. private static MethodInfo MinByAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  631. (s_MinByAsync__TSource_TKey__3__0 ??
  632. (s_MinByAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  633. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  634. {
  635. if (source == null)
  636. throw new ArgumentNullException(nameof(source));
  637. if (keySelector == null)
  638. throw new ArgumentNullException(nameof(keySelector));
  639. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  640. }
  641. private static MethodInfo s_MinByAsync__TSource_TKey__3__1;
  642. private static MethodInfo MinByAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  643. (s_MinByAsync__TSource_TKey__3__1 ??
  644. (s_MinByAsync__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  645. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  646. {
  647. if (source == null)
  648. throw new ArgumentNullException(nameof(source));
  649. if (keySelector == null)
  650. throw new ArgumentNullException(nameof(keySelector));
  651. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  652. }
  653. private static MethodInfo s_MinByAsync__TSource_TKey__3__2;
  654. private static MethodInfo MinByAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  655. (s_MinByAsync__TSource_TKey__3__2 ??
  656. (s_MinByAsync__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  657. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  658. {
  659. if (source == null)
  660. throw new ArgumentNullException(nameof(source));
  661. if (keySelector == null)
  662. throw new ArgumentNullException(nameof(keySelector));
  663. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  664. }
  665. private static MethodInfo s_MinByAsync__TSource_TKey__4__0;
  666. private static MethodInfo MinByAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  667. (s_MinByAsync__TSource_TKey__4__0 ??
  668. (s_MinByAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  669. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  670. {
  671. if (source == null)
  672. throw new ArgumentNullException(nameof(source));
  673. if (keySelector == null)
  674. throw new ArgumentNullException(nameof(keySelector));
  675. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  676. }
  677. private static MethodInfo s_MinByAsync__TSource_TKey__4__1;
  678. private static MethodInfo MinByAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  679. (s_MinByAsync__TSource_TKey__4__1 ??
  680. (s_MinByAsync__TSource_TKey__4__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  681. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  682. {
  683. if (source == null)
  684. throw new ArgumentNullException(nameof(source));
  685. if (keySelector == null)
  686. throw new ArgumentNullException(nameof(keySelector));
  687. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__4__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  688. }
  689. private static MethodInfo s_MinByAsync__TSource_TKey__4__2;
  690. private static MethodInfo MinByAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  691. (s_MinByAsync__TSource_TKey__4__2 ??
  692. (s_MinByAsync__TSource_TKey__4__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  693. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  694. {
  695. if (source == null)
  696. throw new ArgumentNullException(nameof(source));
  697. if (keySelector == null)
  698. throw new ArgumentNullException(nameof(keySelector));
  699. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByAsync__TSource_TKey__4__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  700. }
  701. private static MethodInfo s_OnErrorResumeNext__TSource__2__0;
  702. private static MethodInfo OnErrorResumeNext__TSource__2__0(Type TSource) =>
  703. (s_OnErrorResumeNext__TSource__2__0 ??
  704. (s_OnErrorResumeNext__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(OnErrorResumeNext<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  705. public static IAsyncQueryable<TSource> OnErrorResumeNext<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  706. {
  707. if (first == null)
  708. throw new ArgumentNullException(nameof(first));
  709. if (second == null)
  710. throw new ArgumentNullException(nameof(second));
  711. return first.Provider.CreateQuery<TSource>(Expression.Call(OnErrorResumeNext__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  712. }
  713. private static MethodInfo s_Repeat__TSource__1__0;
  714. private static MethodInfo Repeat__TSource__1__0(Type TSource) =>
  715. (s_Repeat__TSource__1__0 ??
  716. (s_Repeat__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Repeat<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  717. public static IAsyncQueryable<TSource> Repeat<TSource>(this IAsyncQueryable<TSource> source)
  718. {
  719. if (source == null)
  720. throw new ArgumentNullException(nameof(source));
  721. return source.Provider.CreateQuery<TSource>(Expression.Call(Repeat__TSource__1__0(typeof(TSource)), source.Expression));
  722. }
  723. private static MethodInfo s_Repeat__TSource__2__0;
  724. private static MethodInfo Repeat__TSource__2__0(Type TSource) =>
  725. (s_Repeat__TSource__2__0 ??
  726. (s_Repeat__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Repeat<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  727. public static IAsyncQueryable<TSource> Repeat<TSource>(this IAsyncQueryable<TSource> source, int count)
  728. {
  729. if (source == null)
  730. throw new ArgumentNullException(nameof(source));
  731. return source.Provider.CreateQuery<TSource>(Expression.Call(Repeat__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  732. }
  733. private static MethodInfo s_Retry__TSource__1__0;
  734. private static MethodInfo Retry__TSource__1__0(Type TSource) =>
  735. (s_Retry__TSource__1__0 ??
  736. (s_Retry__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Retry<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  737. public static IAsyncQueryable<TSource> Retry<TSource>(this IAsyncQueryable<TSource> source)
  738. {
  739. if (source == null)
  740. throw new ArgumentNullException(nameof(source));
  741. return source.Provider.CreateQuery<TSource>(Expression.Call(Retry__TSource__1__0(typeof(TSource)), source.Expression));
  742. }
  743. private static MethodInfo s_Retry__TSource__2__0;
  744. private static MethodInfo Retry__TSource__2__0(Type TSource) =>
  745. (s_Retry__TSource__2__0 ??
  746. (s_Retry__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Retry<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  747. public static IAsyncQueryable<TSource> Retry<TSource>(this IAsyncQueryable<TSource> source, int retryCount)
  748. {
  749. if (source == null)
  750. throw new ArgumentNullException(nameof(source));
  751. return source.Provider.CreateQuery<TSource>(Expression.Call(Retry__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(retryCount, typeof(int))));
  752. }
  753. private static MethodInfo s_Scan__TSource__2__0;
  754. private static MethodInfo Scan__TSource__2__0(Type TSource) =>
  755. (s_Scan__TSource__2__0 ??
  756. (s_Scan__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  757. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, CancellationToken, ValueTask<TSource>>> accumulator)
  758. {
  759. if (source == null)
  760. throw new ArgumentNullException(nameof(source));
  761. if (accumulator == null)
  762. throw new ArgumentNullException(nameof(accumulator));
  763. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__0(typeof(TSource)), source.Expression, accumulator));
  764. }
  765. private static MethodInfo s_Scan__TSource__2__1;
  766. private static MethodInfo Scan__TSource__2__1(Type TSource) =>
  767. (s_Scan__TSource__2__1 ??
  768. (s_Scan__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  769. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> accumulator)
  770. {
  771. if (source == null)
  772. throw new ArgumentNullException(nameof(source));
  773. if (accumulator == null)
  774. throw new ArgumentNullException(nameof(accumulator));
  775. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__1(typeof(TSource)), source.Expression, accumulator));
  776. }
  777. private static MethodInfo s_Scan__TSource__2__2;
  778. private static MethodInfo Scan__TSource__2__2(Type TSource) =>
  779. (s_Scan__TSource__2__2 ??
  780. (s_Scan__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  781. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, ValueTask<TSource>>> accumulator)
  782. {
  783. if (source == null)
  784. throw new ArgumentNullException(nameof(source));
  785. if (accumulator == null)
  786. throw new ArgumentNullException(nameof(accumulator));
  787. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__2(typeof(TSource)), source.Expression, accumulator));
  788. }
  789. private static MethodInfo s_Scan__TSource_TAccumulate__3__0;
  790. private static MethodInfo Scan__TSource_TAccumulate__3__0(Type TSource, Type TAccumulate) =>
  791. (s_Scan__TSource_TAccumulate__3__0 ??
  792. (s_Scan__TSource_TAccumulate__3__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  793. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>>> accumulator)
  794. {
  795. if (source == null)
  796. throw new ArgumentNullException(nameof(source));
  797. if (accumulator == null)
  798. throw new ArgumentNullException(nameof(accumulator));
  799. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  800. }
  801. private static MethodInfo s_Scan__TSource_TAccumulate__3__1;
  802. private static MethodInfo Scan__TSource_TAccumulate__3__1(Type TSource, Type TAccumulate) =>
  803. (s_Scan__TSource_TAccumulate__3__1 ??
  804. (s_Scan__TSource_TAccumulate__3__1 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(Scan<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  805. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> accumulator)
  806. {
  807. if (source == null)
  808. throw new ArgumentNullException(nameof(source));
  809. if (accumulator == null)
  810. throw new ArgumentNullException(nameof(accumulator));
  811. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__1(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  812. }
  813. private static MethodInfo s_Scan__TSource_TAccumulate__3__2;
  814. private static MethodInfo Scan__TSource_TAccumulate__3__2(Type TSource, Type TAccumulate) =>
  815. (s_Scan__TSource_TAccumulate__3__2 ??
  816. (s_Scan__TSource_TAccumulate__3__2 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  817. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, ValueTask<TAccumulate>>> accumulator)
  818. {
  819. if (source == null)
  820. throw new ArgumentNullException(nameof(source));
  821. if (accumulator == null)
  822. throw new ArgumentNullException(nameof(accumulator));
  823. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__2(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  824. }
  825. private static MethodInfo s_SelectMany__TSource_TOther__2__0;
  826. private static MethodInfo SelectMany__TSource_TOther__2__0(Type TSource, Type TOther) =>
  827. (s_SelectMany__TSource_TOther__2__0 ??
  828. (s_SelectMany__TSource_TOther__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(SelectMany<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TOther);
  829. public static IAsyncQueryable<TOther> SelectMany<TSource, TOther>(this IAsyncQueryable<TSource> source, IAsyncEnumerable<TOther> other)
  830. {
  831. if (source == null)
  832. throw new ArgumentNullException(nameof(source));
  833. if (other == null)
  834. throw new ArgumentNullException(nameof(other));
  835. return source.Provider.CreateQuery<TOther>(Expression.Call(SelectMany__TSource_TOther__2__0(typeof(TSource), typeof(TOther)), source.Expression, GetSourceExpression(other)));
  836. }
  837. private static MethodInfo s_StartWith__TSource__2__0;
  838. private static MethodInfo StartWith__TSource__2__0(Type TSource) =>
  839. (s_StartWith__TSource__2__0 ??
  840. (s_StartWith__TSource__2__0 = new Func<IAsyncQueryable<object>, object[], IAsyncQueryable<object>>(StartWith<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  841. public static IAsyncQueryable<TSource> StartWith<TSource>(this IAsyncQueryable<TSource> source, params TSource[] values)
  842. {
  843. if (source == null)
  844. throw new ArgumentNullException(nameof(source));
  845. if (values == null)
  846. throw new ArgumentNullException(nameof(values));
  847. return source.Provider.CreateQuery<TSource>(Expression.Call(StartWith__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(values, typeof(TSource[]))));
  848. }
  849. private static MethodInfo s_Timeout__TSource__2__0;
  850. private static MethodInfo Timeout__TSource__2__0(Type TSource) =>
  851. (s_Timeout__TSource__2__0 ??
  852. (s_Timeout__TSource__2__0 = new Func<IAsyncQueryable<object>, TimeSpan, IAsyncQueryable<object>>(Timeout<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  853. public static IAsyncQueryable<TSource> Timeout<TSource>(this IAsyncQueryable<TSource> source, TimeSpan timeout)
  854. {
  855. if (source == null)
  856. throw new ArgumentNullException(nameof(source));
  857. return source.Provider.CreateQuery<TSource>(Expression.Call(Timeout__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(timeout, typeof(TimeSpan))));
  858. }
  859. }
  860. }