AsyncQueryableEx.Generated.cs 73 KB

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