AsyncQueryableEx.Generated.cs 122 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT License.
  3. // See the LICENSE file in the project root for more information.
  4. #nullable enable
  5. using System.Collections.Generic;
  6. using System.Linq.Expressions;
  7. using System.Reflection;
  8. using System.Threading;
  9. using System.Threading.Tasks;
  10. namespace System.Linq
  11. {
  12. public static partial class AsyncQueryableEx
  13. {
  14. private static MethodInfo? s_Amb__TSource__2__0;
  15. private static MethodInfo Amb__TSource__2__0(Type TSource) =>
  16. (s_Amb__TSource__2__0 ??
  17. (s_Amb__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Amb<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  18. public static IAsyncQueryable<TSource> Amb<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  19. {
  20. if (first == null)
  21. throw new ArgumentNullException(nameof(first));
  22. if (second == null)
  23. throw new ArgumentNullException(nameof(second));
  24. return first.Provider.CreateQuery<TSource>(Expression.Call(Amb__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  25. }
  26. private static MethodInfo? s_AsAsyncEnumerable__TSource__1__0;
  27. private static MethodInfo AsAsyncEnumerable__TSource__1__0(Type TSource) =>
  28. (s_AsAsyncEnumerable__TSource__1__0 ??
  29. (s_AsAsyncEnumerable__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(AsAsyncEnumerable<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  30. public static IAsyncQueryable<TSource> AsAsyncEnumerable<TSource>(this IAsyncQueryable<TSource> source)
  31. {
  32. if (source == null)
  33. throw new ArgumentNullException(nameof(source));
  34. return source.Provider.CreateQuery<TSource>(Expression.Call(AsAsyncEnumerable__TSource__1__0(typeof(TSource)), source.Expression));
  35. }
  36. private static MethodInfo? s_AverageAsync__TSource__3__0;
  37. private static MethodInfo AverageAsync__TSource__3__0(Type TSource) =>
  38. (s_AverageAsync__TSource__3__0 ??
  39. (s_AverageAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  40. public static ValueTask<decimal?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  41. {
  42. if (source == null)
  43. throw new ArgumentNullException(nameof(source));
  44. if (selector == null)
  45. throw new ArgumentNullException(nameof(selector));
  46. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  47. }
  48. private static MethodInfo? s_AverageAsync__TSource__3__1;
  49. private static MethodInfo AverageAsync__TSource__3__1(Type TSource) =>
  50. (s_AverageAsync__TSource__3__1 ??
  51. (s_AverageAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  52. public static ValueTask<decimal> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  53. {
  54. if (source == null)
  55. throw new ArgumentNullException(nameof(source));
  56. if (selector == null)
  57. throw new ArgumentNullException(nameof(selector));
  58. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  59. }
  60. private static MethodInfo? s_AverageAsync__TSource__3__2;
  61. private static MethodInfo AverageAsync__TSource__3__2(Type TSource) =>
  62. (s_AverageAsync__TSource__3__2 ??
  63. (s_AverageAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  64. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  65. {
  66. if (source == null)
  67. throw new ArgumentNullException(nameof(source));
  68. if (selector == null)
  69. throw new ArgumentNullException(nameof(selector));
  70. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  71. }
  72. private static MethodInfo? s_AverageAsync__TSource__3__3;
  73. private static MethodInfo AverageAsync__TSource__3__3(Type TSource) =>
  74. (s_AverageAsync__TSource__3__3 ??
  75. (s_AverageAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  76. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  77. {
  78. if (source == null)
  79. throw new ArgumentNullException(nameof(source));
  80. if (selector == null)
  81. throw new ArgumentNullException(nameof(selector));
  82. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  83. }
  84. private static MethodInfo? s_AverageAsync__TSource__3__4;
  85. private static MethodInfo AverageAsync__TSource__3__4(Type TSource) =>
  86. (s_AverageAsync__TSource__3__4 ??
  87. (s_AverageAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  88. public static ValueTask<float?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  89. {
  90. if (source == null)
  91. throw new ArgumentNullException(nameof(source));
  92. if (selector == null)
  93. throw new ArgumentNullException(nameof(selector));
  94. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  95. }
  96. private static MethodInfo? s_AverageAsync__TSource__3__5;
  97. private static MethodInfo AverageAsync__TSource__3__5(Type TSource) =>
  98. (s_AverageAsync__TSource__3__5 ??
  99. (s_AverageAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float>>>, CancellationToken, ValueTask<float>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  100. public static ValueTask<float> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  101. {
  102. if (source == null)
  103. throw new ArgumentNullException(nameof(source));
  104. if (selector == null)
  105. throw new ArgumentNullException(nameof(selector));
  106. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  107. }
  108. private static MethodInfo? s_AverageAsync__TSource__3__6;
  109. private static MethodInfo AverageAsync__TSource__3__6(Type TSource) =>
  110. (s_AverageAsync__TSource__3__6 ??
  111. (s_AverageAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  112. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  113. {
  114. if (source == null)
  115. throw new ArgumentNullException(nameof(source));
  116. if (selector == null)
  117. throw new ArgumentNullException(nameof(selector));
  118. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  119. }
  120. private static MethodInfo? s_AverageAsync__TSource__3__7;
  121. private static MethodInfo AverageAsync__TSource__3__7(Type TSource) =>
  122. (s_AverageAsync__TSource__3__7 ??
  123. (s_AverageAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  124. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  125. {
  126. if (source == null)
  127. throw new ArgumentNullException(nameof(source));
  128. if (selector == null)
  129. throw new ArgumentNullException(nameof(selector));
  130. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  131. }
  132. private static MethodInfo? s_AverageAsync__TSource__3__8;
  133. private static MethodInfo AverageAsync__TSource__3__8(Type TSource) =>
  134. (s_AverageAsync__TSource__3__8 ??
  135. (s_AverageAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  136. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  137. {
  138. if (source == null)
  139. throw new ArgumentNullException(nameof(source));
  140. if (selector == null)
  141. throw new ArgumentNullException(nameof(selector));
  142. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  143. }
  144. private static MethodInfo? s_AverageAsync__TSource__3__9;
  145. private static MethodInfo AverageAsync__TSource__3__9(Type TSource) =>
  146. (s_AverageAsync__TSource__3__9 ??
  147. (s_AverageAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  148. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  149. {
  150. if (source == null)
  151. throw new ArgumentNullException(nameof(source));
  152. if (selector == null)
  153. throw new ArgumentNullException(nameof(selector));
  154. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  155. }
  156. private static MethodInfo? s_AverageAsync__TSource__3__10;
  157. private static MethodInfo AverageAsync__TSource__3__10(Type TSource) =>
  158. (s_AverageAsync__TSource__3__10 ??
  159. (s_AverageAsync__TSource__3__10 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal?>>, CancellationToken, ValueTask<decimal?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  160. public static ValueTask<decimal?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
  161. {
  162. if (source == null)
  163. throw new ArgumentNullException(nameof(source));
  164. if (selector == null)
  165. throw new ArgumentNullException(nameof(selector));
  166. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAsync__TSource__3__10(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  167. }
  168. private static MethodInfo? s_AverageAsync__TSource__3__11;
  169. private static MethodInfo AverageAsync__TSource__3__11(Type TSource) =>
  170. (s_AverageAsync__TSource__3__11 ??
  171. (s_AverageAsync__TSource__3__11 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal>>, CancellationToken, ValueTask<decimal>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  172. public static ValueTask<decimal> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
  173. {
  174. if (source == null)
  175. throw new ArgumentNullException(nameof(source));
  176. if (selector == null)
  177. throw new ArgumentNullException(nameof(selector));
  178. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAsync__TSource__3__11(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  179. }
  180. private static MethodInfo? s_AverageAsync__TSource__3__12;
  181. private static MethodInfo AverageAsync__TSource__3__12(Type TSource) =>
  182. (s_AverageAsync__TSource__3__12 ??
  183. (s_AverageAsync__TSource__3__12 = new Func<IAsyncQueryable<object>, Expression<Func<object, double?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  184. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
  185. {
  186. if (source == null)
  187. throw new ArgumentNullException(nameof(source));
  188. if (selector == null)
  189. throw new ArgumentNullException(nameof(selector));
  190. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__12(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  191. }
  192. private static MethodInfo? s_AverageAsync__TSource__3__13;
  193. private static MethodInfo AverageAsync__TSource__3__13(Type TSource) =>
  194. (s_AverageAsync__TSource__3__13 ??
  195. (s_AverageAsync__TSource__3__13 = new Func<IAsyncQueryable<object>, Expression<Func<object, double>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  196. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
  197. {
  198. if (source == null)
  199. throw new ArgumentNullException(nameof(source));
  200. if (selector == null)
  201. throw new ArgumentNullException(nameof(selector));
  202. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__13(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  203. }
  204. private static MethodInfo? s_AverageAsync__TSource__3__14;
  205. private static MethodInfo AverageAsync__TSource__3__14(Type TSource) =>
  206. (s_AverageAsync__TSource__3__14 ??
  207. (s_AverageAsync__TSource__3__14 = new Func<IAsyncQueryable<object>, Expression<Func<object, float?>>, CancellationToken, ValueTask<float?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  208. public static ValueTask<float?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
  209. {
  210. if (source == null)
  211. throw new ArgumentNullException(nameof(source));
  212. if (selector == null)
  213. throw new ArgumentNullException(nameof(selector));
  214. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAsync__TSource__3__14(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  215. }
  216. private static MethodInfo? s_AverageAsync__TSource__3__15;
  217. private static MethodInfo AverageAsync__TSource__3__15(Type TSource) =>
  218. (s_AverageAsync__TSource__3__15 ??
  219. (s_AverageAsync__TSource__3__15 = new Func<IAsyncQueryable<object>, Expression<Func<object, float>>, CancellationToken, ValueTask<float>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  220. public static ValueTask<float> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
  221. {
  222. if (source == null)
  223. throw new ArgumentNullException(nameof(source));
  224. if (selector == null)
  225. throw new ArgumentNullException(nameof(selector));
  226. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAsync__TSource__3__15(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  227. }
  228. private static MethodInfo? s_AverageAsync__TSource__3__16;
  229. private static MethodInfo AverageAsync__TSource__3__16(Type TSource) =>
  230. (s_AverageAsync__TSource__3__16 ??
  231. (s_AverageAsync__TSource__3__16 = new Func<IAsyncQueryable<object>, Expression<Func<object, int?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  232. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
  233. {
  234. if (source == null)
  235. throw new ArgumentNullException(nameof(source));
  236. if (selector == null)
  237. throw new ArgumentNullException(nameof(selector));
  238. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__16(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  239. }
  240. private static MethodInfo? s_AverageAsync__TSource__3__17;
  241. private static MethodInfo AverageAsync__TSource__3__17(Type TSource) =>
  242. (s_AverageAsync__TSource__3__17 ??
  243. (s_AverageAsync__TSource__3__17 = new Func<IAsyncQueryable<object>, Expression<Func<object, int>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  244. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
  245. {
  246. if (source == null)
  247. throw new ArgumentNullException(nameof(source));
  248. if (selector == null)
  249. throw new ArgumentNullException(nameof(selector));
  250. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__17(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  251. }
  252. private static MethodInfo? s_AverageAsync__TSource__3__18;
  253. private static MethodInfo AverageAsync__TSource__3__18(Type TSource) =>
  254. (s_AverageAsync__TSource__3__18 ??
  255. (s_AverageAsync__TSource__3__18 = new Func<IAsyncQueryable<object>, Expression<Func<object, long?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  256. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
  257. {
  258. if (source == null)
  259. throw new ArgumentNullException(nameof(source));
  260. if (selector == null)
  261. throw new ArgumentNullException(nameof(selector));
  262. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__18(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  263. }
  264. private static MethodInfo? s_AverageAsync__TSource__3__19;
  265. private static MethodInfo AverageAsync__TSource__3__19(Type TSource) =>
  266. (s_AverageAsync__TSource__3__19 ??
  267. (s_AverageAsync__TSource__3__19 = new Func<IAsyncQueryable<object>, Expression<Func<object, long>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  268. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
  269. {
  270. if (source == null)
  271. throw new ArgumentNullException(nameof(source));
  272. if (selector == null)
  273. throw new ArgumentNullException(nameof(selector));
  274. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__19(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  275. }
  276. private static MethodInfo? s_AverageAsync__TSource__3__20;
  277. private static MethodInfo AverageAsync__TSource__3__20(Type TSource) =>
  278. (s_AverageAsync__TSource__3__20 ??
  279. (s_AverageAsync__TSource__3__20 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  280. public static ValueTask<decimal?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  281. {
  282. if (source == null)
  283. throw new ArgumentNullException(nameof(source));
  284. if (selector == null)
  285. throw new ArgumentNullException(nameof(selector));
  286. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAsync__TSource__3__20(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  287. }
  288. private static MethodInfo? s_AverageAsync__TSource__3__21;
  289. private static MethodInfo AverageAsync__TSource__3__21(Type TSource) =>
  290. (s_AverageAsync__TSource__3__21 ??
  291. (s_AverageAsync__TSource__3__21 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  292. public static ValueTask<decimal> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  293. {
  294. if (source == null)
  295. throw new ArgumentNullException(nameof(source));
  296. if (selector == null)
  297. throw new ArgumentNullException(nameof(selector));
  298. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAsync__TSource__3__21(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  299. }
  300. private static MethodInfo? s_AverageAsync__TSource__3__22;
  301. private static MethodInfo AverageAsync__TSource__3__22(Type TSource) =>
  302. (s_AverageAsync__TSource__3__22 ??
  303. (s_AverageAsync__TSource__3__22 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  304. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  305. {
  306. if (source == null)
  307. throw new ArgumentNullException(nameof(source));
  308. if (selector == null)
  309. throw new ArgumentNullException(nameof(selector));
  310. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__22(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  311. }
  312. private static MethodInfo? s_AverageAsync__TSource__3__23;
  313. private static MethodInfo AverageAsync__TSource__3__23(Type TSource) =>
  314. (s_AverageAsync__TSource__3__23 ??
  315. (s_AverageAsync__TSource__3__23 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  316. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  317. {
  318. if (source == null)
  319. throw new ArgumentNullException(nameof(source));
  320. if (selector == null)
  321. throw new ArgumentNullException(nameof(selector));
  322. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__23(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  323. }
  324. private static MethodInfo? s_AverageAsync__TSource__3__24;
  325. private static MethodInfo AverageAsync__TSource__3__24(Type TSource) =>
  326. (s_AverageAsync__TSource__3__24 ??
  327. (s_AverageAsync__TSource__3__24 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  328. public static ValueTask<float?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  329. {
  330. if (source == null)
  331. throw new ArgumentNullException(nameof(source));
  332. if (selector == null)
  333. throw new ArgumentNullException(nameof(selector));
  334. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAsync__TSource__3__24(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  335. }
  336. private static MethodInfo? s_AverageAsync__TSource__3__25;
  337. private static MethodInfo AverageAsync__TSource__3__25(Type TSource) =>
  338. (s_AverageAsync__TSource__3__25 ??
  339. (s_AverageAsync__TSource__3__25 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float>>>, CancellationToken, ValueTask<float>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  340. public static ValueTask<float> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  341. {
  342. if (source == null)
  343. throw new ArgumentNullException(nameof(source));
  344. if (selector == null)
  345. throw new ArgumentNullException(nameof(selector));
  346. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAsync__TSource__3__25(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  347. }
  348. private static MethodInfo? s_AverageAsync__TSource__3__26;
  349. private static MethodInfo AverageAsync__TSource__3__26(Type TSource) =>
  350. (s_AverageAsync__TSource__3__26 ??
  351. (s_AverageAsync__TSource__3__26 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  352. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  353. {
  354. if (source == null)
  355. throw new ArgumentNullException(nameof(source));
  356. if (selector == null)
  357. throw new ArgumentNullException(nameof(selector));
  358. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__26(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  359. }
  360. private static MethodInfo? s_AverageAsync__TSource__3__27;
  361. private static MethodInfo AverageAsync__TSource__3__27(Type TSource) =>
  362. (s_AverageAsync__TSource__3__27 ??
  363. (s_AverageAsync__TSource__3__27 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  364. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  365. {
  366. if (source == null)
  367. throw new ArgumentNullException(nameof(source));
  368. if (selector == null)
  369. throw new ArgumentNullException(nameof(selector));
  370. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__27(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  371. }
  372. private static MethodInfo? s_AverageAsync__TSource__3__28;
  373. private static MethodInfo AverageAsync__TSource__3__28(Type TSource) =>
  374. (s_AverageAsync__TSource__3__28 ??
  375. (s_AverageAsync__TSource__3__28 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long?>>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  376. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  377. {
  378. if (source == null)
  379. throw new ArgumentNullException(nameof(source));
  380. if (selector == null)
  381. throw new ArgumentNullException(nameof(selector));
  382. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__28(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  383. }
  384. private static MethodInfo? s_AverageAsync__TSource__3__29;
  385. private static MethodInfo AverageAsync__TSource__3__29(Type TSource) =>
  386. (s_AverageAsync__TSource__3__29 ??
  387. (s_AverageAsync__TSource__3__29 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long>>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  388. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  389. {
  390. if (source == null)
  391. throw new ArgumentNullException(nameof(source));
  392. if (selector == null)
  393. throw new ArgumentNullException(nameof(selector));
  394. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__29(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  395. }
  396. private static MethodInfo? s_Buffer__TSource__2__0;
  397. private static MethodInfo Buffer__TSource__2__0(Type TSource) =>
  398. (s_Buffer__TSource__2__0 ??
  399. (s_Buffer__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<IList<object>>>(Buffer<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  400. public static IAsyncQueryable<IList<TSource>> Buffer<TSource>(this IAsyncQueryable<TSource> source, int count)
  401. {
  402. if (source == null)
  403. throw new ArgumentNullException(nameof(source));
  404. return source.Provider.CreateQuery<IList<TSource>>(Expression.Call(Buffer__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  405. }
  406. private static MethodInfo? s_Buffer__TSource__3__0;
  407. private static MethodInfo Buffer__TSource__3__0(Type TSource) =>
  408. (s_Buffer__TSource__3__0 ??
  409. (s_Buffer__TSource__3__0 = new Func<IAsyncQueryable<object>, int, int, IAsyncQueryable<IList<object>>>(Buffer<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  410. public static IAsyncQueryable<IList<TSource>> Buffer<TSource>(this IAsyncQueryable<TSource> source, int count, int skip)
  411. {
  412. if (source == null)
  413. throw new ArgumentNullException(nameof(source));
  414. 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))));
  415. }
  416. private static MethodInfo? s_Catch__TSource__2__0;
  417. private static MethodInfo Catch__TSource__2__0(Type TSource) =>
  418. (s_Catch__TSource__2__0 ??
  419. (s_Catch__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Catch<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  420. public static IAsyncQueryable<TSource> Catch<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  421. {
  422. if (first == null)
  423. throw new ArgumentNullException(nameof(first));
  424. if (second == null)
  425. throw new ArgumentNullException(nameof(second));
  426. return first.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  427. }
  428. private static MethodInfo? s_Catch__TSource_TException__2__0;
  429. private static MethodInfo Catch__TSource_TException__2__0(Type TSource, Type TException) =>
  430. (s_Catch__TSource_TException__2__0 ??
  431. (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);
  432. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, CancellationToken, ValueTask<IAsyncEnumerable<TSource>>>> handler)
  433. {
  434. if (source == null)
  435. throw new ArgumentNullException(nameof(source));
  436. if (handler == null)
  437. throw new ArgumentNullException(nameof(handler));
  438. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__0(typeof(TSource), typeof(TException)), source.Expression, handler));
  439. }
  440. private static MethodInfo? s_Catch__TSource_TException__2__1;
  441. private static MethodInfo Catch__TSource_TException__2__1(Type TSource, Type TException) =>
  442. (s_Catch__TSource_TException__2__1 ??
  443. (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);
  444. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, IAsyncEnumerable<TSource>>> handler)
  445. {
  446. if (source == null)
  447. throw new ArgumentNullException(nameof(source));
  448. if (handler == null)
  449. throw new ArgumentNullException(nameof(handler));
  450. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__1(typeof(TSource), typeof(TException)), source.Expression, handler));
  451. }
  452. private static MethodInfo? s_Catch__TSource_TException__2__2;
  453. private static MethodInfo Catch__TSource_TException__2__2(Type TSource, Type TException) =>
  454. (s_Catch__TSource_TException__2__2 ??
  455. (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);
  456. public static IAsyncQueryable<TSource> Catch<TSource, TException>(this IAsyncQueryable<TSource> source, Expression<Func<TException, ValueTask<IAsyncEnumerable<TSource>>>> handler)
  457. {
  458. if (source == null)
  459. throw new ArgumentNullException(nameof(source));
  460. if (handler == null)
  461. throw new ArgumentNullException(nameof(handler));
  462. return source.Provider.CreateQuery<TSource>(Expression.Call(Catch__TSource_TException__2__2(typeof(TSource), typeof(TException)), source.Expression, handler));
  463. }
  464. private static MethodInfo? s_Concat__TSource__1__0;
  465. private static MethodInfo Concat__TSource__1__0(Type TSource) =>
  466. (s_Concat__TSource__1__0 ??
  467. (s_Concat__TSource__1__0 = new Func<IAsyncQueryable<IAsyncEnumerable<object>>, IAsyncQueryable<object>>(Concat<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  468. public static IAsyncQueryable<TSource> Concat<TSource>(this IAsyncQueryable<IAsyncEnumerable<TSource>> sources)
  469. {
  470. if (sources == null)
  471. throw new ArgumentNullException(nameof(sources));
  472. return sources.Provider.CreateQuery<TSource>(Expression.Call(Concat__TSource__1__0(typeof(TSource)), sources.Expression));
  473. }
  474. private static MethodInfo? s_Distinct__TSource_TKey__2__0;
  475. private static MethodInfo Distinct__TSource_TKey__2__0(Type TSource, Type TKey) =>
  476. (s_Distinct__TSource_TKey__2__0 ??
  477. (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);
  478. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  479. {
  480. if (source == null)
  481. throw new ArgumentNullException(nameof(source));
  482. if (keySelector == null)
  483. throw new ArgumentNullException(nameof(keySelector));
  484. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  485. }
  486. private static MethodInfo? s_Distinct__TSource_TKey__2__1;
  487. private static MethodInfo Distinct__TSource_TKey__2__1(Type TSource, Type TKey) =>
  488. (s_Distinct__TSource_TKey__2__1 ??
  489. (s_Distinct__TSource_TKey__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<object>>(Distinct<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  490. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  491. {
  492. if (source == null)
  493. throw new ArgumentNullException(nameof(source));
  494. if (keySelector == null)
  495. throw new ArgumentNullException(nameof(keySelector));
  496. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  497. }
  498. private static MethodInfo? s_Distinct__TSource_TKey__2__2;
  499. private static MethodInfo Distinct__TSource_TKey__2__2(Type TSource, Type TKey) =>
  500. (s_Distinct__TSource_TKey__2__2 ??
  501. (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);
  502. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  503. {
  504. if (source == null)
  505. throw new ArgumentNullException(nameof(source));
  506. if (keySelector == null)
  507. throw new ArgumentNullException(nameof(keySelector));
  508. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource_TKey__2__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  509. }
  510. private static MethodInfo? s_Distinct__TSource_TKey__3__0;
  511. private static MethodInfo Distinct__TSource_TKey__3__0(Type TSource, Type TKey) =>
  512. (s_Distinct__TSource_TKey__3__0 ??
  513. (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);
  514. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  515. {
  516. if (source == null)
  517. throw new ArgumentNullException(nameof(source));
  518. if (keySelector == null)
  519. throw new ArgumentNullException(nameof(keySelector));
  520. 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>))));
  521. }
  522. private static MethodInfo? s_Distinct__TSource_TKey__3__1;
  523. private static MethodInfo Distinct__TSource_TKey__3__1(Type TSource, Type TKey) =>
  524. (s_Distinct__TSource_TKey__3__1 ??
  525. (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);
  526. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
  527. {
  528. if (source == null)
  529. throw new ArgumentNullException(nameof(source));
  530. if (keySelector == null)
  531. throw new ArgumentNullException(nameof(keySelector));
  532. 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>))));
  533. }
  534. private static MethodInfo? s_Distinct__TSource_TKey__3__2;
  535. private static MethodInfo Distinct__TSource_TKey__3__2(Type TSource, Type TKey) =>
  536. (s_Distinct__TSource_TKey__3__2 ??
  537. (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);
  538. public static IAsyncQueryable<TSource> Distinct<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  539. {
  540. if (source == null)
  541. throw new ArgumentNullException(nameof(source));
  542. if (keySelector == null)
  543. throw new ArgumentNullException(nameof(keySelector));
  544. 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>))));
  545. }
  546. private static MethodInfo? s_DistinctUntilChanged__TSource__1__0;
  547. private static MethodInfo DistinctUntilChanged__TSource__1__0(Type TSource) =>
  548. (s_DistinctUntilChanged__TSource__1__0 ??
  549. (s_DistinctUntilChanged__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  550. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource>(this IAsyncQueryable<TSource> source)
  551. {
  552. if (source == null)
  553. throw new ArgumentNullException(nameof(source));
  554. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource__1__0(typeof(TSource)), source.Expression));
  555. }
  556. private static MethodInfo? s_DistinctUntilChanged__TSource__2__0;
  557. private static MethodInfo DistinctUntilChanged__TSource__2__0(Type TSource) =>
  558. (s_DistinctUntilChanged__TSource__2__0 ??
  559. (s_DistinctUntilChanged__TSource__2__0 = new Func<IAsyncQueryable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(DistinctUntilChanged<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  560. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource>(this IAsyncQueryable<TSource> source, IEqualityComparer<TSource>? comparer)
  561. {
  562. if (source == null)
  563. throw new ArgumentNullException(nameof(source));
  564. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  565. }
  566. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__2__0;
  567. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__0(Type TSource, Type TKey) =>
  568. (s_DistinctUntilChanged__TSource_TKey__2__0 ??
  569. (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);
  570. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  571. {
  572. if (source == null)
  573. throw new ArgumentNullException(nameof(source));
  574. if (keySelector == null)
  575. throw new ArgumentNullException(nameof(keySelector));
  576. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  577. }
  578. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__2__1;
  579. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__1(Type TSource, Type TKey) =>
  580. (s_DistinctUntilChanged__TSource_TKey__2__1 ??
  581. (s_DistinctUntilChanged__TSource_TKey__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<object>>(DistinctUntilChanged<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  582. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  583. {
  584. if (source == null)
  585. throw new ArgumentNullException(nameof(source));
  586. if (keySelector == null)
  587. throw new ArgumentNullException(nameof(keySelector));
  588. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  589. }
  590. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__2__2;
  591. private static MethodInfo DistinctUntilChanged__TSource_TKey__2__2(Type TSource, Type TKey) =>
  592. (s_DistinctUntilChanged__TSource_TKey__2__2 ??
  593. (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);
  594. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  595. {
  596. if (source == null)
  597. throw new ArgumentNullException(nameof(source));
  598. if (keySelector == null)
  599. throw new ArgumentNullException(nameof(keySelector));
  600. return source.Provider.CreateQuery<TSource>(Expression.Call(DistinctUntilChanged__TSource_TKey__2__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  601. }
  602. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__3__0;
  603. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__0(Type TSource, Type TKey) =>
  604. (s_DistinctUntilChanged__TSource_TKey__3__0 ??
  605. (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);
  606. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  607. {
  608. if (source == null)
  609. throw new ArgumentNullException(nameof(source));
  610. if (keySelector == null)
  611. throw new ArgumentNullException(nameof(keySelector));
  612. 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>))));
  613. }
  614. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__3__1;
  615. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__1(Type TSource, Type TKey) =>
  616. (s_DistinctUntilChanged__TSource_TKey__3__1 ??
  617. (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);
  618. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
  619. {
  620. if (source == null)
  621. throw new ArgumentNullException(nameof(source));
  622. if (keySelector == null)
  623. throw new ArgumentNullException(nameof(keySelector));
  624. 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>))));
  625. }
  626. private static MethodInfo? s_DistinctUntilChanged__TSource_TKey__3__2;
  627. private static MethodInfo DistinctUntilChanged__TSource_TKey__3__2(Type TSource, Type TKey) =>
  628. (s_DistinctUntilChanged__TSource_TKey__3__2 ??
  629. (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);
  630. public static IAsyncQueryable<TSource> DistinctUntilChanged<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  631. {
  632. if (source == null)
  633. throw new ArgumentNullException(nameof(source));
  634. if (keySelector == null)
  635. throw new ArgumentNullException(nameof(keySelector));
  636. 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>))));
  637. }
  638. private static MethodInfo? s_Do__TSource__2__0;
  639. private static MethodInfo Do__TSource__2__0(Type TSource) =>
  640. (s_Do__TSource__2__0 ??
  641. (s_Do__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  642. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext)
  643. {
  644. if (source == null)
  645. throw new ArgumentNullException(nameof(source));
  646. if (onNext == null)
  647. throw new ArgumentNullException(nameof(onNext));
  648. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__0(typeof(TSource)), source.Expression, onNext));
  649. }
  650. private static MethodInfo? s_Do__TSource__2__1;
  651. private static MethodInfo Do__TSource__2__1(Type TSource) =>
  652. (s_Do__TSource__2__1 ??
  653. (s_Do__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  654. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext)
  655. {
  656. if (source == null)
  657. throw new ArgumentNullException(nameof(source));
  658. if (onNext == null)
  659. throw new ArgumentNullException(nameof(onNext));
  660. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__1(typeof(TSource)), source.Expression, onNext));
  661. }
  662. private static MethodInfo? s_Do__TSource__2__2;
  663. private static MethodInfo Do__TSource__2__2(Type TSource) =>
  664. (s_Do__TSource__2__2 ??
  665. (s_Do__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  666. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext)
  667. {
  668. if (source == null)
  669. throw new ArgumentNullException(nameof(source));
  670. if (onNext == null)
  671. throw new ArgumentNullException(nameof(onNext));
  672. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__2(typeof(TSource)), source.Expression, onNext));
  673. }
  674. private static MethodInfo? s_Do__TSource__2__3;
  675. private static MethodInfo Do__TSource__2__3(Type TSource) =>
  676. (s_Do__TSource__2__3 ??
  677. (s_Do__TSource__2__3 = new Func<IAsyncQueryable<object>, IObserver<object>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  678. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, IObserver<TSource> observer)
  679. {
  680. if (source == null)
  681. throw new ArgumentNullException(nameof(source));
  682. if (observer == null)
  683. throw new ArgumentNullException(nameof(observer));
  684. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__2__3(typeof(TSource)), source.Expression, Expression.Constant(observer, typeof(IObserver<TSource>))));
  685. }
  686. private static MethodInfo? s_Do__TSource__3__0;
  687. private static MethodInfo Do__TSource__3__0(Type TSource) =>
  688. (s_Do__TSource__3__0 ??
  689. (s_Do__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Action, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  690. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Action onCompleted)
  691. {
  692. if (source == null)
  693. throw new ArgumentNullException(nameof(source));
  694. if (onNext == null)
  695. throw new ArgumentNullException(nameof(onNext));
  696. if (onCompleted == null)
  697. throw new ArgumentNullException(nameof(onCompleted));
  698. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__0(typeof(TSource)), source.Expression, onNext, Expression.Constant(onCompleted, typeof(Action))));
  699. }
  700. private static MethodInfo? s_Do__TSource__3__1;
  701. private static MethodInfo Do__TSource__3__1(Type TSource) =>
  702. (s_Do__TSource__3__1 ??
  703. (s_Do__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Expression<Action<Exception>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  704. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Expression<Action<Exception>> onError)
  705. {
  706. if (source == null)
  707. throw new ArgumentNullException(nameof(source));
  708. if (onNext == null)
  709. throw new ArgumentNullException(nameof(onNext));
  710. if (onError == null)
  711. throw new ArgumentNullException(nameof(onError));
  712. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__1(typeof(TSource)), source.Expression, onNext, onError));
  713. }
  714. private static MethodInfo? s_Do__TSource__3__2;
  715. private static MethodInfo Do__TSource__3__2(Type TSource) =>
  716. (s_Do__TSource__3__2 ??
  717. (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);
  718. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext, Expression<Func<CancellationToken, Task>> onCompleted)
  719. {
  720. if (source == null)
  721. throw new ArgumentNullException(nameof(source));
  722. if (onNext == null)
  723. throw new ArgumentNullException(nameof(onNext));
  724. if (onCompleted == null)
  725. throw new ArgumentNullException(nameof(onCompleted));
  726. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__2(typeof(TSource)), source.Expression, onNext, onCompleted));
  727. }
  728. private static MethodInfo? s_Do__TSource__3__3;
  729. private static MethodInfo Do__TSource__3__3(Type TSource) =>
  730. (s_Do__TSource__3__3 ??
  731. (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);
  732. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, Task>> onNext, Expression<Func<Exception, CancellationToken, Task>> onError)
  733. {
  734. if (source == null)
  735. throw new ArgumentNullException(nameof(source));
  736. if (onNext == null)
  737. throw new ArgumentNullException(nameof(onNext));
  738. if (onError == null)
  739. throw new ArgumentNullException(nameof(onError));
  740. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__3(typeof(TSource)), source.Expression, onNext, onError));
  741. }
  742. private static MethodInfo? s_Do__TSource__3__4;
  743. private static MethodInfo Do__TSource__3__4(Type TSource) =>
  744. (s_Do__TSource__3__4 ??
  745. (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);
  746. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Exception, Task>> onError)
  747. {
  748. if (source == null)
  749. throw new ArgumentNullException(nameof(source));
  750. if (onNext == null)
  751. throw new ArgumentNullException(nameof(onNext));
  752. if (onError == null)
  753. throw new ArgumentNullException(nameof(onError));
  754. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__4(typeof(TSource)), source.Expression, onNext, onError));
  755. }
  756. private static MethodInfo? s_Do__TSource__3__5;
  757. private static MethodInfo Do__TSource__3__5(Type TSource) =>
  758. (s_Do__TSource__3__5 ??
  759. (s_Do__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, Task>>, Expression<Func<Task>>, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  760. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Task>> onCompleted)
  761. {
  762. if (source == null)
  763. throw new ArgumentNullException(nameof(source));
  764. if (onNext == null)
  765. throw new ArgumentNullException(nameof(onNext));
  766. if (onCompleted == null)
  767. throw new ArgumentNullException(nameof(onCompleted));
  768. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__3__5(typeof(TSource)), source.Expression, onNext, onCompleted));
  769. }
  770. private static MethodInfo? s_Do__TSource__4__0;
  771. private static MethodInfo Do__TSource__4__0(Type TSource) =>
  772. (s_Do__TSource__4__0 ??
  773. (s_Do__TSource__4__0 = new Func<IAsyncQueryable<object>, Expression<Action<object>>, Expression<Action<Exception>>, Action, IAsyncQueryable<object>>(Do<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  774. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Action<TSource>> onNext, Expression<Action<Exception>> onError, Action onCompleted)
  775. {
  776. if (source == null)
  777. throw new ArgumentNullException(nameof(source));
  778. if (onNext == null)
  779. throw new ArgumentNullException(nameof(onNext));
  780. if (onError == null)
  781. throw new ArgumentNullException(nameof(onError));
  782. if (onCompleted == null)
  783. throw new ArgumentNullException(nameof(onCompleted));
  784. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__0(typeof(TSource)), source.Expression, onNext, onError, Expression.Constant(onCompleted, typeof(Action))));
  785. }
  786. private static MethodInfo? s_Do__TSource__4__1;
  787. private static MethodInfo Do__TSource__4__1(Type TSource) =>
  788. (s_Do__TSource__4__1 ??
  789. (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);
  790. 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)
  791. {
  792. if (source == null)
  793. throw new ArgumentNullException(nameof(source));
  794. if (onNext == null)
  795. throw new ArgumentNullException(nameof(onNext));
  796. if (onError == null)
  797. throw new ArgumentNullException(nameof(onError));
  798. if (onCompleted == null)
  799. throw new ArgumentNullException(nameof(onCompleted));
  800. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__1(typeof(TSource)), source.Expression, onNext, onError, onCompleted));
  801. }
  802. private static MethodInfo? s_Do__TSource__4__2;
  803. private static MethodInfo Do__TSource__4__2(Type TSource) =>
  804. (s_Do__TSource__4__2 ??
  805. (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);
  806. public static IAsyncQueryable<TSource> Do<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, Task>> onNext, Expression<Func<Exception, Task>> onError, Expression<Func<Task>> onCompleted)
  807. {
  808. if (source == null)
  809. throw new ArgumentNullException(nameof(source));
  810. if (onNext == null)
  811. throw new ArgumentNullException(nameof(onNext));
  812. if (onError == null)
  813. throw new ArgumentNullException(nameof(onError));
  814. if (onCompleted == null)
  815. throw new ArgumentNullException(nameof(onCompleted));
  816. return source.Provider.CreateQuery<TSource>(Expression.Call(Do__TSource__4__2(typeof(TSource)), source.Expression, onNext, onError, onCompleted));
  817. }
  818. private static MethodInfo? s_Expand__TSource__2__0;
  819. private static MethodInfo Expand__TSource__2__0(Type TSource) =>
  820. (s_Expand__TSource__2__0 ??
  821. (s_Expand__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  822. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<IAsyncEnumerable<TSource>>>> selector)
  823. {
  824. if (source == null)
  825. throw new ArgumentNullException(nameof(source));
  826. if (selector == null)
  827. throw new ArgumentNullException(nameof(selector));
  828. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__0(typeof(TSource)), source.Expression, selector));
  829. }
  830. private static MethodInfo? s_Expand__TSource__2__1;
  831. private static MethodInfo Expand__TSource__2__1(Type TSource) =>
  832. (s_Expand__TSource__2__1 ??
  833. (s_Expand__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, IAsyncEnumerable<object>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  834. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, IAsyncEnumerable<TSource>>> selector)
  835. {
  836. if (source == null)
  837. throw new ArgumentNullException(nameof(source));
  838. if (selector == null)
  839. throw new ArgumentNullException(nameof(selector));
  840. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__1(typeof(TSource)), source.Expression, selector));
  841. }
  842. private static MethodInfo? s_Expand__TSource__2__2;
  843. private static MethodInfo Expand__TSource__2__2(Type TSource) =>
  844. (s_Expand__TSource__2__2 ??
  845. (s_Expand__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(Expand<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  846. public static IAsyncQueryable<TSource> Expand<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<IAsyncEnumerable<TSource>>>> selector)
  847. {
  848. if (source == null)
  849. throw new ArgumentNullException(nameof(source));
  850. if (selector == null)
  851. throw new ArgumentNullException(nameof(selector));
  852. return source.Provider.CreateQuery<TSource>(Expression.Call(Expand__TSource__2__2(typeof(TSource)), source.Expression, selector));
  853. }
  854. private static MethodInfo? s_Finally__TSource__2__0;
  855. private static MethodInfo Finally__TSource__2__0(Type TSource) =>
  856. (s_Finally__TSource__2__0 ??
  857. (s_Finally__TSource__2__0 = new Func<IAsyncQueryable<object>, Action, IAsyncQueryable<object>>(Finally<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  858. public static IAsyncQueryable<TSource> Finally<TSource>(this IAsyncQueryable<TSource> source, Action finallyAction)
  859. {
  860. if (source == null)
  861. throw new ArgumentNullException(nameof(source));
  862. if (finallyAction == null)
  863. throw new ArgumentNullException(nameof(finallyAction));
  864. return source.Provider.CreateQuery<TSource>(Expression.Call(Finally__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(finallyAction, typeof(Action))));
  865. }
  866. private static MethodInfo? s_Finally__TSource__2__1;
  867. private static MethodInfo Finally__TSource__2__1(Type TSource) =>
  868. (s_Finally__TSource__2__1 ??
  869. (s_Finally__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<Task>>, IAsyncQueryable<object>>(Finally<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  870. public static IAsyncQueryable<TSource> Finally<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<Task>> finallyAction)
  871. {
  872. if (source == null)
  873. throw new ArgumentNullException(nameof(source));
  874. if (finallyAction == null)
  875. throw new ArgumentNullException(nameof(finallyAction));
  876. return source.Provider.CreateQuery<TSource>(Expression.Call(Finally__TSource__2__1(typeof(TSource)), source.Expression, finallyAction));
  877. }
  878. private static MethodInfo? s_IgnoreElements__TSource__1__0;
  879. private static MethodInfo IgnoreElements__TSource__1__0(Type TSource) =>
  880. (s_IgnoreElements__TSource__1__0 ??
  881. (s_IgnoreElements__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(IgnoreElements<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  882. public static IAsyncQueryable<TSource> IgnoreElements<TSource>(this IAsyncQueryable<TSource> source)
  883. {
  884. if (source == null)
  885. throw new ArgumentNullException(nameof(source));
  886. return source.Provider.CreateQuery<TSource>(Expression.Call(IgnoreElements__TSource__1__0(typeof(TSource)), source.Expression));
  887. }
  888. private static MethodInfo? s_IsEmptyAsync__TSource__2__0;
  889. private static MethodInfo IsEmptyAsync__TSource__2__0(Type TSource) =>
  890. (s_IsEmptyAsync__TSource__2__0 ??
  891. (s_IsEmptyAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<bool>>(IsEmptyAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  892. public static ValueTask<bool> IsEmptyAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  893. {
  894. if (source == null)
  895. throw new ArgumentNullException(nameof(source));
  896. return source.Provider.ExecuteAsync<bool>(Expression.Call(IsEmptyAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  897. }
  898. private static MethodInfo? s_MaxAsync__TSource__3__0;
  899. private static MethodInfo MaxAsync__TSource__3__0(Type TSource) =>
  900. (s_MaxAsync__TSource__3__0 ??
  901. (s_MaxAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IComparer<object>, CancellationToken, ValueTask<object>>(MaxAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  902. public static ValueTask<TSource> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, IComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  903. {
  904. if (source == null)
  905. throw new ArgumentNullException(nameof(source));
  906. 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);
  907. }
  908. private static MethodInfo? s_MaxByAsync__TSource_TKey__3__0;
  909. private static MethodInfo MaxByAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  910. (s_MaxByAsync__TSource_TKey__3__0 ??
  911. (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);
  912. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  913. {
  914. if (source == null)
  915. throw new ArgumentNullException(nameof(source));
  916. if (keySelector == null)
  917. throw new ArgumentNullException(nameof(keySelector));
  918. 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);
  919. }
  920. private static MethodInfo? s_MaxByAsync__TSource_TKey__3__1;
  921. private static MethodInfo MaxByAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  922. (s_MaxByAsync__TSource_TKey__3__1 ??
  923. (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);
  924. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  925. {
  926. if (source == null)
  927. throw new ArgumentNullException(nameof(source));
  928. if (keySelector == null)
  929. throw new ArgumentNullException(nameof(keySelector));
  930. 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);
  931. }
  932. private static MethodInfo? s_MaxByAsync__TSource_TKey__3__2;
  933. private static MethodInfo MaxByAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  934. (s_MaxByAsync__TSource_TKey__3__2 ??
  935. (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);
  936. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  937. {
  938. if (source == null)
  939. throw new ArgumentNullException(nameof(source));
  940. if (keySelector == null)
  941. throw new ArgumentNullException(nameof(keySelector));
  942. 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);
  943. }
  944. private static MethodInfo? s_MaxByAsync__TSource_TKey__4__0;
  945. private static MethodInfo MaxByAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  946. (s_MaxByAsync__TSource_TKey__4__0 ??
  947. (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);
  948. 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)
  949. {
  950. if (source == null)
  951. throw new ArgumentNullException(nameof(source));
  952. if (keySelector == null)
  953. throw new ArgumentNullException(nameof(keySelector));
  954. 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);
  955. }
  956. private static MethodInfo? s_MaxByAsync__TSource_TKey__4__1;
  957. private static MethodInfo MaxByAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  958. (s_MaxByAsync__TSource_TKey__4__1 ??
  959. (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);
  960. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  961. {
  962. if (source == null)
  963. throw new ArgumentNullException(nameof(source));
  964. if (keySelector == null)
  965. throw new ArgumentNullException(nameof(keySelector));
  966. 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);
  967. }
  968. private static MethodInfo? s_MaxByAsync__TSource_TKey__4__2;
  969. private static MethodInfo MaxByAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  970. (s_MaxByAsync__TSource_TKey__4__2 ??
  971. (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);
  972. public static ValueTask<IList<TSource>> MaxByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  973. {
  974. if (source == null)
  975. throw new ArgumentNullException(nameof(source));
  976. if (keySelector == null)
  977. throw new ArgumentNullException(nameof(keySelector));
  978. 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);
  979. }
  980. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__3__0;
  981. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  982. (s_MaxByWithTiesAsync__TSource_TKey__3__0 ??
  983. (s_MaxByWithTiesAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  984. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  985. {
  986. if (source == null)
  987. throw new ArgumentNullException(nameof(source));
  988. if (keySelector == null)
  989. throw new ArgumentNullException(nameof(keySelector));
  990. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  991. }
  992. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__3__1;
  993. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  994. (s_MaxByWithTiesAsync__TSource_TKey__3__1 ??
  995. (s_MaxByWithTiesAsync__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  996. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  997. {
  998. if (source == null)
  999. throw new ArgumentNullException(nameof(source));
  1000. if (keySelector == null)
  1001. throw new ArgumentNullException(nameof(keySelector));
  1002. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1003. }
  1004. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__3__2;
  1005. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  1006. (s_MaxByWithTiesAsync__TSource_TKey__3__2 ??
  1007. (s_MaxByWithTiesAsync__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1008. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  1009. {
  1010. if (source == null)
  1011. throw new ArgumentNullException(nameof(source));
  1012. if (keySelector == null)
  1013. throw new ArgumentNullException(nameof(keySelector));
  1014. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1015. }
  1016. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__4__0;
  1017. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  1018. (s_MaxByWithTiesAsync__TSource_TKey__4__0 ??
  1019. (s_MaxByWithTiesAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1020. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1021. {
  1022. if (source == null)
  1023. throw new ArgumentNullException(nameof(source));
  1024. if (keySelector == null)
  1025. throw new ArgumentNullException(nameof(keySelector));
  1026. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1027. }
  1028. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__4__1;
  1029. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  1030. (s_MaxByWithTiesAsync__TSource_TKey__4__1 ??
  1031. (s_MaxByWithTiesAsync__TSource_TKey__4__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1032. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1033. {
  1034. if (source == null)
  1035. throw new ArgumentNullException(nameof(source));
  1036. if (keySelector == null)
  1037. throw new ArgumentNullException(nameof(keySelector));
  1038. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__4__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1039. }
  1040. private static MethodInfo? s_MaxByWithTiesAsync__TSource_TKey__4__2;
  1041. private static MethodInfo MaxByWithTiesAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  1042. (s_MaxByWithTiesAsync__TSource_TKey__4__2 ??
  1043. (s_MaxByWithTiesAsync__TSource_TKey__4__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MaxByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1044. public static ValueTask<IList<TSource>> MaxByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1045. {
  1046. if (source == null)
  1047. throw new ArgumentNullException(nameof(source));
  1048. if (keySelector == null)
  1049. throw new ArgumentNullException(nameof(keySelector));
  1050. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MaxByWithTiesAsync__TSource_TKey__4__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1051. }
  1052. private static MethodInfo? s_Merge__TSource__1__0;
  1053. private static MethodInfo Merge__TSource__1__0(Type TSource) =>
  1054. (s_Merge__TSource__1__0 ??
  1055. (s_Merge__TSource__1__0 = new Func<IAsyncQueryable<IAsyncEnumerable<object>>, IAsyncQueryable<object>>(Merge<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1056. public static IAsyncQueryable<TSource> Merge<TSource>(this IAsyncQueryable<IAsyncEnumerable<TSource>> sources)
  1057. {
  1058. if (sources == null)
  1059. throw new ArgumentNullException(nameof(sources));
  1060. return sources.Provider.CreateQuery<TSource>(Expression.Call(Merge__TSource__1__0(typeof(TSource)), sources.Expression));
  1061. }
  1062. private static MethodInfo? s_MinAsync__TSource__3__0;
  1063. private static MethodInfo MinAsync__TSource__3__0(Type TSource) =>
  1064. (s_MinAsync__TSource__3__0 ??
  1065. (s_MinAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IComparer<object>, CancellationToken, ValueTask<object>>(MinAsync<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1066. public static ValueTask<TSource> MinAsync<TSource>(this IAsyncQueryable<TSource> source, IComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  1067. {
  1068. if (source == null)
  1069. throw new ArgumentNullException(nameof(source));
  1070. 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);
  1071. }
  1072. private static MethodInfo? s_MinByAsync__TSource_TKey__3__0;
  1073. private static MethodInfo MinByAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  1074. (s_MinByAsync__TSource_TKey__3__0 ??
  1075. (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);
  1076. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  1077. {
  1078. if (source == null)
  1079. throw new ArgumentNullException(nameof(source));
  1080. if (keySelector == null)
  1081. throw new ArgumentNullException(nameof(keySelector));
  1082. 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);
  1083. }
  1084. private static MethodInfo? s_MinByAsync__TSource_TKey__3__1;
  1085. private static MethodInfo MinByAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  1086. (s_MinByAsync__TSource_TKey__3__1 ??
  1087. (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);
  1088. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  1089. {
  1090. if (source == null)
  1091. throw new ArgumentNullException(nameof(source));
  1092. if (keySelector == null)
  1093. throw new ArgumentNullException(nameof(keySelector));
  1094. 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);
  1095. }
  1096. private static MethodInfo? s_MinByAsync__TSource_TKey__3__2;
  1097. private static MethodInfo MinByAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  1098. (s_MinByAsync__TSource_TKey__3__2 ??
  1099. (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);
  1100. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  1101. {
  1102. if (source == null)
  1103. throw new ArgumentNullException(nameof(source));
  1104. if (keySelector == null)
  1105. throw new ArgumentNullException(nameof(keySelector));
  1106. 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);
  1107. }
  1108. private static MethodInfo? s_MinByAsync__TSource_TKey__4__0;
  1109. private static MethodInfo MinByAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  1110. (s_MinByAsync__TSource_TKey__4__0 ??
  1111. (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);
  1112. 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)
  1113. {
  1114. if (source == null)
  1115. throw new ArgumentNullException(nameof(source));
  1116. if (keySelector == null)
  1117. throw new ArgumentNullException(nameof(keySelector));
  1118. 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);
  1119. }
  1120. private static MethodInfo? s_MinByAsync__TSource_TKey__4__1;
  1121. private static MethodInfo MinByAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  1122. (s_MinByAsync__TSource_TKey__4__1 ??
  1123. (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);
  1124. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1125. {
  1126. if (source == null)
  1127. throw new ArgumentNullException(nameof(source));
  1128. if (keySelector == null)
  1129. throw new ArgumentNullException(nameof(keySelector));
  1130. 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);
  1131. }
  1132. private static MethodInfo? s_MinByAsync__TSource_TKey__4__2;
  1133. private static MethodInfo MinByAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  1134. (s_MinByAsync__TSource_TKey__4__2 ??
  1135. (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);
  1136. public static ValueTask<IList<TSource>> MinByAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1137. {
  1138. if (source == null)
  1139. throw new ArgumentNullException(nameof(source));
  1140. if (keySelector == null)
  1141. throw new ArgumentNullException(nameof(keySelector));
  1142. 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);
  1143. }
  1144. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__3__0;
  1145. private static MethodInfo MinByWithTiesAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  1146. (s_MinByWithTiesAsync__TSource_TKey__3__0 ??
  1147. (s_MinByWithTiesAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1148. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  1149. {
  1150. if (source == null)
  1151. throw new ArgumentNullException(nameof(source));
  1152. if (keySelector == null)
  1153. throw new ArgumentNullException(nameof(keySelector));
  1154. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1155. }
  1156. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__3__1;
  1157. private static MethodInfo MinByWithTiesAsync__TSource_TKey__3__1(Type TSource, Type TKey) =>
  1158. (s_MinByWithTiesAsync__TSource_TKey__3__1 ??
  1159. (s_MinByWithTiesAsync__TSource_TKey__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1160. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  1161. {
  1162. if (source == null)
  1163. throw new ArgumentNullException(nameof(source));
  1164. if (keySelector == null)
  1165. throw new ArgumentNullException(nameof(keySelector));
  1166. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__3__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1167. }
  1168. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__3__2;
  1169. private static MethodInfo MinByWithTiesAsync__TSource_TKey__3__2(Type TSource, Type TKey) =>
  1170. (s_MinByWithTiesAsync__TSource_TKey__3__2 ??
  1171. (s_MinByWithTiesAsync__TSource_TKey__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1172. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  1173. {
  1174. if (source == null)
  1175. throw new ArgumentNullException(nameof(source));
  1176. if (keySelector == null)
  1177. throw new ArgumentNullException(nameof(keySelector));
  1178. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__3__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1179. }
  1180. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__4__0;
  1181. private static MethodInfo MinByWithTiesAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  1182. (s_MinByWithTiesAsync__TSource_TKey__4__0 ??
  1183. (s_MinByWithTiesAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1184. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1185. {
  1186. if (source == null)
  1187. throw new ArgumentNullException(nameof(source));
  1188. if (keySelector == null)
  1189. throw new ArgumentNullException(nameof(keySelector));
  1190. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1191. }
  1192. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__4__1;
  1193. private static MethodInfo MinByWithTiesAsync__TSource_TKey__4__1(Type TSource, Type TKey) =>
  1194. (s_MinByWithTiesAsync__TSource_TKey__4__1 ??
  1195. (s_MinByWithTiesAsync__TSource_TKey__4__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1196. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1197. {
  1198. if (source == null)
  1199. throw new ArgumentNullException(nameof(source));
  1200. if (keySelector == null)
  1201. throw new ArgumentNullException(nameof(keySelector));
  1202. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__4__1(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1203. }
  1204. private static MethodInfo? s_MinByWithTiesAsync__TSource_TKey__4__2;
  1205. private static MethodInfo MinByWithTiesAsync__TSource_TKey__4__2(Type TSource, Type TKey) =>
  1206. (s_MinByWithTiesAsync__TSource_TKey__4__2 ??
  1207. (s_MinByWithTiesAsync__TSource_TKey__4__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, CancellationToken, ValueTask<IList<object>>>(MinByWithTiesAsync<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1208. public static ValueTask<IList<TSource>> MinByWithTiesAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  1209. {
  1210. if (source == null)
  1211. throw new ArgumentNullException(nameof(source));
  1212. if (keySelector == null)
  1213. throw new ArgumentNullException(nameof(keySelector));
  1214. return source.Provider.ExecuteAsync<IList<TSource>>(Expression.Call(MinByWithTiesAsync__TSource_TKey__4__2(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1215. }
  1216. private static MethodInfo? s_OnErrorResumeNext__TSource__2__0;
  1217. private static MethodInfo OnErrorResumeNext__TSource__2__0(Type TSource) =>
  1218. (s_OnErrorResumeNext__TSource__2__0 ??
  1219. (s_OnErrorResumeNext__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(OnErrorResumeNext<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1220. public static IAsyncQueryable<TSource> OnErrorResumeNext<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  1221. {
  1222. if (first == null)
  1223. throw new ArgumentNullException(nameof(first));
  1224. if (second == null)
  1225. throw new ArgumentNullException(nameof(second));
  1226. return first.Provider.CreateQuery<TSource>(Expression.Call(OnErrorResumeNext__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  1227. }
  1228. private static MethodInfo? s_Repeat__TSource__1__0;
  1229. private static MethodInfo Repeat__TSource__1__0(Type TSource) =>
  1230. (s_Repeat__TSource__1__0 ??
  1231. (s_Repeat__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Repeat<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1232. public static IAsyncQueryable<TSource> Repeat<TSource>(this IAsyncQueryable<TSource> source)
  1233. {
  1234. if (source == null)
  1235. throw new ArgumentNullException(nameof(source));
  1236. return source.Provider.CreateQuery<TSource>(Expression.Call(Repeat__TSource__1__0(typeof(TSource)), source.Expression));
  1237. }
  1238. private static MethodInfo? s_Repeat__TSource__2__0;
  1239. private static MethodInfo Repeat__TSource__2__0(Type TSource) =>
  1240. (s_Repeat__TSource__2__0 ??
  1241. (s_Repeat__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Repeat<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1242. public static IAsyncQueryable<TSource> Repeat<TSource>(this IAsyncQueryable<TSource> source, int count)
  1243. {
  1244. if (source == null)
  1245. throw new ArgumentNullException(nameof(source));
  1246. return source.Provider.CreateQuery<TSource>(Expression.Call(Repeat__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  1247. }
  1248. private static MethodInfo? s_Retry__TSource__1__0;
  1249. private static MethodInfo Retry__TSource__1__0(Type TSource) =>
  1250. (s_Retry__TSource__1__0 ??
  1251. (s_Retry__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Retry<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1252. public static IAsyncQueryable<TSource> Retry<TSource>(this IAsyncQueryable<TSource> source)
  1253. {
  1254. if (source == null)
  1255. throw new ArgumentNullException(nameof(source));
  1256. return source.Provider.CreateQuery<TSource>(Expression.Call(Retry__TSource__1__0(typeof(TSource)), source.Expression));
  1257. }
  1258. private static MethodInfo? s_Retry__TSource__2__0;
  1259. private static MethodInfo Retry__TSource__2__0(Type TSource) =>
  1260. (s_Retry__TSource__2__0 ??
  1261. (s_Retry__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Retry<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1262. public static IAsyncQueryable<TSource> Retry<TSource>(this IAsyncQueryable<TSource> source, int retryCount)
  1263. {
  1264. if (source == null)
  1265. throw new ArgumentNullException(nameof(source));
  1266. return source.Provider.CreateQuery<TSource>(Expression.Call(Retry__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(retryCount, typeof(int))));
  1267. }
  1268. private static MethodInfo? s_Scan__TSource__2__0;
  1269. private static MethodInfo Scan__TSource__2__0(Type TSource) =>
  1270. (s_Scan__TSource__2__0 ??
  1271. (s_Scan__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1272. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, CancellationToken, ValueTask<TSource>>> accumulator)
  1273. {
  1274. if (source == null)
  1275. throw new ArgumentNullException(nameof(source));
  1276. if (accumulator == null)
  1277. throw new ArgumentNullException(nameof(accumulator));
  1278. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__0(typeof(TSource)), source.Expression, accumulator));
  1279. }
  1280. private static MethodInfo? s_Scan__TSource__2__1;
  1281. private static MethodInfo Scan__TSource__2__1(Type TSource) =>
  1282. (s_Scan__TSource__2__1 ??
  1283. (s_Scan__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1284. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> accumulator)
  1285. {
  1286. if (source == null)
  1287. throw new ArgumentNullException(nameof(source));
  1288. if (accumulator == null)
  1289. throw new ArgumentNullException(nameof(accumulator));
  1290. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__1(typeof(TSource)), source.Expression, accumulator));
  1291. }
  1292. private static MethodInfo? s_Scan__TSource__2__2;
  1293. private static MethodInfo Scan__TSource__2__2(Type TSource) =>
  1294. (s_Scan__TSource__2__2 ??
  1295. (s_Scan__TSource__2__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(Scan<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1296. public static IAsyncQueryable<TSource> Scan<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, ValueTask<TSource>>> accumulator)
  1297. {
  1298. if (source == null)
  1299. throw new ArgumentNullException(nameof(source));
  1300. if (accumulator == null)
  1301. throw new ArgumentNullException(nameof(accumulator));
  1302. return source.Provider.CreateQuery<TSource>(Expression.Call(Scan__TSource__2__2(typeof(TSource)), source.Expression, accumulator));
  1303. }
  1304. private static MethodInfo? s_Scan__TSource_TAccumulate__3__0;
  1305. private static MethodInfo Scan__TSource_TAccumulate__3__0(Type TSource, Type TAccumulate) =>
  1306. (s_Scan__TSource_TAccumulate__3__0 ??
  1307. (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);
  1308. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>>> accumulator)
  1309. {
  1310. if (source == null)
  1311. throw new ArgumentNullException(nameof(source));
  1312. if (accumulator == null)
  1313. throw new ArgumentNullException(nameof(accumulator));
  1314. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  1315. }
  1316. private static MethodInfo? s_Scan__TSource_TAccumulate__3__1;
  1317. private static MethodInfo Scan__TSource_TAccumulate__3__1(Type TSource, Type TAccumulate) =>
  1318. (s_Scan__TSource_TAccumulate__3__1 ??
  1319. (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);
  1320. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> accumulator)
  1321. {
  1322. if (source == null)
  1323. throw new ArgumentNullException(nameof(source));
  1324. if (accumulator == null)
  1325. throw new ArgumentNullException(nameof(accumulator));
  1326. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__1(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  1327. }
  1328. private static MethodInfo? s_Scan__TSource_TAccumulate__3__2;
  1329. private static MethodInfo Scan__TSource_TAccumulate__3__2(Type TSource, Type TAccumulate) =>
  1330. (s_Scan__TSource_TAccumulate__3__2 ??
  1331. (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);
  1332. public static IAsyncQueryable<TAccumulate> Scan<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, ValueTask<TAccumulate>>> accumulator)
  1333. {
  1334. if (source == null)
  1335. throw new ArgumentNullException(nameof(source));
  1336. if (accumulator == null)
  1337. throw new ArgumentNullException(nameof(accumulator));
  1338. return source.Provider.CreateQuery<TAccumulate>(Expression.Call(Scan__TSource_TAccumulate__3__2(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator));
  1339. }
  1340. private static MethodInfo? s_SelectMany__TSource_TOther__2__0;
  1341. private static MethodInfo SelectMany__TSource_TOther__2__0(Type TSource, Type TOther) =>
  1342. (s_SelectMany__TSource_TOther__2__0 ??
  1343. (s_SelectMany__TSource_TOther__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(SelectMany<object, object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource, TOther);
  1344. public static IAsyncQueryable<TOther> SelectMany<TSource, TOther>(this IAsyncQueryable<TSource> source, IAsyncEnumerable<TOther> other)
  1345. {
  1346. if (source == null)
  1347. throw new ArgumentNullException(nameof(source));
  1348. if (other == null)
  1349. throw new ArgumentNullException(nameof(other));
  1350. return source.Provider.CreateQuery<TOther>(Expression.Call(SelectMany__TSource_TOther__2__0(typeof(TSource), typeof(TOther)), source.Expression, GetSourceExpression(other)));
  1351. }
  1352. private static MethodInfo? s_StartWith__TSource__2__0;
  1353. private static MethodInfo StartWith__TSource__2__0(Type TSource) =>
  1354. (s_StartWith__TSource__2__0 ??
  1355. (s_StartWith__TSource__2__0 = new Func<IAsyncQueryable<object>, object[], IAsyncQueryable<object>>(StartWith<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1356. public static IAsyncQueryable<TSource> StartWith<TSource>(this IAsyncQueryable<TSource> source, params TSource[] values)
  1357. {
  1358. if (source == null)
  1359. throw new ArgumentNullException(nameof(source));
  1360. if (values == null)
  1361. throw new ArgumentNullException(nameof(values));
  1362. return source.Provider.CreateQuery<TSource>(Expression.Call(StartWith__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(values, typeof(TSource[]))));
  1363. }
  1364. private static MethodInfo? s_Timeout__TSource__2__0;
  1365. private static MethodInfo Timeout__TSource__2__0(Type TSource) =>
  1366. (s_Timeout__TSource__2__0 ??
  1367. (s_Timeout__TSource__2__0 = new Func<IAsyncQueryable<object>, TimeSpan, IAsyncQueryable<object>>(Timeout<object>).GetMethodInfo()!.GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1368. public static IAsyncQueryable<TSource> Timeout<TSource>(this IAsyncQueryable<TSource> source, TimeSpan timeout)
  1369. {
  1370. if (source == null)
  1371. throw new ArgumentNullException(nameof(source));
  1372. return source.Provider.CreateQuery<TSource>(Expression.Call(Timeout__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(timeout, typeof(TimeSpan))));
  1373. }
  1374. }
  1375. }