AsyncQueryable.Generated.cs 427 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Collections.Generic;
  5. using System.Linq.Expressions;
  6. using System.Reflection;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. namespace System.Linq
  10. {
  11. public static partial class AsyncQueryable
  12. {
  13. private static MethodInfo s_AggregateAsync__TSource__3__0;
  14. private static MethodInfo AggregateAsync__TSource__3__0(Type TSource) =>
  15. (s_AggregateAsync__TSource__3__0 ??
  16. (s_AggregateAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, object>>, CancellationToken, ValueTask<object>>(AggregateAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  17. public static ValueTask<TSource> AggregateAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> accumulator, CancellationToken cancellationToken = default)
  18. {
  19. if (source == null)
  20. throw new ArgumentNullException(nameof(source));
  21. if (accumulator == null)
  22. throw new ArgumentNullException(nameof(accumulator));
  23. return source.Provider.ExecuteAsync<TSource>(Expression.Call(AggregateAsync__TSource__3__0(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  24. }
  25. private static MethodInfo s_AggregateAsync__TSource_TAccumulate__4__0;
  26. private static MethodInfo AggregateAsync__TSource_TAccumulate__4__0(Type TSource, Type TAccumulate) =>
  27. (s_AggregateAsync__TSource_TAccumulate__4__0 ??
  28. (s_AggregateAsync__TSource_TAccumulate__4__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, object>>, CancellationToken, ValueTask<object>>(AggregateAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  29. public static ValueTask<TAccumulate> AggregateAsync<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> accumulator, CancellationToken cancellationToken = default)
  30. {
  31. if (source == null)
  32. throw new ArgumentNullException(nameof(source));
  33. if (accumulator == null)
  34. throw new ArgumentNullException(nameof(accumulator));
  35. return source.Provider.ExecuteAsync<TAccumulate>(Expression.Call(AggregateAsync__TSource_TAccumulate__4__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  36. }
  37. private static MethodInfo s_AggregateAsync__TSource_TAccumulate_TResult__5__0;
  38. private static MethodInfo AggregateAsync__TSource_TAccumulate_TResult__5__0(Type TSource, Type TAccumulate, Type TResult) =>
  39. (s_AggregateAsync__TSource_TAccumulate_TResult__5__0 ??
  40. (s_AggregateAsync__TSource_TAccumulate_TResult__5__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, object>>, Expression<Func<object, object>>, CancellationToken, ValueTask<object>>(AggregateAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate, TResult);
  41. public static ValueTask<TResult> AggregateAsync<TSource, TAccumulate, TResult>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> accumulator, Expression<Func<TAccumulate, TResult>> resultSelector, CancellationToken cancellationToken = default)
  42. {
  43. if (source == null)
  44. throw new ArgumentNullException(nameof(source));
  45. if (accumulator == null)
  46. throw new ArgumentNullException(nameof(accumulator));
  47. if (resultSelector == null)
  48. throw new ArgumentNullException(nameof(resultSelector));
  49. return source.Provider.ExecuteAsync<TResult>(Expression.Call(AggregateAsync__TSource_TAccumulate_TResult__5__0(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  50. }
  51. private static MethodInfo s_AggregateAwaitAsync__TSource__3__0;
  52. private static MethodInfo AggregateAwaitAsync__TSource__3__0(Type TSource) =>
  53. (s_AggregateAwaitAsync__TSource__3__0 ??
  54. (s_AggregateAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  55. public static ValueTask<TSource> AggregateAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, ValueTask<TSource>>> accumulator, CancellationToken cancellationToken = default)
  56. {
  57. if (source == null)
  58. throw new ArgumentNullException(nameof(source));
  59. if (accumulator == null)
  60. throw new ArgumentNullException(nameof(accumulator));
  61. return source.Provider.ExecuteAsync<TSource>(Expression.Call(AggregateAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  62. }
  63. private static MethodInfo s_AggregateAwaitAsync__TSource_TAccumulate__4__0;
  64. private static MethodInfo AggregateAwaitAsync__TSource_TAccumulate__4__0(Type TSource, Type TAccumulate) =>
  65. (s_AggregateAwaitAsync__TSource_TAccumulate__4__0 ??
  66. (s_AggregateAwaitAsync__TSource_TAccumulate__4__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  67. public static ValueTask<TAccumulate> AggregateAwaitAsync<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, ValueTask<TAccumulate>>> accumulator, CancellationToken cancellationToken = default)
  68. {
  69. if (source == null)
  70. throw new ArgumentNullException(nameof(source));
  71. if (accumulator == null)
  72. throw new ArgumentNullException(nameof(accumulator));
  73. return source.Provider.ExecuteAsync<TAccumulate>(Expression.Call(AggregateAwaitAsync__TSource_TAccumulate__4__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  74. }
  75. private static MethodInfo s_AggregateAwaitAsync__TSource_TAccumulate_TResult__5__0;
  76. private static MethodInfo AggregateAwaitAsync__TSource_TAccumulate_TResult__5__0(Type TSource, Type TAccumulate, Type TResult) =>
  77. (s_AggregateAwaitAsync__TSource_TAccumulate_TResult__5__0 ??
  78. (s_AggregateAwaitAsync__TSource_TAccumulate_TResult__5__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate, TResult);
  79. public static ValueTask<TResult> AggregateAwaitAsync<TSource, TAccumulate, TResult>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, ValueTask<TAccumulate>>> accumulator, Expression<Func<TAccumulate, ValueTask<TResult>>> resultSelector, CancellationToken cancellationToken = default)
  80. {
  81. if (source == null)
  82. throw new ArgumentNullException(nameof(source));
  83. if (accumulator == null)
  84. throw new ArgumentNullException(nameof(accumulator));
  85. if (resultSelector == null)
  86. throw new ArgumentNullException(nameof(resultSelector));
  87. return source.Provider.ExecuteAsync<TResult>(Expression.Call(AggregateAwaitAsync__TSource_TAccumulate_TResult__5__0(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  88. }
  89. private static MethodInfo s_AggregateAwaitWithCancellationAsync__TSource__3__0;
  90. private static MethodInfo AggregateAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  91. (s_AggregateAwaitWithCancellationAsync__TSource__3__0 ??
  92. (s_AggregateAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  93. public static ValueTask<TSource> AggregateAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TSource, CancellationToken, ValueTask<TSource>>> accumulator, CancellationToken cancellationToken = default)
  94. {
  95. if (source == null)
  96. throw new ArgumentNullException(nameof(source));
  97. if (accumulator == null)
  98. throw new ArgumentNullException(nameof(accumulator));
  99. return source.Provider.ExecuteAsync<TSource>(Expression.Call(AggregateAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  100. }
  101. private static MethodInfo s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate__4__0;
  102. private static MethodInfo AggregateAwaitWithCancellationAsync__TSource_TAccumulate__4__0(Type TSource, Type TAccumulate) =>
  103. (s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate__4__0 ??
  104. (s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate__4__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate);
  105. public static ValueTask<TAccumulate> AggregateAwaitWithCancellationAsync<TSource, TAccumulate>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>>> accumulator, CancellationToken cancellationToken = default)
  106. {
  107. if (source == null)
  108. throw new ArgumentNullException(nameof(source));
  109. if (accumulator == null)
  110. throw new ArgumentNullException(nameof(accumulator));
  111. return source.Provider.ExecuteAsync<TAccumulate>(Expression.Call(AggregateAwaitWithCancellationAsync__TSource_TAccumulate__4__0(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  112. }
  113. private static MethodInfo s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate_TResult__5__0;
  114. private static MethodInfo AggregateAwaitWithCancellationAsync__TSource_TAccumulate_TResult__5__0(Type TSource, Type TAccumulate, Type TResult) =>
  115. (s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate_TResult__5__0 ??
  116. (s_AggregateAwaitWithCancellationAsync__TSource_TAccumulate_TResult__5__0 = new Func<IAsyncQueryable<object>, object, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<object>>(AggregateAwaitWithCancellationAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TAccumulate, TResult);
  117. public static ValueTask<TResult> AggregateAwaitWithCancellationAsync<TSource, TAccumulate, TResult>(this IAsyncQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>>> accumulator, Expression<Func<TAccumulate, CancellationToken, ValueTask<TResult>>> resultSelector, CancellationToken cancellationToken = default)
  118. {
  119. if (source == null)
  120. throw new ArgumentNullException(nameof(source));
  121. if (accumulator == null)
  122. throw new ArgumentNullException(nameof(accumulator));
  123. if (resultSelector == null)
  124. throw new ArgumentNullException(nameof(resultSelector));
  125. return source.Provider.ExecuteAsync<TResult>(Expression.Call(AggregateAwaitWithCancellationAsync__TSource_TAccumulate_TResult__5__0(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  126. }
  127. private static MethodInfo s_AllAsync__TSource__3__0;
  128. private static MethodInfo AllAsync__TSource__3__0(Type TSource) =>
  129. (s_AllAsync__TSource__3__0 ??
  130. (s_AllAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<bool>>(AllAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  131. public static ValueTask<bool> AllAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  132. {
  133. if (source == null)
  134. throw new ArgumentNullException(nameof(source));
  135. if (predicate == null)
  136. throw new ArgumentNullException(nameof(predicate));
  137. return source.Provider.ExecuteAsync<bool>(Expression.Call(AllAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  138. }
  139. private static MethodInfo s_AllAwaitAsync__TSource__3__0;
  140. private static MethodInfo AllAwaitAsync__TSource__3__0(Type TSource) =>
  141. (s_AllAwaitAsync__TSource__3__0 ??
  142. (s_AllAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<bool>>(AllAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  143. public static ValueTask<bool> AllAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  144. {
  145. if (source == null)
  146. throw new ArgumentNullException(nameof(source));
  147. if (predicate == null)
  148. throw new ArgumentNullException(nameof(predicate));
  149. return source.Provider.ExecuteAsync<bool>(Expression.Call(AllAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  150. }
  151. private static MethodInfo s_AllAwaitWithCancellationAsync__TSource__3__0;
  152. private static MethodInfo AllAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  153. (s_AllAwaitWithCancellationAsync__TSource__3__0 ??
  154. (s_AllAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<bool>>(AllAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  155. public static ValueTask<bool> AllAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  156. {
  157. if (source == null)
  158. throw new ArgumentNullException(nameof(source));
  159. if (predicate == null)
  160. throw new ArgumentNullException(nameof(predicate));
  161. return source.Provider.ExecuteAsync<bool>(Expression.Call(AllAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  162. }
  163. private static MethodInfo s_AnyAsync__TSource__2__0;
  164. private static MethodInfo AnyAsync__TSource__2__0(Type TSource) =>
  165. (s_AnyAsync__TSource__2__0 ??
  166. (s_AnyAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<bool>>(AnyAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  167. public static ValueTask<bool> AnyAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  168. {
  169. if (source == null)
  170. throw new ArgumentNullException(nameof(source));
  171. return source.Provider.ExecuteAsync<bool>(Expression.Call(AnyAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  172. }
  173. private static MethodInfo s_AnyAsync__TSource__3__0;
  174. private static MethodInfo AnyAsync__TSource__3__0(Type TSource) =>
  175. (s_AnyAsync__TSource__3__0 ??
  176. (s_AnyAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<bool>>(AnyAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  177. public static ValueTask<bool> AnyAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  178. {
  179. if (source == null)
  180. throw new ArgumentNullException(nameof(source));
  181. if (predicate == null)
  182. throw new ArgumentNullException(nameof(predicate));
  183. return source.Provider.ExecuteAsync<bool>(Expression.Call(AnyAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  184. }
  185. private static MethodInfo s_AnyAwaitAsync__TSource__3__0;
  186. private static MethodInfo AnyAwaitAsync__TSource__3__0(Type TSource) =>
  187. (s_AnyAwaitAsync__TSource__3__0 ??
  188. (s_AnyAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<bool>>(AnyAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  189. public static ValueTask<bool> AnyAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  190. {
  191. if (source == null)
  192. throw new ArgumentNullException(nameof(source));
  193. if (predicate == null)
  194. throw new ArgumentNullException(nameof(predicate));
  195. return source.Provider.ExecuteAsync<bool>(Expression.Call(AnyAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  196. }
  197. private static MethodInfo s_AnyAwaitWithCancellationAsync__TSource__3__0;
  198. private static MethodInfo AnyAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  199. (s_AnyAwaitWithCancellationAsync__TSource__3__0 ??
  200. (s_AnyAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<bool>>(AnyAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  201. public static ValueTask<bool> AnyAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  202. {
  203. if (source == null)
  204. throw new ArgumentNullException(nameof(source));
  205. if (predicate == null)
  206. throw new ArgumentNullException(nameof(predicate));
  207. return source.Provider.ExecuteAsync<bool>(Expression.Call(AnyAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  208. }
  209. private static MethodInfo s_Append__TSource__2__0;
  210. private static MethodInfo Append__TSource__2__0(Type TSource) =>
  211. (s_Append__TSource__2__0 ??
  212. (s_Append__TSource__2__0 = new Func<IAsyncQueryable<object>, object, IAsyncQueryable<object>>(Append<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  213. public static IAsyncQueryable<TSource> Append<TSource>(this IAsyncQueryable<TSource> source, TSource element)
  214. {
  215. if (source == null)
  216. throw new ArgumentNullException(nameof(source));
  217. return source.Provider.CreateQuery<TSource>(Expression.Call(Append__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(element, typeof(TSource))));
  218. }
  219. private static MethodInfo s_AverageAsync__2__0;
  220. private static MethodInfo AverageAsync__2__0 =>
  221. (s_AverageAsync__2__0 ??
  222. (s_AverageAsync__2__0 = new Func<IAsyncQueryable<decimal?>, CancellationToken, ValueTask<decimal?>>(AverageAsync).GetMethodInfo()));
  223. public static ValueTask<decimal?> AverageAsync(this IAsyncQueryable<decimal?> source, CancellationToken cancellationToken = default)
  224. {
  225. if (source == null)
  226. throw new ArgumentNullException(nameof(source));
  227. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAsync__2__0, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  228. }
  229. private static MethodInfo s_AverageAsync__2__1;
  230. private static MethodInfo AverageAsync__2__1 =>
  231. (s_AverageAsync__2__1 ??
  232. (s_AverageAsync__2__1 = new Func<IAsyncQueryable<decimal>, CancellationToken, ValueTask<decimal>>(AverageAsync).GetMethodInfo()));
  233. public static ValueTask<decimal> AverageAsync(this IAsyncQueryable<decimal> source, CancellationToken cancellationToken = default)
  234. {
  235. if (source == null)
  236. throw new ArgumentNullException(nameof(source));
  237. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAsync__2__1, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  238. }
  239. private static MethodInfo s_AverageAsync__2__2;
  240. private static MethodInfo AverageAsync__2__2 =>
  241. (s_AverageAsync__2__2 ??
  242. (s_AverageAsync__2__2 = new Func<IAsyncQueryable<double?>, CancellationToken, ValueTask<double?>>(AverageAsync).GetMethodInfo()));
  243. public static ValueTask<double?> AverageAsync(this IAsyncQueryable<double?> source, CancellationToken cancellationToken = default)
  244. {
  245. if (source == null)
  246. throw new ArgumentNullException(nameof(source));
  247. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__2__2, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  248. }
  249. private static MethodInfo s_AverageAsync__2__3;
  250. private static MethodInfo AverageAsync__2__3 =>
  251. (s_AverageAsync__2__3 ??
  252. (s_AverageAsync__2__3 = new Func<IAsyncQueryable<double>, CancellationToken, ValueTask<double>>(AverageAsync).GetMethodInfo()));
  253. public static ValueTask<double> AverageAsync(this IAsyncQueryable<double> source, CancellationToken cancellationToken = default)
  254. {
  255. if (source == null)
  256. throw new ArgumentNullException(nameof(source));
  257. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__2__3, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  258. }
  259. private static MethodInfo s_AverageAsync__2__4;
  260. private static MethodInfo AverageAsync__2__4 =>
  261. (s_AverageAsync__2__4 ??
  262. (s_AverageAsync__2__4 = new Func<IAsyncQueryable<float?>, CancellationToken, ValueTask<float?>>(AverageAsync).GetMethodInfo()));
  263. public static ValueTask<float?> AverageAsync(this IAsyncQueryable<float?> source, CancellationToken cancellationToken = default)
  264. {
  265. if (source == null)
  266. throw new ArgumentNullException(nameof(source));
  267. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAsync__2__4, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  268. }
  269. private static MethodInfo s_AverageAsync__2__5;
  270. private static MethodInfo AverageAsync__2__5 =>
  271. (s_AverageAsync__2__5 ??
  272. (s_AverageAsync__2__5 = new Func<IAsyncQueryable<float>, CancellationToken, ValueTask<float>>(AverageAsync).GetMethodInfo()));
  273. public static ValueTask<float> AverageAsync(this IAsyncQueryable<float> source, CancellationToken cancellationToken = default)
  274. {
  275. if (source == null)
  276. throw new ArgumentNullException(nameof(source));
  277. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAsync__2__5, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  278. }
  279. private static MethodInfo s_AverageAsync__2__6;
  280. private static MethodInfo AverageAsync__2__6 =>
  281. (s_AverageAsync__2__6 ??
  282. (s_AverageAsync__2__6 = new Func<IAsyncQueryable<int?>, CancellationToken, ValueTask<double?>>(AverageAsync).GetMethodInfo()));
  283. public static ValueTask<double?> AverageAsync(this IAsyncQueryable<int?> source, CancellationToken cancellationToken = default)
  284. {
  285. if (source == null)
  286. throw new ArgumentNullException(nameof(source));
  287. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__2__6, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  288. }
  289. private static MethodInfo s_AverageAsync__2__7;
  290. private static MethodInfo AverageAsync__2__7 =>
  291. (s_AverageAsync__2__7 ??
  292. (s_AverageAsync__2__7 = new Func<IAsyncQueryable<int>, CancellationToken, ValueTask<double>>(AverageAsync).GetMethodInfo()));
  293. public static ValueTask<double> AverageAsync(this IAsyncQueryable<int> source, CancellationToken cancellationToken = default)
  294. {
  295. if (source == null)
  296. throw new ArgumentNullException(nameof(source));
  297. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__2__7, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  298. }
  299. private static MethodInfo s_AverageAsync__2__8;
  300. private static MethodInfo AverageAsync__2__8 =>
  301. (s_AverageAsync__2__8 ??
  302. (s_AverageAsync__2__8 = new Func<IAsyncQueryable<long?>, CancellationToken, ValueTask<double?>>(AverageAsync).GetMethodInfo()));
  303. public static ValueTask<double?> AverageAsync(this IAsyncQueryable<long?> source, CancellationToken cancellationToken = default)
  304. {
  305. if (source == null)
  306. throw new ArgumentNullException(nameof(source));
  307. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__2__8, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  308. }
  309. private static MethodInfo s_AverageAsync__2__9;
  310. private static MethodInfo AverageAsync__2__9 =>
  311. (s_AverageAsync__2__9 ??
  312. (s_AverageAsync__2__9 = new Func<IAsyncQueryable<long>, CancellationToken, ValueTask<double>>(AverageAsync).GetMethodInfo()));
  313. public static ValueTask<double> AverageAsync(this IAsyncQueryable<long> source, CancellationToken cancellationToken = default)
  314. {
  315. if (source == null)
  316. throw new ArgumentNullException(nameof(source));
  317. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__2__9, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  318. }
  319. private static MethodInfo s_AverageAsync__TSource__3__0;
  320. private static MethodInfo AverageAsync__TSource__3__0(Type TSource) =>
  321. (s_AverageAsync__TSource__3__0 ??
  322. (s_AverageAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal?>>, CancellationToken, ValueTask<decimal?>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  323. public static ValueTask<decimal?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
  324. {
  325. if (source == null)
  326. throw new ArgumentNullException(nameof(source));
  327. if (selector == null)
  328. throw new ArgumentNullException(nameof(selector));
  329. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  330. }
  331. private static MethodInfo s_AverageAsync__TSource__3__1;
  332. private static MethodInfo AverageAsync__TSource__3__1(Type TSource) =>
  333. (s_AverageAsync__TSource__3__1 ??
  334. (s_AverageAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal>>, CancellationToken, ValueTask<decimal>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  335. public static ValueTask<decimal> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
  336. {
  337. if (source == null)
  338. throw new ArgumentNullException(nameof(source));
  339. if (selector == null)
  340. throw new ArgumentNullException(nameof(selector));
  341. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  342. }
  343. private static MethodInfo s_AverageAsync__TSource__3__2;
  344. private static MethodInfo AverageAsync__TSource__3__2(Type TSource) =>
  345. (s_AverageAsync__TSource__3__2 ??
  346. (s_AverageAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, double?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  347. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
  348. {
  349. if (source == null)
  350. throw new ArgumentNullException(nameof(source));
  351. if (selector == null)
  352. throw new ArgumentNullException(nameof(selector));
  353. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  354. }
  355. private static MethodInfo s_AverageAsync__TSource__3__3;
  356. private static MethodInfo AverageAsync__TSource__3__3(Type TSource) =>
  357. (s_AverageAsync__TSource__3__3 ??
  358. (s_AverageAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, double>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  359. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
  360. {
  361. if (source == null)
  362. throw new ArgumentNullException(nameof(source));
  363. if (selector == null)
  364. throw new ArgumentNullException(nameof(selector));
  365. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  366. }
  367. private static MethodInfo s_AverageAsync__TSource__3__4;
  368. private static MethodInfo AverageAsync__TSource__3__4(Type TSource) =>
  369. (s_AverageAsync__TSource__3__4 ??
  370. (s_AverageAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, float?>>, CancellationToken, ValueTask<float?>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  371. public static ValueTask<float?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
  372. {
  373. if (source == null)
  374. throw new ArgumentNullException(nameof(source));
  375. if (selector == null)
  376. throw new ArgumentNullException(nameof(selector));
  377. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  378. }
  379. private static MethodInfo s_AverageAsync__TSource__3__5;
  380. private static MethodInfo AverageAsync__TSource__3__5(Type TSource) =>
  381. (s_AverageAsync__TSource__3__5 ??
  382. (s_AverageAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, float>>, CancellationToken, ValueTask<float>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  383. public static ValueTask<float> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
  384. {
  385. if (source == null)
  386. throw new ArgumentNullException(nameof(source));
  387. if (selector == null)
  388. throw new ArgumentNullException(nameof(selector));
  389. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  390. }
  391. private static MethodInfo s_AverageAsync__TSource__3__6;
  392. private static MethodInfo AverageAsync__TSource__3__6(Type TSource) =>
  393. (s_AverageAsync__TSource__3__6 ??
  394. (s_AverageAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, int?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  395. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
  396. {
  397. if (source == null)
  398. throw new ArgumentNullException(nameof(source));
  399. if (selector == null)
  400. throw new ArgumentNullException(nameof(selector));
  401. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  402. }
  403. private static MethodInfo s_AverageAsync__TSource__3__7;
  404. private static MethodInfo AverageAsync__TSource__3__7(Type TSource) =>
  405. (s_AverageAsync__TSource__3__7 ??
  406. (s_AverageAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, int>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  407. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
  408. {
  409. if (source == null)
  410. throw new ArgumentNullException(nameof(source));
  411. if (selector == null)
  412. throw new ArgumentNullException(nameof(selector));
  413. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  414. }
  415. private static MethodInfo s_AverageAsync__TSource__3__8;
  416. private static MethodInfo AverageAsync__TSource__3__8(Type TSource) =>
  417. (s_AverageAsync__TSource__3__8 ??
  418. (s_AverageAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, long?>>, CancellationToken, ValueTask<double?>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  419. public static ValueTask<double?> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
  420. {
  421. if (source == null)
  422. throw new ArgumentNullException(nameof(source));
  423. if (selector == null)
  424. throw new ArgumentNullException(nameof(selector));
  425. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  426. }
  427. private static MethodInfo s_AverageAsync__TSource__3__9;
  428. private static MethodInfo AverageAsync__TSource__3__9(Type TSource) =>
  429. (s_AverageAsync__TSource__3__9 ??
  430. (s_AverageAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, long>>, CancellationToken, ValueTask<double>>(AverageAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  431. public static ValueTask<double> AverageAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
  432. {
  433. if (source == null)
  434. throw new ArgumentNullException(nameof(source));
  435. if (selector == null)
  436. throw new ArgumentNullException(nameof(selector));
  437. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  438. }
  439. private static MethodInfo s_AverageAwaitAsync__TSource__3__0;
  440. private static MethodInfo AverageAwaitAsync__TSource__3__0(Type TSource) =>
  441. (s_AverageAwaitAsync__TSource__3__0 ??
  442. (s_AverageAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  443. public static ValueTask<decimal?> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  444. {
  445. if (source == null)
  446. throw new ArgumentNullException(nameof(source));
  447. if (selector == null)
  448. throw new ArgumentNullException(nameof(selector));
  449. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  450. }
  451. private static MethodInfo s_AverageAwaitAsync__TSource__3__1;
  452. private static MethodInfo AverageAwaitAsync__TSource__3__1(Type TSource) =>
  453. (s_AverageAwaitAsync__TSource__3__1 ??
  454. (s_AverageAwaitAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  455. public static ValueTask<decimal> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  456. {
  457. if (source == null)
  458. throw new ArgumentNullException(nameof(source));
  459. if (selector == null)
  460. throw new ArgumentNullException(nameof(selector));
  461. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAwaitAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  462. }
  463. private static MethodInfo s_AverageAwaitAsync__TSource__3__2;
  464. private static MethodInfo AverageAwaitAsync__TSource__3__2(Type TSource) =>
  465. (s_AverageAwaitAsync__TSource__3__2 ??
  466. (s_AverageAwaitAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  467. public static ValueTask<double?> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  468. {
  469. if (source == null)
  470. throw new ArgumentNullException(nameof(source));
  471. if (selector == null)
  472. throw new ArgumentNullException(nameof(selector));
  473. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  474. }
  475. private static MethodInfo s_AverageAwaitAsync__TSource__3__3;
  476. private static MethodInfo AverageAwaitAsync__TSource__3__3(Type TSource) =>
  477. (s_AverageAwaitAsync__TSource__3__3 ??
  478. (s_AverageAwaitAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double>>>, CancellationToken, ValueTask<double>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  479. public static ValueTask<double> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  480. {
  481. if (source == null)
  482. throw new ArgumentNullException(nameof(source));
  483. if (selector == null)
  484. throw new ArgumentNullException(nameof(selector));
  485. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  486. }
  487. private static MethodInfo s_AverageAwaitAsync__TSource__3__4;
  488. private static MethodInfo AverageAwaitAsync__TSource__3__4(Type TSource) =>
  489. (s_AverageAwaitAsync__TSource__3__4 ??
  490. (s_AverageAwaitAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  491. public static ValueTask<float?> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  492. {
  493. if (source == null)
  494. throw new ArgumentNullException(nameof(source));
  495. if (selector == null)
  496. throw new ArgumentNullException(nameof(selector));
  497. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAwaitAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  498. }
  499. private static MethodInfo s_AverageAwaitAsync__TSource__3__5;
  500. private static MethodInfo AverageAwaitAsync__TSource__3__5(Type TSource) =>
  501. (s_AverageAwaitAsync__TSource__3__5 ??
  502. (s_AverageAwaitAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float>>>, CancellationToken, ValueTask<float>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  503. public static ValueTask<float> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  504. {
  505. if (source == null)
  506. throw new ArgumentNullException(nameof(source));
  507. if (selector == null)
  508. throw new ArgumentNullException(nameof(selector));
  509. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAwaitAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  510. }
  511. private static MethodInfo s_AverageAwaitAsync__TSource__3__6;
  512. private static MethodInfo AverageAwaitAsync__TSource__3__6(Type TSource) =>
  513. (s_AverageAwaitAsync__TSource__3__6 ??
  514. (s_AverageAwaitAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  515. public static ValueTask<double?> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  516. {
  517. if (source == null)
  518. throw new ArgumentNullException(nameof(source));
  519. if (selector == null)
  520. throw new ArgumentNullException(nameof(selector));
  521. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  522. }
  523. private static MethodInfo s_AverageAwaitAsync__TSource__3__7;
  524. private static MethodInfo AverageAwaitAsync__TSource__3__7(Type TSource) =>
  525. (s_AverageAwaitAsync__TSource__3__7 ??
  526. (s_AverageAwaitAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int>>>, CancellationToken, ValueTask<double>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  527. public static ValueTask<double> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  528. {
  529. if (source == null)
  530. throw new ArgumentNullException(nameof(source));
  531. if (selector == null)
  532. throw new ArgumentNullException(nameof(selector));
  533. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  534. }
  535. private static MethodInfo s_AverageAwaitAsync__TSource__3__8;
  536. private static MethodInfo AverageAwaitAsync__TSource__3__8(Type TSource) =>
  537. (s_AverageAwaitAsync__TSource__3__8 ??
  538. (s_AverageAwaitAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  539. public static ValueTask<double?> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  540. {
  541. if (source == null)
  542. throw new ArgumentNullException(nameof(source));
  543. if (selector == null)
  544. throw new ArgumentNullException(nameof(selector));
  545. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  546. }
  547. private static MethodInfo s_AverageAwaitAsync__TSource__3__9;
  548. private static MethodInfo AverageAwaitAsync__TSource__3__9(Type TSource) =>
  549. (s_AverageAwaitAsync__TSource__3__9 ??
  550. (s_AverageAwaitAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long>>>, CancellationToken, ValueTask<double>>(AverageAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  551. public static ValueTask<double> AverageAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  552. {
  553. if (source == null)
  554. throw new ArgumentNullException(nameof(source));
  555. if (selector == null)
  556. throw new ArgumentNullException(nameof(selector));
  557. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  558. }
  559. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__0;
  560. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  561. (s_AverageAwaitWithCancellationAsync__TSource__3__0 ??
  562. (s_AverageAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  563. public static ValueTask<decimal?> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  564. {
  565. if (source == null)
  566. throw new ArgumentNullException(nameof(source));
  567. if (selector == null)
  568. throw new ArgumentNullException(nameof(selector));
  569. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  570. }
  571. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__1;
  572. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__1(Type TSource) =>
  573. (s_AverageAwaitWithCancellationAsync__TSource__3__1 ??
  574. (s_AverageAwaitWithCancellationAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  575. public static ValueTask<decimal> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  576. {
  577. if (source == null)
  578. throw new ArgumentNullException(nameof(source));
  579. if (selector == null)
  580. throw new ArgumentNullException(nameof(selector));
  581. return source.Provider.ExecuteAsync<decimal>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  582. }
  583. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__2;
  584. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__2(Type TSource) =>
  585. (s_AverageAwaitWithCancellationAsync__TSource__3__2 ??
  586. (s_AverageAwaitWithCancellationAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  587. public static ValueTask<double?> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  588. {
  589. if (source == null)
  590. throw new ArgumentNullException(nameof(source));
  591. if (selector == null)
  592. throw new ArgumentNullException(nameof(selector));
  593. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  594. }
  595. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__3;
  596. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__3(Type TSource) =>
  597. (s_AverageAwaitWithCancellationAsync__TSource__3__3 ??
  598. (s_AverageAwaitWithCancellationAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double>>>, CancellationToken, ValueTask<double>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  599. public static ValueTask<double> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  600. {
  601. if (source == null)
  602. throw new ArgumentNullException(nameof(source));
  603. if (selector == null)
  604. throw new ArgumentNullException(nameof(selector));
  605. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  606. }
  607. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__4;
  608. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__4(Type TSource) =>
  609. (s_AverageAwaitWithCancellationAsync__TSource__3__4 ??
  610. (s_AverageAwaitWithCancellationAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  611. public static ValueTask<float?> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  612. {
  613. if (source == null)
  614. throw new ArgumentNullException(nameof(source));
  615. if (selector == null)
  616. throw new ArgumentNullException(nameof(selector));
  617. return source.Provider.ExecuteAsync<float?>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  618. }
  619. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__5;
  620. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__5(Type TSource) =>
  621. (s_AverageAwaitWithCancellationAsync__TSource__3__5 ??
  622. (s_AverageAwaitWithCancellationAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float>>>, CancellationToken, ValueTask<float>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  623. public static ValueTask<float> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  624. {
  625. if (source == null)
  626. throw new ArgumentNullException(nameof(source));
  627. if (selector == null)
  628. throw new ArgumentNullException(nameof(selector));
  629. return source.Provider.ExecuteAsync<float>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  630. }
  631. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__6;
  632. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__6(Type TSource) =>
  633. (s_AverageAwaitWithCancellationAsync__TSource__3__6 ??
  634. (s_AverageAwaitWithCancellationAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  635. public static ValueTask<double?> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  636. {
  637. if (source == null)
  638. throw new ArgumentNullException(nameof(source));
  639. if (selector == null)
  640. throw new ArgumentNullException(nameof(selector));
  641. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  642. }
  643. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__7;
  644. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__7(Type TSource) =>
  645. (s_AverageAwaitWithCancellationAsync__TSource__3__7 ??
  646. (s_AverageAwaitWithCancellationAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int>>>, CancellationToken, ValueTask<double>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  647. public static ValueTask<double> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  648. {
  649. if (source == null)
  650. throw new ArgumentNullException(nameof(source));
  651. if (selector == null)
  652. throw new ArgumentNullException(nameof(selector));
  653. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  654. }
  655. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__8;
  656. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__8(Type TSource) =>
  657. (s_AverageAwaitWithCancellationAsync__TSource__3__8 ??
  658. (s_AverageAwaitWithCancellationAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long?>>>, CancellationToken, ValueTask<double?>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  659. public static ValueTask<double?> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  660. {
  661. if (source == null)
  662. throw new ArgumentNullException(nameof(source));
  663. if (selector == null)
  664. throw new ArgumentNullException(nameof(selector));
  665. return source.Provider.ExecuteAsync<double?>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  666. }
  667. private static MethodInfo s_AverageAwaitWithCancellationAsync__TSource__3__9;
  668. private static MethodInfo AverageAwaitWithCancellationAsync__TSource__3__9(Type TSource) =>
  669. (s_AverageAwaitWithCancellationAsync__TSource__3__9 ??
  670. (s_AverageAwaitWithCancellationAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long>>>, CancellationToken, ValueTask<double>>(AverageAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  671. public static ValueTask<double> AverageAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  672. {
  673. if (source == null)
  674. throw new ArgumentNullException(nameof(source));
  675. if (selector == null)
  676. throw new ArgumentNullException(nameof(selector));
  677. return source.Provider.ExecuteAsync<double>(Expression.Call(AverageAwaitWithCancellationAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  678. }
  679. private static MethodInfo s_Cast__TResult__1__0;
  680. private static MethodInfo Cast__TResult__1__0(Type TResult) =>
  681. (s_Cast__TResult__1__0 ??
  682. (s_Cast__TResult__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Cast<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TResult);
  683. public static IAsyncQueryable<TResult> Cast<TResult>(this IAsyncQueryable<object> source)
  684. {
  685. if (source == null)
  686. throw new ArgumentNullException(nameof(source));
  687. return source.Provider.CreateQuery<TResult>(Expression.Call(Cast__TResult__1__0(typeof(TResult)), source.Expression));
  688. }
  689. private static MethodInfo s_Concat__TSource__2__0;
  690. private static MethodInfo Concat__TSource__2__0(Type TSource) =>
  691. (s_Concat__TSource__2__0 ??
  692. (s_Concat__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Concat<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  693. public static IAsyncQueryable<TSource> Concat<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  694. {
  695. if (first == null)
  696. throw new ArgumentNullException(nameof(first));
  697. if (second == null)
  698. throw new ArgumentNullException(nameof(second));
  699. return first.Provider.CreateQuery<TSource>(Expression.Call(Concat__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  700. }
  701. private static MethodInfo s_ContainsAsync__TSource__3__0;
  702. private static MethodInfo ContainsAsync__TSource__3__0(Type TSource) =>
  703. (s_ContainsAsync__TSource__3__0 ??
  704. (s_ContainsAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, object, CancellationToken, ValueTask<bool>>(ContainsAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  705. public static ValueTask<bool> ContainsAsync<TSource>(this IAsyncQueryable<TSource> source, TSource value, CancellationToken cancellationToken = default)
  706. {
  707. if (source == null)
  708. throw new ArgumentNullException(nameof(source));
  709. return source.Provider.ExecuteAsync<bool>(Expression.Call(ContainsAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  710. }
  711. private static MethodInfo s_ContainsAsync__TSource__4__0;
  712. private static MethodInfo ContainsAsync__TSource__4__0(Type TSource) =>
  713. (s_ContainsAsync__TSource__4__0 ??
  714. (s_ContainsAsync__TSource__4__0 = new Func<IAsyncQueryable<object>, object, IEqualityComparer<object>, CancellationToken, ValueTask<bool>>(ContainsAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  715. public static ValueTask<bool> ContainsAsync<TSource>(this IAsyncQueryable<TSource> source, TSource value, IEqualityComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  716. {
  717. if (source == null)
  718. throw new ArgumentNullException(nameof(source));
  719. return source.Provider.ExecuteAsync<bool>(Expression.Call(ContainsAsync__TSource__4__0(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  720. }
  721. private static MethodInfo s_CountAsync__TSource__2__0;
  722. private static MethodInfo CountAsync__TSource__2__0(Type TSource) =>
  723. (s_CountAsync__TSource__2__0 ??
  724. (s_CountAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<int>>(CountAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  725. public static ValueTask<int> CountAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  726. {
  727. if (source == null)
  728. throw new ArgumentNullException(nameof(source));
  729. return source.Provider.ExecuteAsync<int>(Expression.Call(CountAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  730. }
  731. private static MethodInfo s_CountAsync__TSource__3__0;
  732. private static MethodInfo CountAsync__TSource__3__0(Type TSource) =>
  733. (s_CountAsync__TSource__3__0 ??
  734. (s_CountAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<int>>(CountAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  735. public static ValueTask<int> CountAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  736. {
  737. if (source == null)
  738. throw new ArgumentNullException(nameof(source));
  739. if (predicate == null)
  740. throw new ArgumentNullException(nameof(predicate));
  741. return source.Provider.ExecuteAsync<int>(Expression.Call(CountAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  742. }
  743. private static MethodInfo s_CountAwaitAsync__TSource__3__0;
  744. private static MethodInfo CountAwaitAsync__TSource__3__0(Type TSource) =>
  745. (s_CountAwaitAsync__TSource__3__0 ??
  746. (s_CountAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<int>>(CountAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  747. public static ValueTask<int> CountAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  748. {
  749. if (source == null)
  750. throw new ArgumentNullException(nameof(source));
  751. if (predicate == null)
  752. throw new ArgumentNullException(nameof(predicate));
  753. return source.Provider.ExecuteAsync<int>(Expression.Call(CountAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  754. }
  755. private static MethodInfo s_CountAwaitWithCancellationAsync__TSource__3__0;
  756. private static MethodInfo CountAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  757. (s_CountAwaitWithCancellationAsync__TSource__3__0 ??
  758. (s_CountAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<int>>(CountAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  759. public static ValueTask<int> CountAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  760. {
  761. if (source == null)
  762. throw new ArgumentNullException(nameof(source));
  763. if (predicate == null)
  764. throw new ArgumentNullException(nameof(predicate));
  765. return source.Provider.ExecuteAsync<int>(Expression.Call(CountAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  766. }
  767. private static MethodInfo s_DefaultIfEmpty__TSource__1__0;
  768. private static MethodInfo DefaultIfEmpty__TSource__1__0(Type TSource) =>
  769. (s_DefaultIfEmpty__TSource__1__0 ??
  770. (s_DefaultIfEmpty__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(DefaultIfEmpty<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  771. public static IAsyncQueryable<TSource> DefaultIfEmpty<TSource>(this IAsyncQueryable<TSource> source)
  772. {
  773. if (source == null)
  774. throw new ArgumentNullException(nameof(source));
  775. return source.Provider.CreateQuery<TSource>(Expression.Call(DefaultIfEmpty__TSource__1__0(typeof(TSource)), source.Expression));
  776. }
  777. private static MethodInfo s_DefaultIfEmpty__TSource__2__0;
  778. private static MethodInfo DefaultIfEmpty__TSource__2__0(Type TSource) =>
  779. (s_DefaultIfEmpty__TSource__2__0 ??
  780. (s_DefaultIfEmpty__TSource__2__0 = new Func<IAsyncQueryable<object>, object, IAsyncQueryable<object>>(DefaultIfEmpty<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  781. public static IAsyncQueryable<TSource> DefaultIfEmpty<TSource>(this IAsyncQueryable<TSource> source, TSource defaultValue)
  782. {
  783. if (source == null)
  784. throw new ArgumentNullException(nameof(source));
  785. return source.Provider.CreateQuery<TSource>(Expression.Call(DefaultIfEmpty__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(defaultValue, typeof(TSource))));
  786. }
  787. private static MethodInfo s_Distinct__TSource__1__0;
  788. private static MethodInfo Distinct__TSource__1__0(Type TSource) =>
  789. (s_Distinct__TSource__1__0 ??
  790. (s_Distinct__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Distinct<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  791. public static IAsyncQueryable<TSource> Distinct<TSource>(this IAsyncQueryable<TSource> source)
  792. {
  793. if (source == null)
  794. throw new ArgumentNullException(nameof(source));
  795. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource__1__0(typeof(TSource)), source.Expression));
  796. }
  797. private static MethodInfo s_Distinct__TSource__2__0;
  798. private static MethodInfo Distinct__TSource__2__0(Type TSource) =>
  799. (s_Distinct__TSource__2__0 ??
  800. (s_Distinct__TSource__2__0 = new Func<IAsyncQueryable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(Distinct<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  801. public static IAsyncQueryable<TSource> Distinct<TSource>(this IAsyncQueryable<TSource> source, IEqualityComparer<TSource>? comparer)
  802. {
  803. if (source == null)
  804. throw new ArgumentNullException(nameof(source));
  805. return source.Provider.CreateQuery<TSource>(Expression.Call(Distinct__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  806. }
  807. private static MethodInfo s_ElementAtAsync__TSource__3__0;
  808. private static MethodInfo ElementAtAsync__TSource__3__0(Type TSource) =>
  809. (s_ElementAtAsync__TSource__3__0 ??
  810. (s_ElementAtAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, int, CancellationToken, ValueTask<object>>(ElementAtAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  811. public static ValueTask<TSource> ElementAtAsync<TSource>(this IAsyncQueryable<TSource> source, int index, CancellationToken cancellationToken = default)
  812. {
  813. if (source == null)
  814. throw new ArgumentNullException(nameof(source));
  815. return source.Provider.ExecuteAsync<TSource>(Expression.Call(ElementAtAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  816. }
  817. private static MethodInfo s_ElementAtOrDefaultAsync__TSource__3__0;
  818. private static MethodInfo ElementAtOrDefaultAsync__TSource__3__0(Type TSource) =>
  819. (s_ElementAtOrDefaultAsync__TSource__3__0 ??
  820. (s_ElementAtOrDefaultAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, int, CancellationToken, ValueTask<object>>(ElementAtOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  821. public static ValueTask<TSource> ElementAtOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, int index, CancellationToken cancellationToken = default)
  822. {
  823. if (source == null)
  824. throw new ArgumentNullException(nameof(source));
  825. return source.Provider.ExecuteAsync<TSource>(Expression.Call(ElementAtOrDefaultAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  826. }
  827. private static MethodInfo s_Except__TSource__2__0;
  828. private static MethodInfo Except__TSource__2__0(Type TSource) =>
  829. (s_Except__TSource__2__0 ??
  830. (s_Except__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Except<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  831. public static IAsyncQueryable<TSource> Except<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  832. {
  833. if (first == null)
  834. throw new ArgumentNullException(nameof(first));
  835. if (second == null)
  836. throw new ArgumentNullException(nameof(second));
  837. return first.Provider.CreateQuery<TSource>(Expression.Call(Except__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  838. }
  839. private static MethodInfo s_Except__TSource__3__0;
  840. private static MethodInfo Except__TSource__3__0(Type TSource) =>
  841. (s_Except__TSource__3__0 ??
  842. (s_Except__TSource__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(Except<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  843. public static IAsyncQueryable<TSource> Except<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource>? comparer)
  844. {
  845. if (first == null)
  846. throw new ArgumentNullException(nameof(first));
  847. if (second == null)
  848. throw new ArgumentNullException(nameof(second));
  849. return first.Provider.CreateQuery<TSource>(Expression.Call(Except__TSource__3__0(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  850. }
  851. private static MethodInfo s_FirstAsync__TSource__2__0;
  852. private static MethodInfo FirstAsync__TSource__2__0(Type TSource) =>
  853. (s_FirstAsync__TSource__2__0 ??
  854. (s_FirstAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(FirstAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  855. public static ValueTask<TSource> FirstAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  856. {
  857. if (source == null)
  858. throw new ArgumentNullException(nameof(source));
  859. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  860. }
  861. private static MethodInfo s_FirstAsync__TSource__3__0;
  862. private static MethodInfo FirstAsync__TSource__3__0(Type TSource) =>
  863. (s_FirstAsync__TSource__3__0 ??
  864. (s_FirstAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(FirstAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  865. public static ValueTask<TSource> FirstAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  866. {
  867. if (source == null)
  868. throw new ArgumentNullException(nameof(source));
  869. if (predicate == null)
  870. throw new ArgumentNullException(nameof(predicate));
  871. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  872. }
  873. private static MethodInfo s_FirstAwaitAsync__TSource__3__0;
  874. private static MethodInfo FirstAwaitAsync__TSource__3__0(Type TSource) =>
  875. (s_FirstAwaitAsync__TSource__3__0 ??
  876. (s_FirstAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(FirstAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  877. public static ValueTask<TSource> FirstAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  878. {
  879. if (source == null)
  880. throw new ArgumentNullException(nameof(source));
  881. if (predicate == null)
  882. throw new ArgumentNullException(nameof(predicate));
  883. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  884. }
  885. private static MethodInfo s_FirstAwaitWithCancellationAsync__TSource__3__0;
  886. private static MethodInfo FirstAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  887. (s_FirstAwaitWithCancellationAsync__TSource__3__0 ??
  888. (s_FirstAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(FirstAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  889. public static ValueTask<TSource> FirstAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  890. {
  891. if (source == null)
  892. throw new ArgumentNullException(nameof(source));
  893. if (predicate == null)
  894. throw new ArgumentNullException(nameof(predicate));
  895. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  896. }
  897. private static MethodInfo s_FirstOrDefaultAsync__TSource__2__0;
  898. private static MethodInfo FirstOrDefaultAsync__TSource__2__0(Type TSource) =>
  899. (s_FirstOrDefaultAsync__TSource__2__0 ??
  900. (s_FirstOrDefaultAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(FirstOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  901. public static ValueTask<TSource> FirstOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  902. {
  903. if (source == null)
  904. throw new ArgumentNullException(nameof(source));
  905. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstOrDefaultAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  906. }
  907. private static MethodInfo s_FirstOrDefaultAsync__TSource__3__0;
  908. private static MethodInfo FirstOrDefaultAsync__TSource__3__0(Type TSource) =>
  909. (s_FirstOrDefaultAsync__TSource__3__0 ??
  910. (s_FirstOrDefaultAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(FirstOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  911. public static ValueTask<TSource> FirstOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  912. {
  913. if (source == null)
  914. throw new ArgumentNullException(nameof(source));
  915. if (predicate == null)
  916. throw new ArgumentNullException(nameof(predicate));
  917. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstOrDefaultAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  918. }
  919. private static MethodInfo s_FirstOrDefaultAwaitAsync__TSource__3__0;
  920. private static MethodInfo FirstOrDefaultAwaitAsync__TSource__3__0(Type TSource) =>
  921. (s_FirstOrDefaultAwaitAsync__TSource__3__0 ??
  922. (s_FirstOrDefaultAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(FirstOrDefaultAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  923. public static ValueTask<TSource> FirstOrDefaultAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  924. {
  925. if (source == null)
  926. throw new ArgumentNullException(nameof(source));
  927. if (predicate == null)
  928. throw new ArgumentNullException(nameof(predicate));
  929. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstOrDefaultAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  930. }
  931. private static MethodInfo s_FirstOrDefaultAwaitWithCancellationAsync__TSource__3__0;
  932. private static MethodInfo FirstOrDefaultAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  933. (s_FirstOrDefaultAwaitWithCancellationAsync__TSource__3__0 ??
  934. (s_FirstOrDefaultAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(FirstOrDefaultAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  935. public static ValueTask<TSource> FirstOrDefaultAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  936. {
  937. if (source == null)
  938. throw new ArgumentNullException(nameof(source));
  939. if (predicate == null)
  940. throw new ArgumentNullException(nameof(predicate));
  941. return source.Provider.ExecuteAsync<TSource>(Expression.Call(FirstOrDefaultAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  942. }
  943. private static MethodInfo s_GroupBy__TSource_TKey__2__0;
  944. private static MethodInfo GroupBy__TSource_TKey__2__0(Type TSource, Type TKey) =>
  945. (s_GroupBy__TSource_TKey__2__0 ??
  946. (s_GroupBy__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  947. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  948. {
  949. if (source == null)
  950. throw new ArgumentNullException(nameof(source));
  951. if (keySelector == null)
  952. throw new ArgumentNullException(nameof(keySelector));
  953. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupBy__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  954. }
  955. private static MethodInfo s_GroupBy__TSource_TKey__3__0;
  956. private static MethodInfo GroupBy__TSource_TKey__3__0(Type TSource, Type TKey) =>
  957. (s_GroupBy__TSource_TKey__3__0 ??
  958. (s_GroupBy__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  959. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
  960. {
  961. if (source == null)
  962. throw new ArgumentNullException(nameof(source));
  963. if (keySelector == null)
  964. throw new ArgumentNullException(nameof(keySelector));
  965. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupBy__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  966. }
  967. private static MethodInfo s_GroupBy__TSource_TKey_TResult__3__0;
  968. private static MethodInfo GroupBy__TSource_TKey_TResult__3__0(Type TSource, Type TKey, Type TResult) =>
  969. (s_GroupBy__TSource_TKey_TResult__3__0 ??
  970. (s_GroupBy__TSource_TKey_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IAsyncQueryable<object>>(GroupBy<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  971. public static IAsyncQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, TResult>> resultSelector)
  972. {
  973. if (source == null)
  974. throw new ArgumentNullException(nameof(source));
  975. if (keySelector == null)
  976. throw new ArgumentNullException(nameof(keySelector));
  977. if (resultSelector == null)
  978. throw new ArgumentNullException(nameof(resultSelector));
  979. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupBy__TSource_TKey_TResult__3__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector));
  980. }
  981. private static MethodInfo s_GroupBy__TSource_TKey_TElement__3__0;
  982. private static MethodInfo GroupBy__TSource_TKey_TElement__3__0(Type TSource, Type TKey, Type TElement) =>
  983. (s_GroupBy__TSource_TKey_TElement__3__0 ??
  984. (s_GroupBy__TSource_TKey_TElement__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupBy<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  985. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector)
  986. {
  987. if (source == null)
  988. throw new ArgumentNullException(nameof(source));
  989. if (keySelector == null)
  990. throw new ArgumentNullException(nameof(keySelector));
  991. if (elementSelector == null)
  992. throw new ArgumentNullException(nameof(elementSelector));
  993. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupBy__TSource_TKey_TElement__3__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector));
  994. }
  995. private static MethodInfo s_GroupBy__TSource_TKey_TResult__4__0;
  996. private static MethodInfo GroupBy__TSource_TKey_TResult__4__0(Type TSource, Type TKey, Type TResult) =>
  997. (s_GroupBy__TSource_TKey_TResult__4__0 ??
  998. (s_GroupBy__TSource_TKey_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupBy<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  999. public static IAsyncQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
  1000. {
  1001. if (source == null)
  1002. throw new ArgumentNullException(nameof(source));
  1003. if (keySelector == null)
  1004. throw new ArgumentNullException(nameof(keySelector));
  1005. if (resultSelector == null)
  1006. throw new ArgumentNullException(nameof(resultSelector));
  1007. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupBy__TSource_TKey_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1008. }
  1009. private static MethodInfo s_GroupBy__TSource_TKey_TElement__4__0;
  1010. private static MethodInfo GroupBy__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  1011. (s_GroupBy__TSource_TKey_TElement__4__0 ??
  1012. (s_GroupBy__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupBy<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  1013. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer)
  1014. {
  1015. if (source == null)
  1016. throw new ArgumentNullException(nameof(source));
  1017. if (keySelector == null)
  1018. throw new ArgumentNullException(nameof(keySelector));
  1019. if (elementSelector == null)
  1020. throw new ArgumentNullException(nameof(elementSelector));
  1021. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupBy__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1022. }
  1023. private static MethodInfo s_GroupBy__TSource_TKey_TElement_TResult__4__0;
  1024. private static MethodInfo GroupBy__TSource_TKey_TElement_TResult__4__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1025. (s_GroupBy__TSource_TKey_TElement_TResult__4__0 ??
  1026. (s_GroupBy__TSource_TKey_TElement_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IAsyncQueryable<object>>(GroupBy<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1027. public static IAsyncQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, TResult>> resultSelector)
  1028. {
  1029. if (source == null)
  1030. throw new ArgumentNullException(nameof(source));
  1031. if (keySelector == null)
  1032. throw new ArgumentNullException(nameof(keySelector));
  1033. if (elementSelector == null)
  1034. throw new ArgumentNullException(nameof(elementSelector));
  1035. if (resultSelector == null)
  1036. throw new ArgumentNullException(nameof(resultSelector));
  1037. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupBy__TSource_TKey_TElement_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector));
  1038. }
  1039. private static MethodInfo s_GroupBy__TSource_TKey_TElement_TResult__5__0;
  1040. private static MethodInfo GroupBy__TSource_TKey_TElement_TResult__5__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1041. (s_GroupBy__TSource_TKey_TElement_TResult__5__0 ??
  1042. (s_GroupBy__TSource_TKey_TElement_TResult__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupBy<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1043. public static IAsyncQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
  1044. {
  1045. if (source == null)
  1046. throw new ArgumentNullException(nameof(source));
  1047. if (keySelector == null)
  1048. throw new ArgumentNullException(nameof(keySelector));
  1049. if (elementSelector == null)
  1050. throw new ArgumentNullException(nameof(elementSelector));
  1051. if (resultSelector == null)
  1052. throw new ArgumentNullException(nameof(resultSelector));
  1053. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupBy__TSource_TKey_TElement_TResult__5__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1054. }
  1055. private static MethodInfo s_GroupByAwait__TSource_TKey__2__0;
  1056. private static MethodInfo GroupByAwait__TSource_TKey__2__0(Type TSource, Type TKey) =>
  1057. (s_GroupByAwait__TSource_TKey__2__0 ??
  1058. (s_GroupByAwait__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1059. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupByAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  1060. {
  1061. if (source == null)
  1062. throw new ArgumentNullException(nameof(source));
  1063. if (keySelector == null)
  1064. throw new ArgumentNullException(nameof(keySelector));
  1065. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupByAwait__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  1066. }
  1067. private static MethodInfo s_GroupByAwait__TSource_TKey__3__0;
  1068. private static MethodInfo GroupByAwait__TSource_TKey__3__0(Type TSource, Type TKey) =>
  1069. (s_GroupByAwait__TSource_TKey__3__0 ??
  1070. (s_GroupByAwait__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1071. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupByAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  1072. {
  1073. if (source == null)
  1074. throw new ArgumentNullException(nameof(source));
  1075. if (keySelector == null)
  1076. throw new ArgumentNullException(nameof(keySelector));
  1077. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupByAwait__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1078. }
  1079. private static MethodInfo s_GroupByAwait__TSource_TKey_TResult__3__0;
  1080. private static MethodInfo GroupByAwait__TSource_TKey_TResult__3__0(Type TSource, Type TKey, Type TResult) =>
  1081. (s_GroupByAwait__TSource_TKey_TResult__3__0 ??
  1082. (s_GroupByAwait__TSource_TKey_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IAsyncQueryable<object>>(GroupByAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  1083. public static IAsyncQueryable<TResult> GroupByAwait<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, ValueTask<TResult>>> resultSelector)
  1084. {
  1085. if (source == null)
  1086. throw new ArgumentNullException(nameof(source));
  1087. if (keySelector == null)
  1088. throw new ArgumentNullException(nameof(keySelector));
  1089. if (resultSelector == null)
  1090. throw new ArgumentNullException(nameof(resultSelector));
  1091. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwait__TSource_TKey_TResult__3__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector));
  1092. }
  1093. private static MethodInfo s_GroupByAwait__TSource_TKey_TElement__3__0;
  1094. private static MethodInfo GroupByAwait__TSource_TKey_TElement__3__0(Type TSource, Type TKey, Type TElement) =>
  1095. (s_GroupByAwait__TSource_TKey_TElement__3__0 ??
  1096. (s_GroupByAwait__TSource_TKey_TElement__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  1097. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupByAwait<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector)
  1098. {
  1099. if (source == null)
  1100. throw new ArgumentNullException(nameof(source));
  1101. if (keySelector == null)
  1102. throw new ArgumentNullException(nameof(keySelector));
  1103. if (elementSelector == null)
  1104. throw new ArgumentNullException(nameof(elementSelector));
  1105. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupByAwait__TSource_TKey_TElement__3__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector));
  1106. }
  1107. private static MethodInfo s_GroupByAwait__TSource_TKey_TResult__4__0;
  1108. private static MethodInfo GroupByAwait__TSource_TKey_TResult__4__0(Type TSource, Type TKey, Type TResult) =>
  1109. (s_GroupByAwait__TSource_TKey_TResult__4__0 ??
  1110. (s_GroupByAwait__TSource_TKey_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupByAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  1111. public static IAsyncQueryable<TResult> GroupByAwait<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1112. {
  1113. if (source == null)
  1114. throw new ArgumentNullException(nameof(source));
  1115. if (keySelector == null)
  1116. throw new ArgumentNullException(nameof(keySelector));
  1117. if (resultSelector == null)
  1118. throw new ArgumentNullException(nameof(resultSelector));
  1119. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwait__TSource_TKey_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1120. }
  1121. private static MethodInfo s_GroupByAwait__TSource_TKey_TElement__4__0;
  1122. private static MethodInfo GroupByAwait__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  1123. (s_GroupByAwait__TSource_TKey_TElement__4__0 ??
  1124. (s_GroupByAwait__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  1125. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupByAwait<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer)
  1126. {
  1127. if (source == null)
  1128. throw new ArgumentNullException(nameof(source));
  1129. if (keySelector == null)
  1130. throw new ArgumentNullException(nameof(keySelector));
  1131. if (elementSelector == null)
  1132. throw new ArgumentNullException(nameof(elementSelector));
  1133. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupByAwait__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1134. }
  1135. private static MethodInfo s_GroupByAwait__TSource_TKey_TElement_TResult__4__0;
  1136. private static MethodInfo GroupByAwait__TSource_TKey_TElement_TResult__4__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1137. (s_GroupByAwait__TSource_TKey_TElement_TResult__4__0 ??
  1138. (s_GroupByAwait__TSource_TKey_TElement_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IAsyncQueryable<object>>(GroupByAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1139. public static IAsyncQueryable<TResult> GroupByAwait<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, ValueTask<TResult>>> resultSelector)
  1140. {
  1141. if (source == null)
  1142. throw new ArgumentNullException(nameof(source));
  1143. if (keySelector == null)
  1144. throw new ArgumentNullException(nameof(keySelector));
  1145. if (elementSelector == null)
  1146. throw new ArgumentNullException(nameof(elementSelector));
  1147. if (resultSelector == null)
  1148. throw new ArgumentNullException(nameof(resultSelector));
  1149. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwait__TSource_TKey_TElement_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector));
  1150. }
  1151. private static MethodInfo s_GroupByAwait__TSource_TKey_TElement_TResult__5__0;
  1152. private static MethodInfo GroupByAwait__TSource_TKey_TElement_TResult__5__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1153. (s_GroupByAwait__TSource_TKey_TElement_TResult__5__0 ??
  1154. (s_GroupByAwait__TSource_TKey_TElement_TResult__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupByAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1155. public static IAsyncQueryable<TResult> GroupByAwait<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1156. {
  1157. if (source == null)
  1158. throw new ArgumentNullException(nameof(source));
  1159. if (keySelector == null)
  1160. throw new ArgumentNullException(nameof(keySelector));
  1161. if (elementSelector == null)
  1162. throw new ArgumentNullException(nameof(elementSelector));
  1163. if (resultSelector == null)
  1164. throw new ArgumentNullException(nameof(resultSelector));
  1165. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwait__TSource_TKey_TElement_TResult__5__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1166. }
  1167. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey__2__0;
  1168. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey__2__0(Type TSource, Type TKey) =>
  1169. (s_GroupByAwaitWithCancellation__TSource_TKey__2__0 ??
  1170. (s_GroupByAwaitWithCancellation__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1171. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupByAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  1172. {
  1173. if (source == null)
  1174. throw new ArgumentNullException(nameof(source));
  1175. if (keySelector == null)
  1176. throw new ArgumentNullException(nameof(keySelector));
  1177. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  1178. }
  1179. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey__3__0;
  1180. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey__3__0(Type TSource, Type TKey) =>
  1181. (s_GroupByAwaitWithCancellation__TSource_TKey__3__0 ??
  1182. (s_GroupByAwaitWithCancellation__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  1183. public static IAsyncQueryable<IAsyncGrouping<TKey, TSource>> GroupByAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer)
  1184. {
  1185. if (source == null)
  1186. throw new ArgumentNullException(nameof(source));
  1187. if (keySelector == null)
  1188. throw new ArgumentNullException(nameof(keySelector));
  1189. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TSource>>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1190. }
  1191. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TResult__3__0;
  1192. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TResult__3__0(Type TSource, Type TKey, Type TResult) =>
  1193. (s_GroupByAwaitWithCancellation__TSource_TKey_TResult__3__0 ??
  1194. (s_GroupByAwaitWithCancellation__TSource_TKey_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(GroupByAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  1195. public static IAsyncQueryable<TResult> GroupByAwaitWithCancellation<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, CancellationToken, ValueTask<TResult>>> resultSelector)
  1196. {
  1197. if (source == null)
  1198. throw new ArgumentNullException(nameof(source));
  1199. if (keySelector == null)
  1200. throw new ArgumentNullException(nameof(keySelector));
  1201. if (resultSelector == null)
  1202. throw new ArgumentNullException(nameof(resultSelector));
  1203. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TResult__3__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector));
  1204. }
  1205. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TElement__3__0;
  1206. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TElement__3__0(Type TSource, Type TKey, Type TElement) =>
  1207. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement__3__0 ??
  1208. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  1209. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupByAwaitWithCancellation<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector)
  1210. {
  1211. if (source == null)
  1212. throw new ArgumentNullException(nameof(source));
  1213. if (keySelector == null)
  1214. throw new ArgumentNullException(nameof(keySelector));
  1215. if (elementSelector == null)
  1216. throw new ArgumentNullException(nameof(elementSelector));
  1217. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TElement__3__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector));
  1218. }
  1219. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TResult__4__0;
  1220. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TResult__4__0(Type TSource, Type TKey, Type TResult) =>
  1221. (s_GroupByAwaitWithCancellation__TSource_TKey_TResult__4__0 ??
  1222. (s_GroupByAwaitWithCancellation__TSource_TKey_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupByAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TResult);
  1223. public static IAsyncQueryable<TResult> GroupByAwaitWithCancellation<TSource, TKey, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TKey, IAsyncEnumerable<TSource>, CancellationToken, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1224. {
  1225. if (source == null)
  1226. throw new ArgumentNullException(nameof(source));
  1227. if (keySelector == null)
  1228. throw new ArgumentNullException(nameof(keySelector));
  1229. if (resultSelector == null)
  1230. throw new ArgumentNullException(nameof(resultSelector));
  1231. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1232. }
  1233. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TElement__4__0;
  1234. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  1235. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement__4__0 ??
  1236. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<IAsyncGrouping<object, object>>>(GroupByAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  1237. public static IAsyncQueryable<IAsyncGrouping<TKey, TElement>> GroupByAwaitWithCancellation<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer)
  1238. {
  1239. if (source == null)
  1240. throw new ArgumentNullException(nameof(source));
  1241. if (keySelector == null)
  1242. throw new ArgumentNullException(nameof(keySelector));
  1243. if (elementSelector == null)
  1244. throw new ArgumentNullException(nameof(elementSelector));
  1245. return source.Provider.CreateQuery<IAsyncGrouping<TKey, TElement>>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1246. }
  1247. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__4__0;
  1248. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__4__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1249. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__4__0 ??
  1250. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(GroupByAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1251. public static IAsyncQueryable<TResult> GroupByAwaitWithCancellation<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, CancellationToken, ValueTask<TResult>>> resultSelector)
  1252. {
  1253. if (source == null)
  1254. throw new ArgumentNullException(nameof(source));
  1255. if (keySelector == null)
  1256. throw new ArgumentNullException(nameof(keySelector));
  1257. if (elementSelector == null)
  1258. throw new ArgumentNullException(nameof(elementSelector));
  1259. if (resultSelector == null)
  1260. throw new ArgumentNullException(nameof(resultSelector));
  1261. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__4__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector));
  1262. }
  1263. private static MethodInfo s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__5__0;
  1264. private static MethodInfo GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__5__0(Type TSource, Type TKey, Type TElement, Type TResult) =>
  1265. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__5__0 ??
  1266. (s_GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupByAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement, TResult);
  1267. public static IAsyncQueryable<TResult> GroupByAwaitWithCancellation<TSource, TKey, TElement, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, Expression<Func<TKey, IAsyncEnumerable<TElement>, CancellationToken, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1268. {
  1269. if (source == null)
  1270. throw new ArgumentNullException(nameof(source));
  1271. if (keySelector == null)
  1272. throw new ArgumentNullException(nameof(keySelector));
  1273. if (elementSelector == null)
  1274. throw new ArgumentNullException(nameof(elementSelector));
  1275. if (resultSelector == null)
  1276. throw new ArgumentNullException(nameof(resultSelector));
  1277. return source.Provider.CreateQuery<TResult>(Expression.Call(GroupByAwaitWithCancellation__TSource_TKey_TElement_TResult__5__0(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1278. }
  1279. private static MethodInfo s_GroupJoin__TOuter_TInner_TKey_TResult__5__0;
  1280. private static MethodInfo GroupJoin__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1281. (s_GroupJoin__TOuter_TInner_TKey_TResult__5__0 ??
  1282. (s_GroupJoin__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IAsyncQueryable<object>>(GroupJoin<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1283. public static IAsyncQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, TResult>> resultSelector)
  1284. {
  1285. if (outer == null)
  1286. throw new ArgumentNullException(nameof(outer));
  1287. if (inner == null)
  1288. throw new ArgumentNullException(nameof(inner));
  1289. if (outerKeySelector == null)
  1290. throw new ArgumentNullException(nameof(outerKeySelector));
  1291. if (innerKeySelector == null)
  1292. throw new ArgumentNullException(nameof(innerKeySelector));
  1293. if (resultSelector == null)
  1294. throw new ArgumentNullException(nameof(resultSelector));
  1295. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoin__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1296. }
  1297. private static MethodInfo s_GroupJoin__TOuter_TInner_TKey_TResult__6__0;
  1298. private static MethodInfo GroupJoin__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1299. (s_GroupJoin__TOuter_TInner_TKey_TResult__6__0 ??
  1300. (s_GroupJoin__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IAsyncEnumerable<object>, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupJoin<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1301. public static IAsyncQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
  1302. {
  1303. if (outer == null)
  1304. throw new ArgumentNullException(nameof(outer));
  1305. if (inner == null)
  1306. throw new ArgumentNullException(nameof(inner));
  1307. if (outerKeySelector == null)
  1308. throw new ArgumentNullException(nameof(outerKeySelector));
  1309. if (innerKeySelector == null)
  1310. throw new ArgumentNullException(nameof(innerKeySelector));
  1311. if (resultSelector == null)
  1312. throw new ArgumentNullException(nameof(resultSelector));
  1313. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoin__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1314. }
  1315. private static MethodInfo s_GroupJoinAwait__TOuter_TInner_TKey_TResult__5__0;
  1316. private static MethodInfo GroupJoinAwait__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1317. (s_GroupJoinAwait__TOuter_TInner_TKey_TResult__5__0 ??
  1318. (s_GroupJoinAwait__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IAsyncQueryable<object>>(GroupJoinAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1319. public static IAsyncQueryable<TResult> GroupJoinAwait<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, ValueTask<TResult>>> resultSelector)
  1320. {
  1321. if (outer == null)
  1322. throw new ArgumentNullException(nameof(outer));
  1323. if (inner == null)
  1324. throw new ArgumentNullException(nameof(inner));
  1325. if (outerKeySelector == null)
  1326. throw new ArgumentNullException(nameof(outerKeySelector));
  1327. if (innerKeySelector == null)
  1328. throw new ArgumentNullException(nameof(innerKeySelector));
  1329. if (resultSelector == null)
  1330. throw new ArgumentNullException(nameof(resultSelector));
  1331. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoinAwait__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1332. }
  1333. private static MethodInfo s_GroupJoinAwait__TOuter_TInner_TKey_TResult__6__0;
  1334. private static MethodInfo GroupJoinAwait__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1335. (s_GroupJoinAwait__TOuter_TInner_TKey_TResult__6__0 ??
  1336. (s_GroupJoinAwait__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupJoinAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1337. public static IAsyncQueryable<TResult> GroupJoinAwait<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1338. {
  1339. if (outer == null)
  1340. throw new ArgumentNullException(nameof(outer));
  1341. if (inner == null)
  1342. throw new ArgumentNullException(nameof(inner));
  1343. if (outerKeySelector == null)
  1344. throw new ArgumentNullException(nameof(outerKeySelector));
  1345. if (innerKeySelector == null)
  1346. throw new ArgumentNullException(nameof(innerKeySelector));
  1347. if (resultSelector == null)
  1348. throw new ArgumentNullException(nameof(resultSelector));
  1349. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoinAwait__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1350. }
  1351. private static MethodInfo s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0;
  1352. private static MethodInfo GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1353. (s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0 ??
  1354. (s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(GroupJoinAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1355. public static IAsyncQueryable<TResult> GroupJoinAwaitWithCancellation<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, CancellationToken, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, CancellationToken, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, CancellationToken, ValueTask<TResult>>> resultSelector)
  1356. {
  1357. if (outer == null)
  1358. throw new ArgumentNullException(nameof(outer));
  1359. if (inner == null)
  1360. throw new ArgumentNullException(nameof(inner));
  1361. if (outerKeySelector == null)
  1362. throw new ArgumentNullException(nameof(outerKeySelector));
  1363. if (innerKeySelector == null)
  1364. throw new ArgumentNullException(nameof(innerKeySelector));
  1365. if (resultSelector == null)
  1366. throw new ArgumentNullException(nameof(resultSelector));
  1367. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1368. }
  1369. private static MethodInfo s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0;
  1370. private static MethodInfo GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1371. (s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0 ??
  1372. (s_GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, IAsyncEnumerable<object>, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(GroupJoinAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1373. public static IAsyncQueryable<TResult> GroupJoinAwaitWithCancellation<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, CancellationToken, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, CancellationToken, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, IAsyncEnumerable<TInner>, CancellationToken, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1374. {
  1375. if (outer == null)
  1376. throw new ArgumentNullException(nameof(outer));
  1377. if (inner == null)
  1378. throw new ArgumentNullException(nameof(inner));
  1379. if (outerKeySelector == null)
  1380. throw new ArgumentNullException(nameof(outerKeySelector));
  1381. if (innerKeySelector == null)
  1382. throw new ArgumentNullException(nameof(innerKeySelector));
  1383. if (resultSelector == null)
  1384. throw new ArgumentNullException(nameof(resultSelector));
  1385. return outer.Provider.CreateQuery<TResult>(Expression.Call(GroupJoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1386. }
  1387. private static MethodInfo s_Intersect__TSource__2__0;
  1388. private static MethodInfo Intersect__TSource__2__0(Type TSource) =>
  1389. (s_Intersect__TSource__2__0 ??
  1390. (s_Intersect__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Intersect<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1391. public static IAsyncQueryable<TSource> Intersect<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  1392. {
  1393. if (first == null)
  1394. throw new ArgumentNullException(nameof(first));
  1395. if (second == null)
  1396. throw new ArgumentNullException(nameof(second));
  1397. return first.Provider.CreateQuery<TSource>(Expression.Call(Intersect__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  1398. }
  1399. private static MethodInfo s_Intersect__TSource__3__0;
  1400. private static MethodInfo Intersect__TSource__3__0(Type TSource) =>
  1401. (s_Intersect__TSource__3__0 ??
  1402. (s_Intersect__TSource__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(Intersect<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1403. public static IAsyncQueryable<TSource> Intersect<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource>? comparer)
  1404. {
  1405. if (first == null)
  1406. throw new ArgumentNullException(nameof(first));
  1407. if (second == null)
  1408. throw new ArgumentNullException(nameof(second));
  1409. return first.Provider.CreateQuery<TSource>(Expression.Call(Intersect__TSource__3__0(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  1410. }
  1411. private static MethodInfo s_Join__TOuter_TInner_TKey_TResult__5__0;
  1412. private static MethodInfo Join__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1413. (s_Join__TOuter_TInner_TKey_TResult__5__0 ??
  1414. (s_Join__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(Join<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1415. public static IAsyncQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
  1416. {
  1417. if (outer == null)
  1418. throw new ArgumentNullException(nameof(outer));
  1419. if (inner == null)
  1420. throw new ArgumentNullException(nameof(inner));
  1421. if (outerKeySelector == null)
  1422. throw new ArgumentNullException(nameof(outerKeySelector));
  1423. if (innerKeySelector == null)
  1424. throw new ArgumentNullException(nameof(innerKeySelector));
  1425. if (resultSelector == null)
  1426. throw new ArgumentNullException(nameof(resultSelector));
  1427. return outer.Provider.CreateQuery<TResult>(Expression.Call(Join__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1428. }
  1429. private static MethodInfo s_Join__TOuter_TInner_TKey_TResult__6__0;
  1430. private static MethodInfo Join__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1431. (s_Join__TOuter_TInner_TKey_TResult__6__0 ??
  1432. (s_Join__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, object, object>>, IEqualityComparer<object>, IAsyncQueryable<object>>(Join<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1433. public static IAsyncQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
  1434. {
  1435. if (outer == null)
  1436. throw new ArgumentNullException(nameof(outer));
  1437. if (inner == null)
  1438. throw new ArgumentNullException(nameof(inner));
  1439. if (outerKeySelector == null)
  1440. throw new ArgumentNullException(nameof(outerKeySelector));
  1441. if (innerKeySelector == null)
  1442. throw new ArgumentNullException(nameof(innerKeySelector));
  1443. if (resultSelector == null)
  1444. throw new ArgumentNullException(nameof(resultSelector));
  1445. return outer.Provider.CreateQuery<TResult>(Expression.Call(Join__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1446. }
  1447. private static MethodInfo s_JoinAwait__TOuter_TInner_TKey_TResult__5__0;
  1448. private static MethodInfo JoinAwait__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1449. (s_JoinAwait__TOuter_TInner_TKey_TResult__5__0 ??
  1450. (s_JoinAwait__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(JoinAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1451. public static IAsyncQueryable<TResult> JoinAwait<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, TInner, ValueTask<TResult>>> resultSelector)
  1452. {
  1453. if (outer == null)
  1454. throw new ArgumentNullException(nameof(outer));
  1455. if (inner == null)
  1456. throw new ArgumentNullException(nameof(inner));
  1457. if (outerKeySelector == null)
  1458. throw new ArgumentNullException(nameof(outerKeySelector));
  1459. if (innerKeySelector == null)
  1460. throw new ArgumentNullException(nameof(innerKeySelector));
  1461. if (resultSelector == null)
  1462. throw new ArgumentNullException(nameof(resultSelector));
  1463. return outer.Provider.CreateQuery<TResult>(Expression.Call(JoinAwait__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1464. }
  1465. private static MethodInfo s_JoinAwait__TOuter_TInner_TKey_TResult__6__0;
  1466. private static MethodInfo JoinAwait__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1467. (s_JoinAwait__TOuter_TInner_TKey_TResult__6__0 ??
  1468. (s_JoinAwait__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, object, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(JoinAwait<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1469. public static IAsyncQueryable<TResult> JoinAwait<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, TInner, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1470. {
  1471. if (outer == null)
  1472. throw new ArgumentNullException(nameof(outer));
  1473. if (inner == null)
  1474. throw new ArgumentNullException(nameof(inner));
  1475. if (outerKeySelector == null)
  1476. throw new ArgumentNullException(nameof(outerKeySelector));
  1477. if (innerKeySelector == null)
  1478. throw new ArgumentNullException(nameof(innerKeySelector));
  1479. if (resultSelector == null)
  1480. throw new ArgumentNullException(nameof(resultSelector));
  1481. return outer.Provider.CreateQuery<TResult>(Expression.Call(JoinAwait__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1482. }
  1483. private static MethodInfo s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0;
  1484. private static MethodInfo JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1485. (s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0 ??
  1486. (s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(JoinAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1487. public static IAsyncQueryable<TResult> JoinAwaitWithCancellation<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, CancellationToken, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, CancellationToken, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, TInner, CancellationToken, ValueTask<TResult>>> resultSelector)
  1488. {
  1489. if (outer == null)
  1490. throw new ArgumentNullException(nameof(outer));
  1491. if (inner == null)
  1492. throw new ArgumentNullException(nameof(inner));
  1493. if (outerKeySelector == null)
  1494. throw new ArgumentNullException(nameof(outerKeySelector));
  1495. if (innerKeySelector == null)
  1496. throw new ArgumentNullException(nameof(innerKeySelector));
  1497. if (resultSelector == null)
  1498. throw new ArgumentNullException(nameof(resultSelector));
  1499. return outer.Provider.CreateQuery<TResult>(Expression.Call(JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__5__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector));
  1500. }
  1501. private static MethodInfo s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0;
  1502. private static MethodInfo JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0(Type TOuter, Type TInner, Type TKey, Type TResult) =>
  1503. (s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0 ??
  1504. (s_JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, IAsyncQueryable<object>>(JoinAwaitWithCancellation<object, object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TOuter, TInner, TKey, TResult);
  1505. public static IAsyncQueryable<TResult> JoinAwaitWithCancellation<TOuter, TInner, TKey, TResult>(this IAsyncQueryable<TOuter> outer, IAsyncEnumerable<TInner> inner, Expression<Func<TOuter, CancellationToken, ValueTask<TKey>>> outerKeySelector, Expression<Func<TInner, CancellationToken, ValueTask<TKey>>> innerKeySelector, Expression<Func<TOuter, TInner, CancellationToken, ValueTask<TResult>>> resultSelector, IEqualityComparer<TKey>? comparer)
  1506. {
  1507. if (outer == null)
  1508. throw new ArgumentNullException(nameof(outer));
  1509. if (inner == null)
  1510. throw new ArgumentNullException(nameof(inner));
  1511. if (outerKeySelector == null)
  1512. throw new ArgumentNullException(nameof(outerKeySelector));
  1513. if (innerKeySelector == null)
  1514. throw new ArgumentNullException(nameof(innerKeySelector));
  1515. if (resultSelector == null)
  1516. throw new ArgumentNullException(nameof(resultSelector));
  1517. return outer.Provider.CreateQuery<TResult>(Expression.Call(JoinAwaitWithCancellation__TOuter_TInner_TKey_TResult__6__0(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
  1518. }
  1519. private static MethodInfo s_LastAsync__TSource__2__0;
  1520. private static MethodInfo LastAsync__TSource__2__0(Type TSource) =>
  1521. (s_LastAsync__TSource__2__0 ??
  1522. (s_LastAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(LastAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1523. public static ValueTask<TSource> LastAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  1524. {
  1525. if (source == null)
  1526. throw new ArgumentNullException(nameof(source));
  1527. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1528. }
  1529. private static MethodInfo s_LastAsync__TSource__3__0;
  1530. private static MethodInfo LastAsync__TSource__3__0(Type TSource) =>
  1531. (s_LastAsync__TSource__3__0 ??
  1532. (s_LastAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(LastAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1533. public static ValueTask<TSource> LastAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  1534. {
  1535. if (source == null)
  1536. throw new ArgumentNullException(nameof(source));
  1537. if (predicate == null)
  1538. throw new ArgumentNullException(nameof(predicate));
  1539. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1540. }
  1541. private static MethodInfo s_LastAwaitAsync__TSource__3__0;
  1542. private static MethodInfo LastAwaitAsync__TSource__3__0(Type TSource) =>
  1543. (s_LastAwaitAsync__TSource__3__0 ??
  1544. (s_LastAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(LastAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1545. public static ValueTask<TSource> LastAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1546. {
  1547. if (source == null)
  1548. throw new ArgumentNullException(nameof(source));
  1549. if (predicate == null)
  1550. throw new ArgumentNullException(nameof(predicate));
  1551. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1552. }
  1553. private static MethodInfo s_LastAwaitWithCancellationAsync__TSource__3__0;
  1554. private static MethodInfo LastAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  1555. (s_LastAwaitWithCancellationAsync__TSource__3__0 ??
  1556. (s_LastAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(LastAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1557. public static ValueTask<TSource> LastAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1558. {
  1559. if (source == null)
  1560. throw new ArgumentNullException(nameof(source));
  1561. if (predicate == null)
  1562. throw new ArgumentNullException(nameof(predicate));
  1563. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1564. }
  1565. private static MethodInfo s_LastOrDefaultAsync__TSource__2__0;
  1566. private static MethodInfo LastOrDefaultAsync__TSource__2__0(Type TSource) =>
  1567. (s_LastOrDefaultAsync__TSource__2__0 ??
  1568. (s_LastOrDefaultAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(LastOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1569. public static ValueTask<TSource> LastOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  1570. {
  1571. if (source == null)
  1572. throw new ArgumentNullException(nameof(source));
  1573. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastOrDefaultAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1574. }
  1575. private static MethodInfo s_LastOrDefaultAsync__TSource__3__0;
  1576. private static MethodInfo LastOrDefaultAsync__TSource__3__0(Type TSource) =>
  1577. (s_LastOrDefaultAsync__TSource__3__0 ??
  1578. (s_LastOrDefaultAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(LastOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1579. public static ValueTask<TSource> LastOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  1580. {
  1581. if (source == null)
  1582. throw new ArgumentNullException(nameof(source));
  1583. if (predicate == null)
  1584. throw new ArgumentNullException(nameof(predicate));
  1585. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastOrDefaultAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1586. }
  1587. private static MethodInfo s_LastOrDefaultAwaitAsync__TSource__3__0;
  1588. private static MethodInfo LastOrDefaultAwaitAsync__TSource__3__0(Type TSource) =>
  1589. (s_LastOrDefaultAwaitAsync__TSource__3__0 ??
  1590. (s_LastOrDefaultAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(LastOrDefaultAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1591. public static ValueTask<TSource> LastOrDefaultAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1592. {
  1593. if (source == null)
  1594. throw new ArgumentNullException(nameof(source));
  1595. if (predicate == null)
  1596. throw new ArgumentNullException(nameof(predicate));
  1597. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastOrDefaultAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1598. }
  1599. private static MethodInfo s_LastOrDefaultAwaitWithCancellationAsync__TSource__3__0;
  1600. private static MethodInfo LastOrDefaultAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  1601. (s_LastOrDefaultAwaitWithCancellationAsync__TSource__3__0 ??
  1602. (s_LastOrDefaultAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(LastOrDefaultAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1603. public static ValueTask<TSource> LastOrDefaultAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1604. {
  1605. if (source == null)
  1606. throw new ArgumentNullException(nameof(source));
  1607. if (predicate == null)
  1608. throw new ArgumentNullException(nameof(predicate));
  1609. return source.Provider.ExecuteAsync<TSource>(Expression.Call(LastOrDefaultAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1610. }
  1611. private static MethodInfo s_LongCountAsync__TSource__2__0;
  1612. private static MethodInfo LongCountAsync__TSource__2__0(Type TSource) =>
  1613. (s_LongCountAsync__TSource__2__0 ??
  1614. (s_LongCountAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<long>>(LongCountAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1615. public static ValueTask<long> LongCountAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  1616. {
  1617. if (source == null)
  1618. throw new ArgumentNullException(nameof(source));
  1619. return source.Provider.ExecuteAsync<long>(Expression.Call(LongCountAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1620. }
  1621. private static MethodInfo s_LongCountAsync__TSource__3__0;
  1622. private static MethodInfo LongCountAsync__TSource__3__0(Type TSource) =>
  1623. (s_LongCountAsync__TSource__3__0 ??
  1624. (s_LongCountAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<long>>(LongCountAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1625. public static ValueTask<long> LongCountAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  1626. {
  1627. if (source == null)
  1628. throw new ArgumentNullException(nameof(source));
  1629. if (predicate == null)
  1630. throw new ArgumentNullException(nameof(predicate));
  1631. return source.Provider.ExecuteAsync<long>(Expression.Call(LongCountAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1632. }
  1633. private static MethodInfo s_LongCountAwaitAsync__TSource__3__0;
  1634. private static MethodInfo LongCountAwaitAsync__TSource__3__0(Type TSource) =>
  1635. (s_LongCountAwaitAsync__TSource__3__0 ??
  1636. (s_LongCountAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<long>>(LongCountAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1637. public static ValueTask<long> LongCountAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1638. {
  1639. if (source == null)
  1640. throw new ArgumentNullException(nameof(source));
  1641. if (predicate == null)
  1642. throw new ArgumentNullException(nameof(predicate));
  1643. return source.Provider.ExecuteAsync<long>(Expression.Call(LongCountAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1644. }
  1645. private static MethodInfo s_LongCountAwaitWithCancellationAsync__TSource__3__0;
  1646. private static MethodInfo LongCountAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  1647. (s_LongCountAwaitWithCancellationAsync__TSource__3__0 ??
  1648. (s_LongCountAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<long>>(LongCountAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1649. public static ValueTask<long> LongCountAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  1650. {
  1651. if (source == null)
  1652. throw new ArgumentNullException(nameof(source));
  1653. if (predicate == null)
  1654. throw new ArgumentNullException(nameof(predicate));
  1655. return source.Provider.ExecuteAsync<long>(Expression.Call(LongCountAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1656. }
  1657. private static MethodInfo s_MaxAsync__2__0;
  1658. private static MethodInfo MaxAsync__2__0 =>
  1659. (s_MaxAsync__2__0 ??
  1660. (s_MaxAsync__2__0 = new Func<IAsyncQueryable<decimal?>, CancellationToken, ValueTask<decimal?>>(MaxAsync).GetMethodInfo()));
  1661. public static ValueTask<decimal?> MaxAsync(this IAsyncQueryable<decimal?> source, CancellationToken cancellationToken = default)
  1662. {
  1663. if (source == null)
  1664. throw new ArgumentNullException(nameof(source));
  1665. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MaxAsync__2__0, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1666. }
  1667. private static MethodInfo s_MaxAsync__2__1;
  1668. private static MethodInfo MaxAsync__2__1 =>
  1669. (s_MaxAsync__2__1 ??
  1670. (s_MaxAsync__2__1 = new Func<IAsyncQueryable<decimal>, CancellationToken, ValueTask<decimal>>(MaxAsync).GetMethodInfo()));
  1671. public static ValueTask<decimal> MaxAsync(this IAsyncQueryable<decimal> source, CancellationToken cancellationToken = default)
  1672. {
  1673. if (source == null)
  1674. throw new ArgumentNullException(nameof(source));
  1675. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MaxAsync__2__1, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1676. }
  1677. private static MethodInfo s_MaxAsync__2__2;
  1678. private static MethodInfo MaxAsync__2__2 =>
  1679. (s_MaxAsync__2__2 ??
  1680. (s_MaxAsync__2__2 = new Func<IAsyncQueryable<double?>, CancellationToken, ValueTask<double?>>(MaxAsync).GetMethodInfo()));
  1681. public static ValueTask<double?> MaxAsync(this IAsyncQueryable<double?> source, CancellationToken cancellationToken = default)
  1682. {
  1683. if (source == null)
  1684. throw new ArgumentNullException(nameof(source));
  1685. return source.Provider.ExecuteAsync<double?>(Expression.Call(MaxAsync__2__2, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1686. }
  1687. private static MethodInfo s_MaxAsync__2__3;
  1688. private static MethodInfo MaxAsync__2__3 =>
  1689. (s_MaxAsync__2__3 ??
  1690. (s_MaxAsync__2__3 = new Func<IAsyncQueryable<double>, CancellationToken, ValueTask<double>>(MaxAsync).GetMethodInfo()));
  1691. public static ValueTask<double> MaxAsync(this IAsyncQueryable<double> source, CancellationToken cancellationToken = default)
  1692. {
  1693. if (source == null)
  1694. throw new ArgumentNullException(nameof(source));
  1695. return source.Provider.ExecuteAsync<double>(Expression.Call(MaxAsync__2__3, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1696. }
  1697. private static MethodInfo s_MaxAsync__2__4;
  1698. private static MethodInfo MaxAsync__2__4 =>
  1699. (s_MaxAsync__2__4 ??
  1700. (s_MaxAsync__2__4 = new Func<IAsyncQueryable<float?>, CancellationToken, ValueTask<float?>>(MaxAsync).GetMethodInfo()));
  1701. public static ValueTask<float?> MaxAsync(this IAsyncQueryable<float?> source, CancellationToken cancellationToken = default)
  1702. {
  1703. if (source == null)
  1704. throw new ArgumentNullException(nameof(source));
  1705. return source.Provider.ExecuteAsync<float?>(Expression.Call(MaxAsync__2__4, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1706. }
  1707. private static MethodInfo s_MaxAsync__2__5;
  1708. private static MethodInfo MaxAsync__2__5 =>
  1709. (s_MaxAsync__2__5 ??
  1710. (s_MaxAsync__2__5 = new Func<IAsyncQueryable<float>, CancellationToken, ValueTask<float>>(MaxAsync).GetMethodInfo()));
  1711. public static ValueTask<float> MaxAsync(this IAsyncQueryable<float> source, CancellationToken cancellationToken = default)
  1712. {
  1713. if (source == null)
  1714. throw new ArgumentNullException(nameof(source));
  1715. return source.Provider.ExecuteAsync<float>(Expression.Call(MaxAsync__2__5, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1716. }
  1717. private static MethodInfo s_MaxAsync__2__6;
  1718. private static MethodInfo MaxAsync__2__6 =>
  1719. (s_MaxAsync__2__6 ??
  1720. (s_MaxAsync__2__6 = new Func<IAsyncQueryable<int?>, CancellationToken, ValueTask<int?>>(MaxAsync).GetMethodInfo()));
  1721. public static ValueTask<int?> MaxAsync(this IAsyncQueryable<int?> source, CancellationToken cancellationToken = default)
  1722. {
  1723. if (source == null)
  1724. throw new ArgumentNullException(nameof(source));
  1725. return source.Provider.ExecuteAsync<int?>(Expression.Call(MaxAsync__2__6, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1726. }
  1727. private static MethodInfo s_MaxAsync__2__7;
  1728. private static MethodInfo MaxAsync__2__7 =>
  1729. (s_MaxAsync__2__7 ??
  1730. (s_MaxAsync__2__7 = new Func<IAsyncQueryable<int>, CancellationToken, ValueTask<int>>(MaxAsync).GetMethodInfo()));
  1731. public static ValueTask<int> MaxAsync(this IAsyncQueryable<int> source, CancellationToken cancellationToken = default)
  1732. {
  1733. if (source == null)
  1734. throw new ArgumentNullException(nameof(source));
  1735. return source.Provider.ExecuteAsync<int>(Expression.Call(MaxAsync__2__7, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1736. }
  1737. private static MethodInfo s_MaxAsync__2__8;
  1738. private static MethodInfo MaxAsync__2__8 =>
  1739. (s_MaxAsync__2__8 ??
  1740. (s_MaxAsync__2__8 = new Func<IAsyncQueryable<long?>, CancellationToken, ValueTask<long?>>(MaxAsync).GetMethodInfo()));
  1741. public static ValueTask<long?> MaxAsync(this IAsyncQueryable<long?> source, CancellationToken cancellationToken = default)
  1742. {
  1743. if (source == null)
  1744. throw new ArgumentNullException(nameof(source));
  1745. return source.Provider.ExecuteAsync<long?>(Expression.Call(MaxAsync__2__8, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1746. }
  1747. private static MethodInfo s_MaxAsync__2__9;
  1748. private static MethodInfo MaxAsync__2__9 =>
  1749. (s_MaxAsync__2__9 ??
  1750. (s_MaxAsync__2__9 = new Func<IAsyncQueryable<long>, CancellationToken, ValueTask<long>>(MaxAsync).GetMethodInfo()));
  1751. public static ValueTask<long> MaxAsync(this IAsyncQueryable<long> source, CancellationToken cancellationToken = default)
  1752. {
  1753. if (source == null)
  1754. throw new ArgumentNullException(nameof(source));
  1755. return source.Provider.ExecuteAsync<long>(Expression.Call(MaxAsync__2__9, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1756. }
  1757. private static MethodInfo s_MaxAsync__TSource__2__0;
  1758. private static MethodInfo MaxAsync__TSource__2__0(Type TSource) =>
  1759. (s_MaxAsync__TSource__2__0 ??
  1760. (s_MaxAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1761. public static ValueTask<TSource> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  1762. {
  1763. if (source == null)
  1764. throw new ArgumentNullException(nameof(source));
  1765. return source.Provider.ExecuteAsync<TSource>(Expression.Call(MaxAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1766. }
  1767. private static MethodInfo s_MaxAsync__TSource__3__0;
  1768. private static MethodInfo MaxAsync__TSource__3__0(Type TSource) =>
  1769. (s_MaxAsync__TSource__3__0 ??
  1770. (s_MaxAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal?>>, CancellationToken, ValueTask<decimal?>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1771. public static ValueTask<decimal?> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
  1772. {
  1773. if (source == null)
  1774. throw new ArgumentNullException(nameof(source));
  1775. if (selector == null)
  1776. throw new ArgumentNullException(nameof(selector));
  1777. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MaxAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1778. }
  1779. private static MethodInfo s_MaxAsync__TSource__3__1;
  1780. private static MethodInfo MaxAsync__TSource__3__1(Type TSource) =>
  1781. (s_MaxAsync__TSource__3__1 ??
  1782. (s_MaxAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal>>, CancellationToken, ValueTask<decimal>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1783. public static ValueTask<decimal> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
  1784. {
  1785. if (source == null)
  1786. throw new ArgumentNullException(nameof(source));
  1787. if (selector == null)
  1788. throw new ArgumentNullException(nameof(selector));
  1789. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MaxAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1790. }
  1791. private static MethodInfo s_MaxAsync__TSource__3__2;
  1792. private static MethodInfo MaxAsync__TSource__3__2(Type TSource) =>
  1793. (s_MaxAsync__TSource__3__2 ??
  1794. (s_MaxAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, double?>>, CancellationToken, ValueTask<double?>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1795. public static ValueTask<double?> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
  1796. {
  1797. if (source == null)
  1798. throw new ArgumentNullException(nameof(source));
  1799. if (selector == null)
  1800. throw new ArgumentNullException(nameof(selector));
  1801. return source.Provider.ExecuteAsync<double?>(Expression.Call(MaxAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1802. }
  1803. private static MethodInfo s_MaxAsync__TSource__3__3;
  1804. private static MethodInfo MaxAsync__TSource__3__3(Type TSource) =>
  1805. (s_MaxAsync__TSource__3__3 ??
  1806. (s_MaxAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, double>>, CancellationToken, ValueTask<double>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1807. public static ValueTask<double> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
  1808. {
  1809. if (source == null)
  1810. throw new ArgumentNullException(nameof(source));
  1811. if (selector == null)
  1812. throw new ArgumentNullException(nameof(selector));
  1813. return source.Provider.ExecuteAsync<double>(Expression.Call(MaxAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1814. }
  1815. private static MethodInfo s_MaxAsync__TSource__3__4;
  1816. private static MethodInfo MaxAsync__TSource__3__4(Type TSource) =>
  1817. (s_MaxAsync__TSource__3__4 ??
  1818. (s_MaxAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, float?>>, CancellationToken, ValueTask<float?>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1819. public static ValueTask<float?> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
  1820. {
  1821. if (source == null)
  1822. throw new ArgumentNullException(nameof(source));
  1823. if (selector == null)
  1824. throw new ArgumentNullException(nameof(selector));
  1825. return source.Provider.ExecuteAsync<float?>(Expression.Call(MaxAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1826. }
  1827. private static MethodInfo s_MaxAsync__TSource__3__5;
  1828. private static MethodInfo MaxAsync__TSource__3__5(Type TSource) =>
  1829. (s_MaxAsync__TSource__3__5 ??
  1830. (s_MaxAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, float>>, CancellationToken, ValueTask<float>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1831. public static ValueTask<float> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
  1832. {
  1833. if (source == null)
  1834. throw new ArgumentNullException(nameof(source));
  1835. if (selector == null)
  1836. throw new ArgumentNullException(nameof(selector));
  1837. return source.Provider.ExecuteAsync<float>(Expression.Call(MaxAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1838. }
  1839. private static MethodInfo s_MaxAsync__TSource__3__6;
  1840. private static MethodInfo MaxAsync__TSource__3__6(Type TSource) =>
  1841. (s_MaxAsync__TSource__3__6 ??
  1842. (s_MaxAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, int?>>, CancellationToken, ValueTask<int?>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1843. public static ValueTask<int?> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
  1844. {
  1845. if (source == null)
  1846. throw new ArgumentNullException(nameof(source));
  1847. if (selector == null)
  1848. throw new ArgumentNullException(nameof(selector));
  1849. return source.Provider.ExecuteAsync<int?>(Expression.Call(MaxAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1850. }
  1851. private static MethodInfo s_MaxAsync__TSource__3__7;
  1852. private static MethodInfo MaxAsync__TSource__3__7(Type TSource) =>
  1853. (s_MaxAsync__TSource__3__7 ??
  1854. (s_MaxAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, int>>, CancellationToken, ValueTask<int>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1855. public static ValueTask<int> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
  1856. {
  1857. if (source == null)
  1858. throw new ArgumentNullException(nameof(source));
  1859. if (selector == null)
  1860. throw new ArgumentNullException(nameof(selector));
  1861. return source.Provider.ExecuteAsync<int>(Expression.Call(MaxAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1862. }
  1863. private static MethodInfo s_MaxAsync__TSource__3__8;
  1864. private static MethodInfo MaxAsync__TSource__3__8(Type TSource) =>
  1865. (s_MaxAsync__TSource__3__8 ??
  1866. (s_MaxAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, long?>>, CancellationToken, ValueTask<long?>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1867. public static ValueTask<long?> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
  1868. {
  1869. if (source == null)
  1870. throw new ArgumentNullException(nameof(source));
  1871. if (selector == null)
  1872. throw new ArgumentNullException(nameof(selector));
  1873. return source.Provider.ExecuteAsync<long?>(Expression.Call(MaxAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1874. }
  1875. private static MethodInfo s_MaxAsync__TSource__3__9;
  1876. private static MethodInfo MaxAsync__TSource__3__9(Type TSource) =>
  1877. (s_MaxAsync__TSource__3__9 ??
  1878. (s_MaxAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, long>>, CancellationToken, ValueTask<long>>(MaxAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1879. public static ValueTask<long> MaxAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
  1880. {
  1881. if (source == null)
  1882. throw new ArgumentNullException(nameof(source));
  1883. if (selector == null)
  1884. throw new ArgumentNullException(nameof(selector));
  1885. return source.Provider.ExecuteAsync<long>(Expression.Call(MaxAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1886. }
  1887. private static MethodInfo s_MaxAsync__TSource_TResult__3__0;
  1888. private static MethodInfo MaxAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  1889. (s_MaxAsync__TSource_TResult__3__0 ??
  1890. (s_MaxAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<object>>(MaxAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  1891. public static ValueTask<TResult> MaxAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TResult>> selector, CancellationToken cancellationToken = default)
  1892. {
  1893. if (source == null)
  1894. throw new ArgumentNullException(nameof(source));
  1895. if (selector == null)
  1896. throw new ArgumentNullException(nameof(selector));
  1897. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MaxAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1898. }
  1899. private static MethodInfo s_MaxAwaitAsync__TSource__3__0;
  1900. private static MethodInfo MaxAwaitAsync__TSource__3__0(Type TSource) =>
  1901. (s_MaxAwaitAsync__TSource__3__0 ??
  1902. (s_MaxAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1903. public static ValueTask<decimal?> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  1904. {
  1905. if (source == null)
  1906. throw new ArgumentNullException(nameof(source));
  1907. if (selector == null)
  1908. throw new ArgumentNullException(nameof(selector));
  1909. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MaxAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1910. }
  1911. private static MethodInfo s_MaxAwaitAsync__TSource__3__1;
  1912. private static MethodInfo MaxAwaitAsync__TSource__3__1(Type TSource) =>
  1913. (s_MaxAwaitAsync__TSource__3__1 ??
  1914. (s_MaxAwaitAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1915. public static ValueTask<decimal> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  1916. {
  1917. if (source == null)
  1918. throw new ArgumentNullException(nameof(source));
  1919. if (selector == null)
  1920. throw new ArgumentNullException(nameof(selector));
  1921. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MaxAwaitAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1922. }
  1923. private static MethodInfo s_MaxAwaitAsync__TSource__3__2;
  1924. private static MethodInfo MaxAwaitAsync__TSource__3__2(Type TSource) =>
  1925. (s_MaxAwaitAsync__TSource__3__2 ??
  1926. (s_MaxAwaitAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1927. public static ValueTask<double?> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  1928. {
  1929. if (source == null)
  1930. throw new ArgumentNullException(nameof(source));
  1931. if (selector == null)
  1932. throw new ArgumentNullException(nameof(selector));
  1933. return source.Provider.ExecuteAsync<double?>(Expression.Call(MaxAwaitAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1934. }
  1935. private static MethodInfo s_MaxAwaitAsync__TSource__3__3;
  1936. private static MethodInfo MaxAwaitAsync__TSource__3__3(Type TSource) =>
  1937. (s_MaxAwaitAsync__TSource__3__3 ??
  1938. (s_MaxAwaitAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double>>>, CancellationToken, ValueTask<double>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1939. public static ValueTask<double> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  1940. {
  1941. if (source == null)
  1942. throw new ArgumentNullException(nameof(source));
  1943. if (selector == null)
  1944. throw new ArgumentNullException(nameof(selector));
  1945. return source.Provider.ExecuteAsync<double>(Expression.Call(MaxAwaitAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1946. }
  1947. private static MethodInfo s_MaxAwaitAsync__TSource__3__4;
  1948. private static MethodInfo MaxAwaitAsync__TSource__3__4(Type TSource) =>
  1949. (s_MaxAwaitAsync__TSource__3__4 ??
  1950. (s_MaxAwaitAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1951. public static ValueTask<float?> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  1952. {
  1953. if (source == null)
  1954. throw new ArgumentNullException(nameof(source));
  1955. if (selector == null)
  1956. throw new ArgumentNullException(nameof(selector));
  1957. return source.Provider.ExecuteAsync<float?>(Expression.Call(MaxAwaitAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1958. }
  1959. private static MethodInfo s_MaxAwaitAsync__TSource__3__5;
  1960. private static MethodInfo MaxAwaitAsync__TSource__3__5(Type TSource) =>
  1961. (s_MaxAwaitAsync__TSource__3__5 ??
  1962. (s_MaxAwaitAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float>>>, CancellationToken, ValueTask<float>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1963. public static ValueTask<float> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  1964. {
  1965. if (source == null)
  1966. throw new ArgumentNullException(nameof(source));
  1967. if (selector == null)
  1968. throw new ArgumentNullException(nameof(selector));
  1969. return source.Provider.ExecuteAsync<float>(Expression.Call(MaxAwaitAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1970. }
  1971. private static MethodInfo s_MaxAwaitAsync__TSource__3__6;
  1972. private static MethodInfo MaxAwaitAsync__TSource__3__6(Type TSource) =>
  1973. (s_MaxAwaitAsync__TSource__3__6 ??
  1974. (s_MaxAwaitAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1975. public static ValueTask<int?> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  1976. {
  1977. if (source == null)
  1978. throw new ArgumentNullException(nameof(source));
  1979. if (selector == null)
  1980. throw new ArgumentNullException(nameof(selector));
  1981. return source.Provider.ExecuteAsync<int?>(Expression.Call(MaxAwaitAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1982. }
  1983. private static MethodInfo s_MaxAwaitAsync__TSource__3__7;
  1984. private static MethodInfo MaxAwaitAsync__TSource__3__7(Type TSource) =>
  1985. (s_MaxAwaitAsync__TSource__3__7 ??
  1986. (s_MaxAwaitAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int>>>, CancellationToken, ValueTask<int>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1987. public static ValueTask<int> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  1988. {
  1989. if (source == null)
  1990. throw new ArgumentNullException(nameof(source));
  1991. if (selector == null)
  1992. throw new ArgumentNullException(nameof(selector));
  1993. return source.Provider.ExecuteAsync<int>(Expression.Call(MaxAwaitAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  1994. }
  1995. private static MethodInfo s_MaxAwaitAsync__TSource__3__8;
  1996. private static MethodInfo MaxAwaitAsync__TSource__3__8(Type TSource) =>
  1997. (s_MaxAwaitAsync__TSource__3__8 ??
  1998. (s_MaxAwaitAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  1999. public static ValueTask<long?> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  2000. {
  2001. if (source == null)
  2002. throw new ArgumentNullException(nameof(source));
  2003. if (selector == null)
  2004. throw new ArgumentNullException(nameof(selector));
  2005. return source.Provider.ExecuteAsync<long?>(Expression.Call(MaxAwaitAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2006. }
  2007. private static MethodInfo s_MaxAwaitAsync__TSource__3__9;
  2008. private static MethodInfo MaxAwaitAsync__TSource__3__9(Type TSource) =>
  2009. (s_MaxAwaitAsync__TSource__3__9 ??
  2010. (s_MaxAwaitAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long>>>, CancellationToken, ValueTask<long>>(MaxAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2011. public static ValueTask<long> MaxAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  2012. {
  2013. if (source == null)
  2014. throw new ArgumentNullException(nameof(source));
  2015. if (selector == null)
  2016. throw new ArgumentNullException(nameof(selector));
  2017. return source.Provider.ExecuteAsync<long>(Expression.Call(MaxAwaitAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2018. }
  2019. private static MethodInfo s_MaxAwaitAsync__TSource_TResult__3__0;
  2020. private static MethodInfo MaxAwaitAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  2021. (s_MaxAwaitAsync__TSource_TResult__3__0 ??
  2022. (s_MaxAwaitAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<object>>(MaxAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2023. public static ValueTask<TResult> MaxAwaitAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TResult>>> selector, CancellationToken cancellationToken = default)
  2024. {
  2025. if (source == null)
  2026. throw new ArgumentNullException(nameof(source));
  2027. if (selector == null)
  2028. throw new ArgumentNullException(nameof(selector));
  2029. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MaxAwaitAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2030. }
  2031. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__0;
  2032. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  2033. (s_MaxAwaitWithCancellationAsync__TSource__3__0 ??
  2034. (s_MaxAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2035. public static ValueTask<decimal?> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  2036. {
  2037. if (source == null)
  2038. throw new ArgumentNullException(nameof(source));
  2039. if (selector == null)
  2040. throw new ArgumentNullException(nameof(selector));
  2041. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2042. }
  2043. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__1;
  2044. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__1(Type TSource) =>
  2045. (s_MaxAwaitWithCancellationAsync__TSource__3__1 ??
  2046. (s_MaxAwaitWithCancellationAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2047. public static ValueTask<decimal> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  2048. {
  2049. if (source == null)
  2050. throw new ArgumentNullException(nameof(source));
  2051. if (selector == null)
  2052. throw new ArgumentNullException(nameof(selector));
  2053. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2054. }
  2055. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__2;
  2056. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__2(Type TSource) =>
  2057. (s_MaxAwaitWithCancellationAsync__TSource__3__2 ??
  2058. (s_MaxAwaitWithCancellationAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2059. public static ValueTask<double?> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  2060. {
  2061. if (source == null)
  2062. throw new ArgumentNullException(nameof(source));
  2063. if (selector == null)
  2064. throw new ArgumentNullException(nameof(selector));
  2065. return source.Provider.ExecuteAsync<double?>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2066. }
  2067. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__3;
  2068. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__3(Type TSource) =>
  2069. (s_MaxAwaitWithCancellationAsync__TSource__3__3 ??
  2070. (s_MaxAwaitWithCancellationAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double>>>, CancellationToken, ValueTask<double>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2071. public static ValueTask<double> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  2072. {
  2073. if (source == null)
  2074. throw new ArgumentNullException(nameof(source));
  2075. if (selector == null)
  2076. throw new ArgumentNullException(nameof(selector));
  2077. return source.Provider.ExecuteAsync<double>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2078. }
  2079. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__4;
  2080. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__4(Type TSource) =>
  2081. (s_MaxAwaitWithCancellationAsync__TSource__3__4 ??
  2082. (s_MaxAwaitWithCancellationAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2083. public static ValueTask<float?> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  2084. {
  2085. if (source == null)
  2086. throw new ArgumentNullException(nameof(source));
  2087. if (selector == null)
  2088. throw new ArgumentNullException(nameof(selector));
  2089. return source.Provider.ExecuteAsync<float?>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2090. }
  2091. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__5;
  2092. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__5(Type TSource) =>
  2093. (s_MaxAwaitWithCancellationAsync__TSource__3__5 ??
  2094. (s_MaxAwaitWithCancellationAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float>>>, CancellationToken, ValueTask<float>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2095. public static ValueTask<float> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  2096. {
  2097. if (source == null)
  2098. throw new ArgumentNullException(nameof(source));
  2099. if (selector == null)
  2100. throw new ArgumentNullException(nameof(selector));
  2101. return source.Provider.ExecuteAsync<float>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2102. }
  2103. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__6;
  2104. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__6(Type TSource) =>
  2105. (s_MaxAwaitWithCancellationAsync__TSource__3__6 ??
  2106. (s_MaxAwaitWithCancellationAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2107. public static ValueTask<int?> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  2108. {
  2109. if (source == null)
  2110. throw new ArgumentNullException(nameof(source));
  2111. if (selector == null)
  2112. throw new ArgumentNullException(nameof(selector));
  2113. return source.Provider.ExecuteAsync<int?>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2114. }
  2115. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__7;
  2116. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__7(Type TSource) =>
  2117. (s_MaxAwaitWithCancellationAsync__TSource__3__7 ??
  2118. (s_MaxAwaitWithCancellationAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int>>>, CancellationToken, ValueTask<int>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2119. public static ValueTask<int> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  2120. {
  2121. if (source == null)
  2122. throw new ArgumentNullException(nameof(source));
  2123. if (selector == null)
  2124. throw new ArgumentNullException(nameof(selector));
  2125. return source.Provider.ExecuteAsync<int>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2126. }
  2127. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__8;
  2128. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__8(Type TSource) =>
  2129. (s_MaxAwaitWithCancellationAsync__TSource__3__8 ??
  2130. (s_MaxAwaitWithCancellationAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2131. public static ValueTask<long?> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  2132. {
  2133. if (source == null)
  2134. throw new ArgumentNullException(nameof(source));
  2135. if (selector == null)
  2136. throw new ArgumentNullException(nameof(selector));
  2137. return source.Provider.ExecuteAsync<long?>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2138. }
  2139. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource__3__9;
  2140. private static MethodInfo MaxAwaitWithCancellationAsync__TSource__3__9(Type TSource) =>
  2141. (s_MaxAwaitWithCancellationAsync__TSource__3__9 ??
  2142. (s_MaxAwaitWithCancellationAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long>>>, CancellationToken, ValueTask<long>>(MaxAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2143. public static ValueTask<long> MaxAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  2144. {
  2145. if (source == null)
  2146. throw new ArgumentNullException(nameof(source));
  2147. if (selector == null)
  2148. throw new ArgumentNullException(nameof(selector));
  2149. return source.Provider.ExecuteAsync<long>(Expression.Call(MaxAwaitWithCancellationAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2150. }
  2151. private static MethodInfo s_MaxAwaitWithCancellationAsync__TSource_TResult__3__0;
  2152. private static MethodInfo MaxAwaitWithCancellationAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  2153. (s_MaxAwaitWithCancellationAsync__TSource_TResult__3__0 ??
  2154. (s_MaxAwaitWithCancellationAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<object>>(MaxAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2155. public static ValueTask<TResult> MaxAwaitWithCancellationAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TResult>>> selector, CancellationToken cancellationToken = default)
  2156. {
  2157. if (source == null)
  2158. throw new ArgumentNullException(nameof(source));
  2159. if (selector == null)
  2160. throw new ArgumentNullException(nameof(selector));
  2161. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MaxAwaitWithCancellationAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2162. }
  2163. private static MethodInfo s_MinAsync__2__0;
  2164. private static MethodInfo MinAsync__2__0 =>
  2165. (s_MinAsync__2__0 ??
  2166. (s_MinAsync__2__0 = new Func<IAsyncQueryable<decimal?>, CancellationToken, ValueTask<decimal?>>(MinAsync).GetMethodInfo()));
  2167. public static ValueTask<decimal?> MinAsync(this IAsyncQueryable<decimal?> source, CancellationToken cancellationToken = default)
  2168. {
  2169. if (source == null)
  2170. throw new ArgumentNullException(nameof(source));
  2171. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MinAsync__2__0, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2172. }
  2173. private static MethodInfo s_MinAsync__2__1;
  2174. private static MethodInfo MinAsync__2__1 =>
  2175. (s_MinAsync__2__1 ??
  2176. (s_MinAsync__2__1 = new Func<IAsyncQueryable<decimal>, CancellationToken, ValueTask<decimal>>(MinAsync).GetMethodInfo()));
  2177. public static ValueTask<decimal> MinAsync(this IAsyncQueryable<decimal> source, CancellationToken cancellationToken = default)
  2178. {
  2179. if (source == null)
  2180. throw new ArgumentNullException(nameof(source));
  2181. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MinAsync__2__1, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2182. }
  2183. private static MethodInfo s_MinAsync__2__2;
  2184. private static MethodInfo MinAsync__2__2 =>
  2185. (s_MinAsync__2__2 ??
  2186. (s_MinAsync__2__2 = new Func<IAsyncQueryable<double?>, CancellationToken, ValueTask<double?>>(MinAsync).GetMethodInfo()));
  2187. public static ValueTask<double?> MinAsync(this IAsyncQueryable<double?> source, CancellationToken cancellationToken = default)
  2188. {
  2189. if (source == null)
  2190. throw new ArgumentNullException(nameof(source));
  2191. return source.Provider.ExecuteAsync<double?>(Expression.Call(MinAsync__2__2, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2192. }
  2193. private static MethodInfo s_MinAsync__2__3;
  2194. private static MethodInfo MinAsync__2__3 =>
  2195. (s_MinAsync__2__3 ??
  2196. (s_MinAsync__2__3 = new Func<IAsyncQueryable<double>, CancellationToken, ValueTask<double>>(MinAsync).GetMethodInfo()));
  2197. public static ValueTask<double> MinAsync(this IAsyncQueryable<double> source, CancellationToken cancellationToken = default)
  2198. {
  2199. if (source == null)
  2200. throw new ArgumentNullException(nameof(source));
  2201. return source.Provider.ExecuteAsync<double>(Expression.Call(MinAsync__2__3, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2202. }
  2203. private static MethodInfo s_MinAsync__2__4;
  2204. private static MethodInfo MinAsync__2__4 =>
  2205. (s_MinAsync__2__4 ??
  2206. (s_MinAsync__2__4 = new Func<IAsyncQueryable<float?>, CancellationToken, ValueTask<float?>>(MinAsync).GetMethodInfo()));
  2207. public static ValueTask<float?> MinAsync(this IAsyncQueryable<float?> source, CancellationToken cancellationToken = default)
  2208. {
  2209. if (source == null)
  2210. throw new ArgumentNullException(nameof(source));
  2211. return source.Provider.ExecuteAsync<float?>(Expression.Call(MinAsync__2__4, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2212. }
  2213. private static MethodInfo s_MinAsync__2__5;
  2214. private static MethodInfo MinAsync__2__5 =>
  2215. (s_MinAsync__2__5 ??
  2216. (s_MinAsync__2__5 = new Func<IAsyncQueryable<float>, CancellationToken, ValueTask<float>>(MinAsync).GetMethodInfo()));
  2217. public static ValueTask<float> MinAsync(this IAsyncQueryable<float> source, CancellationToken cancellationToken = default)
  2218. {
  2219. if (source == null)
  2220. throw new ArgumentNullException(nameof(source));
  2221. return source.Provider.ExecuteAsync<float>(Expression.Call(MinAsync__2__5, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2222. }
  2223. private static MethodInfo s_MinAsync__2__6;
  2224. private static MethodInfo MinAsync__2__6 =>
  2225. (s_MinAsync__2__6 ??
  2226. (s_MinAsync__2__6 = new Func<IAsyncQueryable<int?>, CancellationToken, ValueTask<int?>>(MinAsync).GetMethodInfo()));
  2227. public static ValueTask<int?> MinAsync(this IAsyncQueryable<int?> source, CancellationToken cancellationToken = default)
  2228. {
  2229. if (source == null)
  2230. throw new ArgumentNullException(nameof(source));
  2231. return source.Provider.ExecuteAsync<int?>(Expression.Call(MinAsync__2__6, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2232. }
  2233. private static MethodInfo s_MinAsync__2__7;
  2234. private static MethodInfo MinAsync__2__7 =>
  2235. (s_MinAsync__2__7 ??
  2236. (s_MinAsync__2__7 = new Func<IAsyncQueryable<int>, CancellationToken, ValueTask<int>>(MinAsync).GetMethodInfo()));
  2237. public static ValueTask<int> MinAsync(this IAsyncQueryable<int> source, CancellationToken cancellationToken = default)
  2238. {
  2239. if (source == null)
  2240. throw new ArgumentNullException(nameof(source));
  2241. return source.Provider.ExecuteAsync<int>(Expression.Call(MinAsync__2__7, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2242. }
  2243. private static MethodInfo s_MinAsync__2__8;
  2244. private static MethodInfo MinAsync__2__8 =>
  2245. (s_MinAsync__2__8 ??
  2246. (s_MinAsync__2__8 = new Func<IAsyncQueryable<long?>, CancellationToken, ValueTask<long?>>(MinAsync).GetMethodInfo()));
  2247. public static ValueTask<long?> MinAsync(this IAsyncQueryable<long?> source, CancellationToken cancellationToken = default)
  2248. {
  2249. if (source == null)
  2250. throw new ArgumentNullException(nameof(source));
  2251. return source.Provider.ExecuteAsync<long?>(Expression.Call(MinAsync__2__8, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2252. }
  2253. private static MethodInfo s_MinAsync__2__9;
  2254. private static MethodInfo MinAsync__2__9 =>
  2255. (s_MinAsync__2__9 ??
  2256. (s_MinAsync__2__9 = new Func<IAsyncQueryable<long>, CancellationToken, ValueTask<long>>(MinAsync).GetMethodInfo()));
  2257. public static ValueTask<long> MinAsync(this IAsyncQueryable<long> source, CancellationToken cancellationToken = default)
  2258. {
  2259. if (source == null)
  2260. throw new ArgumentNullException(nameof(source));
  2261. return source.Provider.ExecuteAsync<long>(Expression.Call(MinAsync__2__9, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2262. }
  2263. private static MethodInfo s_MinAsync__TSource__2__0;
  2264. private static MethodInfo MinAsync__TSource__2__0(Type TSource) =>
  2265. (s_MinAsync__TSource__2__0 ??
  2266. (s_MinAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2267. public static ValueTask<TSource> MinAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  2268. {
  2269. if (source == null)
  2270. throw new ArgumentNullException(nameof(source));
  2271. return source.Provider.ExecuteAsync<TSource>(Expression.Call(MinAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2272. }
  2273. private static MethodInfo s_MinAsync__TSource__3__0;
  2274. private static MethodInfo MinAsync__TSource__3__0(Type TSource) =>
  2275. (s_MinAsync__TSource__3__0 ??
  2276. (s_MinAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal?>>, CancellationToken, ValueTask<decimal?>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2277. public static ValueTask<decimal?> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
  2278. {
  2279. if (source == null)
  2280. throw new ArgumentNullException(nameof(source));
  2281. if (selector == null)
  2282. throw new ArgumentNullException(nameof(selector));
  2283. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MinAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2284. }
  2285. private static MethodInfo s_MinAsync__TSource__3__1;
  2286. private static MethodInfo MinAsync__TSource__3__1(Type TSource) =>
  2287. (s_MinAsync__TSource__3__1 ??
  2288. (s_MinAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal>>, CancellationToken, ValueTask<decimal>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2289. public static ValueTask<decimal> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
  2290. {
  2291. if (source == null)
  2292. throw new ArgumentNullException(nameof(source));
  2293. if (selector == null)
  2294. throw new ArgumentNullException(nameof(selector));
  2295. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MinAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2296. }
  2297. private static MethodInfo s_MinAsync__TSource__3__2;
  2298. private static MethodInfo MinAsync__TSource__3__2(Type TSource) =>
  2299. (s_MinAsync__TSource__3__2 ??
  2300. (s_MinAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, double?>>, CancellationToken, ValueTask<double?>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2301. public static ValueTask<double?> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
  2302. {
  2303. if (source == null)
  2304. throw new ArgumentNullException(nameof(source));
  2305. if (selector == null)
  2306. throw new ArgumentNullException(nameof(selector));
  2307. return source.Provider.ExecuteAsync<double?>(Expression.Call(MinAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2308. }
  2309. private static MethodInfo s_MinAsync__TSource__3__3;
  2310. private static MethodInfo MinAsync__TSource__3__3(Type TSource) =>
  2311. (s_MinAsync__TSource__3__3 ??
  2312. (s_MinAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, double>>, CancellationToken, ValueTask<double>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2313. public static ValueTask<double> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
  2314. {
  2315. if (source == null)
  2316. throw new ArgumentNullException(nameof(source));
  2317. if (selector == null)
  2318. throw new ArgumentNullException(nameof(selector));
  2319. return source.Provider.ExecuteAsync<double>(Expression.Call(MinAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2320. }
  2321. private static MethodInfo s_MinAsync__TSource__3__4;
  2322. private static MethodInfo MinAsync__TSource__3__4(Type TSource) =>
  2323. (s_MinAsync__TSource__3__4 ??
  2324. (s_MinAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, float?>>, CancellationToken, ValueTask<float?>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2325. public static ValueTask<float?> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
  2326. {
  2327. if (source == null)
  2328. throw new ArgumentNullException(nameof(source));
  2329. if (selector == null)
  2330. throw new ArgumentNullException(nameof(selector));
  2331. return source.Provider.ExecuteAsync<float?>(Expression.Call(MinAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2332. }
  2333. private static MethodInfo s_MinAsync__TSource__3__5;
  2334. private static MethodInfo MinAsync__TSource__3__5(Type TSource) =>
  2335. (s_MinAsync__TSource__3__5 ??
  2336. (s_MinAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, float>>, CancellationToken, ValueTask<float>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2337. public static ValueTask<float> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
  2338. {
  2339. if (source == null)
  2340. throw new ArgumentNullException(nameof(source));
  2341. if (selector == null)
  2342. throw new ArgumentNullException(nameof(selector));
  2343. return source.Provider.ExecuteAsync<float>(Expression.Call(MinAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2344. }
  2345. private static MethodInfo s_MinAsync__TSource__3__6;
  2346. private static MethodInfo MinAsync__TSource__3__6(Type TSource) =>
  2347. (s_MinAsync__TSource__3__6 ??
  2348. (s_MinAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, int?>>, CancellationToken, ValueTask<int?>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2349. public static ValueTask<int?> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
  2350. {
  2351. if (source == null)
  2352. throw new ArgumentNullException(nameof(source));
  2353. if (selector == null)
  2354. throw new ArgumentNullException(nameof(selector));
  2355. return source.Provider.ExecuteAsync<int?>(Expression.Call(MinAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2356. }
  2357. private static MethodInfo s_MinAsync__TSource__3__7;
  2358. private static MethodInfo MinAsync__TSource__3__7(Type TSource) =>
  2359. (s_MinAsync__TSource__3__7 ??
  2360. (s_MinAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, int>>, CancellationToken, ValueTask<int>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2361. public static ValueTask<int> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
  2362. {
  2363. if (source == null)
  2364. throw new ArgumentNullException(nameof(source));
  2365. if (selector == null)
  2366. throw new ArgumentNullException(nameof(selector));
  2367. return source.Provider.ExecuteAsync<int>(Expression.Call(MinAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2368. }
  2369. private static MethodInfo s_MinAsync__TSource__3__8;
  2370. private static MethodInfo MinAsync__TSource__3__8(Type TSource) =>
  2371. (s_MinAsync__TSource__3__8 ??
  2372. (s_MinAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, long?>>, CancellationToken, ValueTask<long?>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2373. public static ValueTask<long?> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
  2374. {
  2375. if (source == null)
  2376. throw new ArgumentNullException(nameof(source));
  2377. if (selector == null)
  2378. throw new ArgumentNullException(nameof(selector));
  2379. return source.Provider.ExecuteAsync<long?>(Expression.Call(MinAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2380. }
  2381. private static MethodInfo s_MinAsync__TSource__3__9;
  2382. private static MethodInfo MinAsync__TSource__3__9(Type TSource) =>
  2383. (s_MinAsync__TSource__3__9 ??
  2384. (s_MinAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, long>>, CancellationToken, ValueTask<long>>(MinAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2385. public static ValueTask<long> MinAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
  2386. {
  2387. if (source == null)
  2388. throw new ArgumentNullException(nameof(source));
  2389. if (selector == null)
  2390. throw new ArgumentNullException(nameof(selector));
  2391. return source.Provider.ExecuteAsync<long>(Expression.Call(MinAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2392. }
  2393. private static MethodInfo s_MinAsync__TSource_TResult__3__0;
  2394. private static MethodInfo MinAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  2395. (s_MinAsync__TSource_TResult__3__0 ??
  2396. (s_MinAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<object>>(MinAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2397. public static ValueTask<TResult> MinAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TResult>> selector, CancellationToken cancellationToken = default)
  2398. {
  2399. if (source == null)
  2400. throw new ArgumentNullException(nameof(source));
  2401. if (selector == null)
  2402. throw new ArgumentNullException(nameof(selector));
  2403. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MinAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2404. }
  2405. private static MethodInfo s_MinAwaitAsync__TSource__3__0;
  2406. private static MethodInfo MinAwaitAsync__TSource__3__0(Type TSource) =>
  2407. (s_MinAwaitAsync__TSource__3__0 ??
  2408. (s_MinAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2409. public static ValueTask<decimal?> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  2410. {
  2411. if (source == null)
  2412. throw new ArgumentNullException(nameof(source));
  2413. if (selector == null)
  2414. throw new ArgumentNullException(nameof(selector));
  2415. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MinAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2416. }
  2417. private static MethodInfo s_MinAwaitAsync__TSource__3__1;
  2418. private static MethodInfo MinAwaitAsync__TSource__3__1(Type TSource) =>
  2419. (s_MinAwaitAsync__TSource__3__1 ??
  2420. (s_MinAwaitAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2421. public static ValueTask<decimal> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  2422. {
  2423. if (source == null)
  2424. throw new ArgumentNullException(nameof(source));
  2425. if (selector == null)
  2426. throw new ArgumentNullException(nameof(selector));
  2427. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MinAwaitAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2428. }
  2429. private static MethodInfo s_MinAwaitAsync__TSource__3__2;
  2430. private static MethodInfo MinAwaitAsync__TSource__3__2(Type TSource) =>
  2431. (s_MinAwaitAsync__TSource__3__2 ??
  2432. (s_MinAwaitAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2433. public static ValueTask<double?> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  2434. {
  2435. if (source == null)
  2436. throw new ArgumentNullException(nameof(source));
  2437. if (selector == null)
  2438. throw new ArgumentNullException(nameof(selector));
  2439. return source.Provider.ExecuteAsync<double?>(Expression.Call(MinAwaitAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2440. }
  2441. private static MethodInfo s_MinAwaitAsync__TSource__3__3;
  2442. private static MethodInfo MinAwaitAsync__TSource__3__3(Type TSource) =>
  2443. (s_MinAwaitAsync__TSource__3__3 ??
  2444. (s_MinAwaitAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double>>>, CancellationToken, ValueTask<double>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2445. public static ValueTask<double> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  2446. {
  2447. if (source == null)
  2448. throw new ArgumentNullException(nameof(source));
  2449. if (selector == null)
  2450. throw new ArgumentNullException(nameof(selector));
  2451. return source.Provider.ExecuteAsync<double>(Expression.Call(MinAwaitAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2452. }
  2453. private static MethodInfo s_MinAwaitAsync__TSource__3__4;
  2454. private static MethodInfo MinAwaitAsync__TSource__3__4(Type TSource) =>
  2455. (s_MinAwaitAsync__TSource__3__4 ??
  2456. (s_MinAwaitAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2457. public static ValueTask<float?> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  2458. {
  2459. if (source == null)
  2460. throw new ArgumentNullException(nameof(source));
  2461. if (selector == null)
  2462. throw new ArgumentNullException(nameof(selector));
  2463. return source.Provider.ExecuteAsync<float?>(Expression.Call(MinAwaitAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2464. }
  2465. private static MethodInfo s_MinAwaitAsync__TSource__3__5;
  2466. private static MethodInfo MinAwaitAsync__TSource__3__5(Type TSource) =>
  2467. (s_MinAwaitAsync__TSource__3__5 ??
  2468. (s_MinAwaitAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float>>>, CancellationToken, ValueTask<float>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2469. public static ValueTask<float> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  2470. {
  2471. if (source == null)
  2472. throw new ArgumentNullException(nameof(source));
  2473. if (selector == null)
  2474. throw new ArgumentNullException(nameof(selector));
  2475. return source.Provider.ExecuteAsync<float>(Expression.Call(MinAwaitAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2476. }
  2477. private static MethodInfo s_MinAwaitAsync__TSource__3__6;
  2478. private static MethodInfo MinAwaitAsync__TSource__3__6(Type TSource) =>
  2479. (s_MinAwaitAsync__TSource__3__6 ??
  2480. (s_MinAwaitAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2481. public static ValueTask<int?> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  2482. {
  2483. if (source == null)
  2484. throw new ArgumentNullException(nameof(source));
  2485. if (selector == null)
  2486. throw new ArgumentNullException(nameof(selector));
  2487. return source.Provider.ExecuteAsync<int?>(Expression.Call(MinAwaitAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2488. }
  2489. private static MethodInfo s_MinAwaitAsync__TSource__3__7;
  2490. private static MethodInfo MinAwaitAsync__TSource__3__7(Type TSource) =>
  2491. (s_MinAwaitAsync__TSource__3__7 ??
  2492. (s_MinAwaitAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int>>>, CancellationToken, ValueTask<int>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2493. public static ValueTask<int> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  2494. {
  2495. if (source == null)
  2496. throw new ArgumentNullException(nameof(source));
  2497. if (selector == null)
  2498. throw new ArgumentNullException(nameof(selector));
  2499. return source.Provider.ExecuteAsync<int>(Expression.Call(MinAwaitAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2500. }
  2501. private static MethodInfo s_MinAwaitAsync__TSource__3__8;
  2502. private static MethodInfo MinAwaitAsync__TSource__3__8(Type TSource) =>
  2503. (s_MinAwaitAsync__TSource__3__8 ??
  2504. (s_MinAwaitAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2505. public static ValueTask<long?> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  2506. {
  2507. if (source == null)
  2508. throw new ArgumentNullException(nameof(source));
  2509. if (selector == null)
  2510. throw new ArgumentNullException(nameof(selector));
  2511. return source.Provider.ExecuteAsync<long?>(Expression.Call(MinAwaitAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2512. }
  2513. private static MethodInfo s_MinAwaitAsync__TSource__3__9;
  2514. private static MethodInfo MinAwaitAsync__TSource__3__9(Type TSource) =>
  2515. (s_MinAwaitAsync__TSource__3__9 ??
  2516. (s_MinAwaitAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long>>>, CancellationToken, ValueTask<long>>(MinAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2517. public static ValueTask<long> MinAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  2518. {
  2519. if (source == null)
  2520. throw new ArgumentNullException(nameof(source));
  2521. if (selector == null)
  2522. throw new ArgumentNullException(nameof(selector));
  2523. return source.Provider.ExecuteAsync<long>(Expression.Call(MinAwaitAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2524. }
  2525. private static MethodInfo s_MinAwaitAsync__TSource_TResult__3__0;
  2526. private static MethodInfo MinAwaitAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  2527. (s_MinAwaitAsync__TSource_TResult__3__0 ??
  2528. (s_MinAwaitAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<object>>(MinAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2529. public static ValueTask<TResult> MinAwaitAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TResult>>> selector, CancellationToken cancellationToken = default)
  2530. {
  2531. if (source == null)
  2532. throw new ArgumentNullException(nameof(source));
  2533. if (selector == null)
  2534. throw new ArgumentNullException(nameof(selector));
  2535. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MinAwaitAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2536. }
  2537. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__0;
  2538. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  2539. (s_MinAwaitWithCancellationAsync__TSource__3__0 ??
  2540. (s_MinAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2541. public static ValueTask<decimal?> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  2542. {
  2543. if (source == null)
  2544. throw new ArgumentNullException(nameof(source));
  2545. if (selector == null)
  2546. throw new ArgumentNullException(nameof(selector));
  2547. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2548. }
  2549. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__1;
  2550. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__1(Type TSource) =>
  2551. (s_MinAwaitWithCancellationAsync__TSource__3__1 ??
  2552. (s_MinAwaitWithCancellationAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2553. public static ValueTask<decimal> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  2554. {
  2555. if (source == null)
  2556. throw new ArgumentNullException(nameof(source));
  2557. if (selector == null)
  2558. throw new ArgumentNullException(nameof(selector));
  2559. return source.Provider.ExecuteAsync<decimal>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2560. }
  2561. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__2;
  2562. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__2(Type TSource) =>
  2563. (s_MinAwaitWithCancellationAsync__TSource__3__2 ??
  2564. (s_MinAwaitWithCancellationAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2565. public static ValueTask<double?> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  2566. {
  2567. if (source == null)
  2568. throw new ArgumentNullException(nameof(source));
  2569. if (selector == null)
  2570. throw new ArgumentNullException(nameof(selector));
  2571. return source.Provider.ExecuteAsync<double?>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2572. }
  2573. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__3;
  2574. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__3(Type TSource) =>
  2575. (s_MinAwaitWithCancellationAsync__TSource__3__3 ??
  2576. (s_MinAwaitWithCancellationAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double>>>, CancellationToken, ValueTask<double>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2577. public static ValueTask<double> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  2578. {
  2579. if (source == null)
  2580. throw new ArgumentNullException(nameof(source));
  2581. if (selector == null)
  2582. throw new ArgumentNullException(nameof(selector));
  2583. return source.Provider.ExecuteAsync<double>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2584. }
  2585. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__4;
  2586. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__4(Type TSource) =>
  2587. (s_MinAwaitWithCancellationAsync__TSource__3__4 ??
  2588. (s_MinAwaitWithCancellationAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2589. public static ValueTask<float?> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  2590. {
  2591. if (source == null)
  2592. throw new ArgumentNullException(nameof(source));
  2593. if (selector == null)
  2594. throw new ArgumentNullException(nameof(selector));
  2595. return source.Provider.ExecuteAsync<float?>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2596. }
  2597. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__5;
  2598. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__5(Type TSource) =>
  2599. (s_MinAwaitWithCancellationAsync__TSource__3__5 ??
  2600. (s_MinAwaitWithCancellationAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float>>>, CancellationToken, ValueTask<float>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2601. public static ValueTask<float> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  2602. {
  2603. if (source == null)
  2604. throw new ArgumentNullException(nameof(source));
  2605. if (selector == null)
  2606. throw new ArgumentNullException(nameof(selector));
  2607. return source.Provider.ExecuteAsync<float>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2608. }
  2609. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__6;
  2610. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__6(Type TSource) =>
  2611. (s_MinAwaitWithCancellationAsync__TSource__3__6 ??
  2612. (s_MinAwaitWithCancellationAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2613. public static ValueTask<int?> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  2614. {
  2615. if (source == null)
  2616. throw new ArgumentNullException(nameof(source));
  2617. if (selector == null)
  2618. throw new ArgumentNullException(nameof(selector));
  2619. return source.Provider.ExecuteAsync<int?>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2620. }
  2621. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__7;
  2622. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__7(Type TSource) =>
  2623. (s_MinAwaitWithCancellationAsync__TSource__3__7 ??
  2624. (s_MinAwaitWithCancellationAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int>>>, CancellationToken, ValueTask<int>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2625. public static ValueTask<int> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  2626. {
  2627. if (source == null)
  2628. throw new ArgumentNullException(nameof(source));
  2629. if (selector == null)
  2630. throw new ArgumentNullException(nameof(selector));
  2631. return source.Provider.ExecuteAsync<int>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2632. }
  2633. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__8;
  2634. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__8(Type TSource) =>
  2635. (s_MinAwaitWithCancellationAsync__TSource__3__8 ??
  2636. (s_MinAwaitWithCancellationAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2637. public static ValueTask<long?> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  2638. {
  2639. if (source == null)
  2640. throw new ArgumentNullException(nameof(source));
  2641. if (selector == null)
  2642. throw new ArgumentNullException(nameof(selector));
  2643. return source.Provider.ExecuteAsync<long?>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2644. }
  2645. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource__3__9;
  2646. private static MethodInfo MinAwaitWithCancellationAsync__TSource__3__9(Type TSource) =>
  2647. (s_MinAwaitWithCancellationAsync__TSource__3__9 ??
  2648. (s_MinAwaitWithCancellationAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long>>>, CancellationToken, ValueTask<long>>(MinAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2649. public static ValueTask<long> MinAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  2650. {
  2651. if (source == null)
  2652. throw new ArgumentNullException(nameof(source));
  2653. if (selector == null)
  2654. throw new ArgumentNullException(nameof(selector));
  2655. return source.Provider.ExecuteAsync<long>(Expression.Call(MinAwaitWithCancellationAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2656. }
  2657. private static MethodInfo s_MinAwaitWithCancellationAsync__TSource_TResult__3__0;
  2658. private static MethodInfo MinAwaitWithCancellationAsync__TSource_TResult__3__0(Type TSource, Type TResult) =>
  2659. (s_MinAwaitWithCancellationAsync__TSource_TResult__3__0 ??
  2660. (s_MinAwaitWithCancellationAsync__TSource_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<object>>(MinAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2661. public static ValueTask<TResult> MinAwaitWithCancellationAsync<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TResult>>> selector, CancellationToken cancellationToken = default)
  2662. {
  2663. if (source == null)
  2664. throw new ArgumentNullException(nameof(source));
  2665. if (selector == null)
  2666. throw new ArgumentNullException(nameof(selector));
  2667. return source.Provider.ExecuteAsync<TResult>(Expression.Call(MinAwaitWithCancellationAsync__TSource_TResult__3__0(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  2668. }
  2669. private static MethodInfo s_OfType__TResult__1__0;
  2670. private static MethodInfo OfType__TResult__1__0(Type TResult) =>
  2671. (s_OfType__TResult__1__0 ??
  2672. (s_OfType__TResult__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(OfType<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TResult);
  2673. public static IAsyncQueryable<TResult> OfType<TResult>(this IAsyncQueryable<object> source)
  2674. {
  2675. if (source == null)
  2676. throw new ArgumentNullException(nameof(source));
  2677. return source.Provider.CreateQuery<TResult>(Expression.Call(OfType__TResult__1__0(typeof(TResult)), source.Expression));
  2678. }
  2679. private static MethodInfo s_OrderBy__TSource_TKey__2__0;
  2680. private static MethodInfo OrderBy__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2681. (s_OrderBy__TSource_TKey__2__0 ??
  2682. (s_OrderBy__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IOrderedAsyncQueryable<object>>(OrderBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2683. public static IOrderedAsyncQueryable<TSource> OrderBy<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  2684. {
  2685. if (source == null)
  2686. throw new ArgumentNullException(nameof(source));
  2687. if (keySelector == null)
  2688. throw new ArgumentNullException(nameof(keySelector));
  2689. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderBy__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2690. }
  2691. private static MethodInfo s_OrderBy__TSource_TKey__3__0;
  2692. private static MethodInfo OrderBy__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2693. (s_OrderBy__TSource_TKey__3__0 ??
  2694. (s_OrderBy__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2695. public static IOrderedAsyncQueryable<TSource> OrderBy<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
  2696. {
  2697. if (source == null)
  2698. throw new ArgumentNullException(nameof(source));
  2699. if (keySelector == null)
  2700. throw new ArgumentNullException(nameof(keySelector));
  2701. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderBy__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2702. }
  2703. private static MethodInfo s_OrderByAwait__TSource_TKey__2__0;
  2704. private static MethodInfo OrderByAwait__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2705. (s_OrderByAwait__TSource_TKey__2__0 ??
  2706. (s_OrderByAwait__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(OrderByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2707. public static IOrderedAsyncQueryable<TSource> OrderByAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  2708. {
  2709. if (source == null)
  2710. throw new ArgumentNullException(nameof(source));
  2711. if (keySelector == null)
  2712. throw new ArgumentNullException(nameof(keySelector));
  2713. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByAwait__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2714. }
  2715. private static MethodInfo s_OrderByAwait__TSource_TKey__3__0;
  2716. private static MethodInfo OrderByAwait__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2717. (s_OrderByAwait__TSource_TKey__3__0 ??
  2718. (s_OrderByAwait__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2719. public static IOrderedAsyncQueryable<TSource> OrderByAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  2720. {
  2721. if (source == null)
  2722. throw new ArgumentNullException(nameof(source));
  2723. if (keySelector == null)
  2724. throw new ArgumentNullException(nameof(keySelector));
  2725. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByAwait__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2726. }
  2727. private static MethodInfo s_OrderByAwaitWithCancellation__TSource_TKey__2__0;
  2728. private static MethodInfo OrderByAwaitWithCancellation__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2729. (s_OrderByAwaitWithCancellation__TSource_TKey__2__0 ??
  2730. (s_OrderByAwaitWithCancellation__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(OrderByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2731. public static IOrderedAsyncQueryable<TSource> OrderByAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  2732. {
  2733. if (source == null)
  2734. throw new ArgumentNullException(nameof(source));
  2735. if (keySelector == null)
  2736. throw new ArgumentNullException(nameof(keySelector));
  2737. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByAwaitWithCancellation__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2738. }
  2739. private static MethodInfo s_OrderByAwaitWithCancellation__TSource_TKey__3__0;
  2740. private static MethodInfo OrderByAwaitWithCancellation__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2741. (s_OrderByAwaitWithCancellation__TSource_TKey__3__0 ??
  2742. (s_OrderByAwaitWithCancellation__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2743. public static IOrderedAsyncQueryable<TSource> OrderByAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  2744. {
  2745. if (source == null)
  2746. throw new ArgumentNullException(nameof(source));
  2747. if (keySelector == null)
  2748. throw new ArgumentNullException(nameof(keySelector));
  2749. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByAwaitWithCancellation__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2750. }
  2751. private static MethodInfo s_OrderByDescending__TSource_TKey__2__0;
  2752. private static MethodInfo OrderByDescending__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2753. (s_OrderByDescending__TSource_TKey__2__0 ??
  2754. (s_OrderByDescending__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IOrderedAsyncQueryable<object>>(OrderByDescending<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2755. public static IOrderedAsyncQueryable<TSource> OrderByDescending<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  2756. {
  2757. if (source == null)
  2758. throw new ArgumentNullException(nameof(source));
  2759. if (keySelector == null)
  2760. throw new ArgumentNullException(nameof(keySelector));
  2761. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescending__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2762. }
  2763. private static MethodInfo s_OrderByDescending__TSource_TKey__3__0;
  2764. private static MethodInfo OrderByDescending__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2765. (s_OrderByDescending__TSource_TKey__3__0 ??
  2766. (s_OrderByDescending__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderByDescending<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2767. public static IOrderedAsyncQueryable<TSource> OrderByDescending<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
  2768. {
  2769. if (source == null)
  2770. throw new ArgumentNullException(nameof(source));
  2771. if (keySelector == null)
  2772. throw new ArgumentNullException(nameof(keySelector));
  2773. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescending__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2774. }
  2775. private static MethodInfo s_OrderByDescendingAwait__TSource_TKey__2__0;
  2776. private static MethodInfo OrderByDescendingAwait__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2777. (s_OrderByDescendingAwait__TSource_TKey__2__0 ??
  2778. (s_OrderByDescendingAwait__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(OrderByDescendingAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2779. public static IOrderedAsyncQueryable<TSource> OrderByDescendingAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  2780. {
  2781. if (source == null)
  2782. throw new ArgumentNullException(nameof(source));
  2783. if (keySelector == null)
  2784. throw new ArgumentNullException(nameof(keySelector));
  2785. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescendingAwait__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2786. }
  2787. private static MethodInfo s_OrderByDescendingAwait__TSource_TKey__3__0;
  2788. private static MethodInfo OrderByDescendingAwait__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2789. (s_OrderByDescendingAwait__TSource_TKey__3__0 ??
  2790. (s_OrderByDescendingAwait__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderByDescendingAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2791. public static IOrderedAsyncQueryable<TSource> OrderByDescendingAwait<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  2792. {
  2793. if (source == null)
  2794. throw new ArgumentNullException(nameof(source));
  2795. if (keySelector == null)
  2796. throw new ArgumentNullException(nameof(keySelector));
  2797. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescendingAwait__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2798. }
  2799. private static MethodInfo s_OrderByDescendingAwaitWithCancellation__TSource_TKey__2__0;
  2800. private static MethodInfo OrderByDescendingAwaitWithCancellation__TSource_TKey__2__0(Type TSource, Type TKey) =>
  2801. (s_OrderByDescendingAwaitWithCancellation__TSource_TKey__2__0 ??
  2802. (s_OrderByDescendingAwaitWithCancellation__TSource_TKey__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(OrderByDescendingAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2803. public static IOrderedAsyncQueryable<TSource> OrderByDescendingAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  2804. {
  2805. if (source == null)
  2806. throw new ArgumentNullException(nameof(source));
  2807. if (keySelector == null)
  2808. throw new ArgumentNullException(nameof(keySelector));
  2809. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescendingAwaitWithCancellation__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  2810. }
  2811. private static MethodInfo s_OrderByDescendingAwaitWithCancellation__TSource_TKey__3__0;
  2812. private static MethodInfo OrderByDescendingAwaitWithCancellation__TSource_TKey__3__0(Type TSource, Type TKey) =>
  2813. (s_OrderByDescendingAwaitWithCancellation__TSource_TKey__3__0 ??
  2814. (s_OrderByDescendingAwaitWithCancellation__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(OrderByDescendingAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  2815. public static IOrderedAsyncQueryable<TSource> OrderByDescendingAwaitWithCancellation<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  2816. {
  2817. if (source == null)
  2818. throw new ArgumentNullException(nameof(source));
  2819. if (keySelector == null)
  2820. throw new ArgumentNullException(nameof(keySelector));
  2821. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(OrderByDescendingAwaitWithCancellation__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  2822. }
  2823. private static MethodInfo s_Prepend__TSource__2__0;
  2824. private static MethodInfo Prepend__TSource__2__0(Type TSource) =>
  2825. (s_Prepend__TSource__2__0 ??
  2826. (s_Prepend__TSource__2__0 = new Func<IAsyncQueryable<object>, object, IAsyncQueryable<object>>(Prepend<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2827. public static IAsyncQueryable<TSource> Prepend<TSource>(this IAsyncQueryable<TSource> source, TSource element)
  2828. {
  2829. if (source == null)
  2830. throw new ArgumentNullException(nameof(source));
  2831. return source.Provider.CreateQuery<TSource>(Expression.Call(Prepend__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(element, typeof(TSource))));
  2832. }
  2833. private static MethodInfo s_Reverse__TSource__1__0;
  2834. private static MethodInfo Reverse__TSource__1__0(Type TSource) =>
  2835. (s_Reverse__TSource__1__0 ??
  2836. (s_Reverse__TSource__1__0 = new Func<IAsyncQueryable<object>, IAsyncQueryable<object>>(Reverse<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  2837. public static IAsyncQueryable<TSource> Reverse<TSource>(this IAsyncQueryable<TSource> source)
  2838. {
  2839. if (source == null)
  2840. throw new ArgumentNullException(nameof(source));
  2841. return source.Provider.CreateQuery<TSource>(Expression.Call(Reverse__TSource__1__0(typeof(TSource)), source.Expression));
  2842. }
  2843. private static MethodInfo s_Select__TSource_TResult__2__0;
  2844. private static MethodInfo Select__TSource_TResult__2__0(Type TSource, Type TResult) =>
  2845. (s_Select__TSource_TResult__2__0 ??
  2846. (s_Select__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, object>>, IAsyncQueryable<object>>(Select<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2847. public static IAsyncQueryable<TResult> Select<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, TResult>> selector)
  2848. {
  2849. if (source == null)
  2850. throw new ArgumentNullException(nameof(source));
  2851. if (selector == null)
  2852. throw new ArgumentNullException(nameof(selector));
  2853. return source.Provider.CreateQuery<TResult>(Expression.Call(Select__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2854. }
  2855. private static MethodInfo s_Select__TSource_TResult__2__1;
  2856. private static MethodInfo Select__TSource_TResult__2__1(Type TSource, Type TResult) =>
  2857. (s_Select__TSource_TResult__2__1 ??
  2858. (s_Select__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IAsyncQueryable<object>>(Select<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2859. public static IAsyncQueryable<TResult> Select<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TResult>> selector)
  2860. {
  2861. if (source == null)
  2862. throw new ArgumentNullException(nameof(source));
  2863. if (selector == null)
  2864. throw new ArgumentNullException(nameof(selector));
  2865. return source.Provider.CreateQuery<TResult>(Expression.Call(Select__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2866. }
  2867. private static MethodInfo s_SelectAwait__TSource_TResult__2__0;
  2868. private static MethodInfo SelectAwait__TSource_TResult__2__0(Type TSource, Type TResult) =>
  2869. (s_SelectAwait__TSource_TResult__2__0 ??
  2870. (s_SelectAwait__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<object>>>, IAsyncQueryable<object>>(SelectAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2871. public static IAsyncQueryable<TResult> SelectAwait<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<TResult>>> selector)
  2872. {
  2873. if (source == null)
  2874. throw new ArgumentNullException(nameof(source));
  2875. if (selector == null)
  2876. throw new ArgumentNullException(nameof(selector));
  2877. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectAwait__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2878. }
  2879. private static MethodInfo s_SelectAwait__TSource_TResult__2__1;
  2880. private static MethodInfo SelectAwait__TSource_TResult__2__1(Type TSource, Type TResult) =>
  2881. (s_SelectAwait__TSource_TResult__2__1 ??
  2882. (s_SelectAwait__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IAsyncQueryable<object>>(SelectAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2883. public static IAsyncQueryable<TResult> SelectAwait<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TResult>>> selector)
  2884. {
  2885. if (source == null)
  2886. throw new ArgumentNullException(nameof(source));
  2887. if (selector == null)
  2888. throw new ArgumentNullException(nameof(selector));
  2889. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectAwait__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2890. }
  2891. private static MethodInfo s_SelectAwaitWithCancellation__TSource_TResult__2__0;
  2892. private static MethodInfo SelectAwaitWithCancellation__TSource_TResult__2__0(Type TSource, Type TResult) =>
  2893. (s_SelectAwaitWithCancellation__TSource_TResult__2__0 ??
  2894. (s_SelectAwaitWithCancellation__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(SelectAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2895. public static IAsyncQueryable<TResult> SelectAwaitWithCancellation<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TResult>>> selector)
  2896. {
  2897. if (source == null)
  2898. throw new ArgumentNullException(nameof(source));
  2899. if (selector == null)
  2900. throw new ArgumentNullException(nameof(selector));
  2901. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectAwaitWithCancellation__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2902. }
  2903. private static MethodInfo s_SelectAwaitWithCancellation__TSource_TResult__2__1;
  2904. private static MethodInfo SelectAwaitWithCancellation__TSource_TResult__2__1(Type TSource, Type TResult) =>
  2905. (s_SelectAwaitWithCancellation__TSource_TResult__2__1 ??
  2906. (s_SelectAwaitWithCancellation__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(SelectAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2907. public static IAsyncQueryable<TResult> SelectAwaitWithCancellation<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<TResult>>> selector)
  2908. {
  2909. if (source == null)
  2910. throw new ArgumentNullException(nameof(source));
  2911. if (selector == null)
  2912. throw new ArgumentNullException(nameof(selector));
  2913. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectAwaitWithCancellation__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2914. }
  2915. private static MethodInfo s_SelectMany__TSource_TResult__2__0;
  2916. private static MethodInfo SelectMany__TSource_TResult__2__0(Type TSource, Type TResult) =>
  2917. (s_SelectMany__TSource_TResult__2__0 ??
  2918. (s_SelectMany__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, IAsyncEnumerable<object>>>, IAsyncQueryable<object>>(SelectMany<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2919. public static IAsyncQueryable<TResult> SelectMany<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, IAsyncEnumerable<TResult>>> selector)
  2920. {
  2921. if (source == null)
  2922. throw new ArgumentNullException(nameof(source));
  2923. if (selector == null)
  2924. throw new ArgumentNullException(nameof(selector));
  2925. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectMany__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2926. }
  2927. private static MethodInfo s_SelectMany__TSource_TResult__2__1;
  2928. private static MethodInfo SelectMany__TSource_TResult__2__1(Type TSource, Type TResult) =>
  2929. (s_SelectMany__TSource_TResult__2__1 ??
  2930. (s_SelectMany__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, IAsyncEnumerable<object>>>, IAsyncQueryable<object>>(SelectMany<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2931. public static IAsyncQueryable<TResult> SelectMany<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, IAsyncEnumerable<TResult>>> selector)
  2932. {
  2933. if (source == null)
  2934. throw new ArgumentNullException(nameof(source));
  2935. if (selector == null)
  2936. throw new ArgumentNullException(nameof(selector));
  2937. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectMany__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2938. }
  2939. private static MethodInfo s_SelectMany__TSource_TCollection_TResult__3__0;
  2940. private static MethodInfo SelectMany__TSource_TCollection_TResult__3__0(Type TSource, Type TCollection, Type TResult) =>
  2941. (s_SelectMany__TSource_TCollection_TResult__3__0 ??
  2942. (s_SelectMany__TSource_TCollection_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, IAsyncEnumerable<object>>>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(SelectMany<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  2943. public static IAsyncQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, IAsyncEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
  2944. {
  2945. if (source == null)
  2946. throw new ArgumentNullException(nameof(source));
  2947. if (collectionSelector == null)
  2948. throw new ArgumentNullException(nameof(collectionSelector));
  2949. if (resultSelector == null)
  2950. throw new ArgumentNullException(nameof(resultSelector));
  2951. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectMany__TSource_TCollection_TResult__3__0(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  2952. }
  2953. private static MethodInfo s_SelectMany__TSource_TCollection_TResult__3__1;
  2954. private static MethodInfo SelectMany__TSource_TCollection_TResult__3__1(Type TSource, Type TCollection, Type TResult) =>
  2955. (s_SelectMany__TSource_TCollection_TResult__3__1 ??
  2956. (s_SelectMany__TSource_TCollection_TResult__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, IAsyncEnumerable<object>>>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(SelectMany<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  2957. public static IAsyncQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, IAsyncEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
  2958. {
  2959. if (source == null)
  2960. throw new ArgumentNullException(nameof(source));
  2961. if (collectionSelector == null)
  2962. throw new ArgumentNullException(nameof(collectionSelector));
  2963. if (resultSelector == null)
  2964. throw new ArgumentNullException(nameof(resultSelector));
  2965. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectMany__TSource_TCollection_TResult__3__1(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  2966. }
  2967. private static MethodInfo s_SelectManyAwait__TSource_TResult__2__0;
  2968. private static MethodInfo SelectManyAwait__TSource_TResult__2__0(Type TSource, Type TResult) =>
  2969. (s_SelectManyAwait__TSource_TResult__2__0 ??
  2970. (s_SelectManyAwait__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(SelectManyAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2971. public static IAsyncQueryable<TResult> SelectManyAwait<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<IAsyncEnumerable<TResult>>>> selector)
  2972. {
  2973. if (source == null)
  2974. throw new ArgumentNullException(nameof(source));
  2975. if (selector == null)
  2976. throw new ArgumentNullException(nameof(selector));
  2977. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwait__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2978. }
  2979. private static MethodInfo s_SelectManyAwait__TSource_TResult__2__1;
  2980. private static MethodInfo SelectManyAwait__TSource_TResult__2__1(Type TSource, Type TResult) =>
  2981. (s_SelectManyAwait__TSource_TResult__2__1 ??
  2982. (s_SelectManyAwait__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(SelectManyAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  2983. public static IAsyncQueryable<TResult> SelectManyAwait<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<IAsyncEnumerable<TResult>>>> selector)
  2984. {
  2985. if (source == null)
  2986. throw new ArgumentNullException(nameof(source));
  2987. if (selector == null)
  2988. throw new ArgumentNullException(nameof(selector));
  2989. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwait__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  2990. }
  2991. private static MethodInfo s_SelectManyAwait__TSource_TCollection_TResult__3__0;
  2992. private static MethodInfo SelectManyAwait__TSource_TCollection_TResult__3__0(Type TSource, Type TCollection, Type TResult) =>
  2993. (s_SelectManyAwait__TSource_TCollection_TResult__3__0 ??
  2994. (s_SelectManyAwait__TSource_TCollection_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<IAsyncEnumerable<object>>>>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(SelectManyAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  2995. public static IAsyncQueryable<TResult> SelectManyAwait<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<IAsyncEnumerable<TCollection>>>> collectionSelector, Expression<Func<TSource, TCollection, ValueTask<TResult>>> resultSelector)
  2996. {
  2997. if (source == null)
  2998. throw new ArgumentNullException(nameof(source));
  2999. if (collectionSelector == null)
  3000. throw new ArgumentNullException(nameof(collectionSelector));
  3001. if (resultSelector == null)
  3002. throw new ArgumentNullException(nameof(resultSelector));
  3003. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwait__TSource_TCollection_TResult__3__0(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  3004. }
  3005. private static MethodInfo s_SelectManyAwait__TSource_TCollection_TResult__3__1;
  3006. private static MethodInfo SelectManyAwait__TSource_TCollection_TResult__3__1(Type TSource, Type TCollection, Type TResult) =>
  3007. (s_SelectManyAwait__TSource_TCollection_TResult__3__1 ??
  3008. (s_SelectManyAwait__TSource_TCollection_TResult__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<IAsyncEnumerable<object>>>>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(SelectManyAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  3009. public static IAsyncQueryable<TResult> SelectManyAwait<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<IAsyncEnumerable<TCollection>>>> collectionSelector, Expression<Func<TSource, TCollection, ValueTask<TResult>>> resultSelector)
  3010. {
  3011. if (source == null)
  3012. throw new ArgumentNullException(nameof(source));
  3013. if (collectionSelector == null)
  3014. throw new ArgumentNullException(nameof(collectionSelector));
  3015. if (resultSelector == null)
  3016. throw new ArgumentNullException(nameof(resultSelector));
  3017. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwait__TSource_TCollection_TResult__3__1(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  3018. }
  3019. private static MethodInfo s_SelectManyAwaitWithCancellation__TSource_TResult__2__0;
  3020. private static MethodInfo SelectManyAwaitWithCancellation__TSource_TResult__2__0(Type TSource, Type TResult) =>
  3021. (s_SelectManyAwaitWithCancellation__TSource_TResult__2__0 ??
  3022. (s_SelectManyAwaitWithCancellation__TSource_TResult__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(SelectManyAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  3023. public static IAsyncQueryable<TResult> SelectManyAwaitWithCancellation<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<IAsyncEnumerable<TResult>>>> selector)
  3024. {
  3025. if (source == null)
  3026. throw new ArgumentNullException(nameof(source));
  3027. if (selector == null)
  3028. throw new ArgumentNullException(nameof(selector));
  3029. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwaitWithCancellation__TSource_TResult__2__0(typeof(TSource), typeof(TResult)), source.Expression, selector));
  3030. }
  3031. private static MethodInfo s_SelectManyAwaitWithCancellation__TSource_TResult__2__1;
  3032. private static MethodInfo SelectManyAwaitWithCancellation__TSource_TResult__2__1(Type TSource, Type TResult) =>
  3033. (s_SelectManyAwaitWithCancellation__TSource_TResult__2__1 ??
  3034. (s_SelectManyAwaitWithCancellation__TSource_TResult__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, IAsyncQueryable<object>>(SelectManyAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TResult);
  3035. public static IAsyncQueryable<TResult> SelectManyAwaitWithCancellation<TSource, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<IAsyncEnumerable<TResult>>>> selector)
  3036. {
  3037. if (source == null)
  3038. throw new ArgumentNullException(nameof(source));
  3039. if (selector == null)
  3040. throw new ArgumentNullException(nameof(selector));
  3041. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwaitWithCancellation__TSource_TResult__2__1(typeof(TSource), typeof(TResult)), source.Expression, selector));
  3042. }
  3043. private static MethodInfo s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__0;
  3044. private static MethodInfo SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__0(Type TSource, Type TCollection, Type TResult) =>
  3045. (s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__0 ??
  3046. (s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(SelectManyAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  3047. public static IAsyncQueryable<TResult> SelectManyAwaitWithCancellation<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<IAsyncEnumerable<TCollection>>>> collectionSelector, Expression<Func<TSource, TCollection, CancellationToken, ValueTask<TResult>>> resultSelector)
  3048. {
  3049. if (source == null)
  3050. throw new ArgumentNullException(nameof(source));
  3051. if (collectionSelector == null)
  3052. throw new ArgumentNullException(nameof(collectionSelector));
  3053. if (resultSelector == null)
  3054. throw new ArgumentNullException(nameof(resultSelector));
  3055. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__0(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  3056. }
  3057. private static MethodInfo s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__1;
  3058. private static MethodInfo SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__1(Type TSource, Type TCollection, Type TResult) =>
  3059. (s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__1 ??
  3060. (s_SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<IAsyncEnumerable<object>>>>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(SelectManyAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TCollection, TResult);
  3061. public static IAsyncQueryable<TResult> SelectManyAwaitWithCancellation<TSource, TCollection, TResult>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<IAsyncEnumerable<TCollection>>>> collectionSelector, Expression<Func<TSource, TCollection, CancellationToken, ValueTask<TResult>>> resultSelector)
  3062. {
  3063. if (source == null)
  3064. throw new ArgumentNullException(nameof(source));
  3065. if (collectionSelector == null)
  3066. throw new ArgumentNullException(nameof(collectionSelector));
  3067. if (resultSelector == null)
  3068. throw new ArgumentNullException(nameof(resultSelector));
  3069. return source.Provider.CreateQuery<TResult>(Expression.Call(SelectManyAwaitWithCancellation__TSource_TCollection_TResult__3__1(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector));
  3070. }
  3071. private static MethodInfo s_SequenceEqualAsync__TSource__3__0;
  3072. private static MethodInfo SequenceEqualAsync__TSource__3__0(Type TSource) =>
  3073. (s_SequenceEqualAsync__TSource__3__0 ??
  3074. (s_SequenceEqualAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, CancellationToken, ValueTask<bool>>(SequenceEqualAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3075. public static ValueTask<bool> SequenceEqualAsync<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second, CancellationToken cancellationToken = default)
  3076. {
  3077. if (first == null)
  3078. throw new ArgumentNullException(nameof(first));
  3079. if (second == null)
  3080. throw new ArgumentNullException(nameof(second));
  3081. return first.Provider.ExecuteAsync<bool>(Expression.Call(SequenceEqualAsync__TSource__3__0(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3082. }
  3083. private static MethodInfo s_SequenceEqualAsync__TSource__4__0;
  3084. private static MethodInfo SequenceEqualAsync__TSource__4__0(Type TSource) =>
  3085. (s_SequenceEqualAsync__TSource__4__0 ??
  3086. (s_SequenceEqualAsync__TSource__4__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IEqualityComparer<object>, CancellationToken, ValueTask<bool>>(SequenceEqualAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3087. public static ValueTask<bool> SequenceEqualAsync<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  3088. {
  3089. if (first == null)
  3090. throw new ArgumentNullException(nameof(first));
  3091. if (second == null)
  3092. throw new ArgumentNullException(nameof(second));
  3093. return first.Provider.ExecuteAsync<bool>(Expression.Call(SequenceEqualAsync__TSource__4__0(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3094. }
  3095. private static MethodInfo s_SingleAsync__TSource__2__0;
  3096. private static MethodInfo SingleAsync__TSource__2__0(Type TSource) =>
  3097. (s_SingleAsync__TSource__2__0 ??
  3098. (s_SingleAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(SingleAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3099. public static ValueTask<TSource> SingleAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  3100. {
  3101. if (source == null)
  3102. throw new ArgumentNullException(nameof(source));
  3103. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3104. }
  3105. private static MethodInfo s_SingleAsync__TSource__3__0;
  3106. private static MethodInfo SingleAsync__TSource__3__0(Type TSource) =>
  3107. (s_SingleAsync__TSource__3__0 ??
  3108. (s_SingleAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(SingleAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3109. public static ValueTask<TSource> SingleAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  3110. {
  3111. if (source == null)
  3112. throw new ArgumentNullException(nameof(source));
  3113. if (predicate == null)
  3114. throw new ArgumentNullException(nameof(predicate));
  3115. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3116. }
  3117. private static MethodInfo s_SingleAwaitAsync__TSource__3__0;
  3118. private static MethodInfo SingleAwaitAsync__TSource__3__0(Type TSource) =>
  3119. (s_SingleAwaitAsync__TSource__3__0 ??
  3120. (s_SingleAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(SingleAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3121. public static ValueTask<TSource> SingleAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  3122. {
  3123. if (source == null)
  3124. throw new ArgumentNullException(nameof(source));
  3125. if (predicate == null)
  3126. throw new ArgumentNullException(nameof(predicate));
  3127. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3128. }
  3129. private static MethodInfo s_SingleAwaitWithCancellationAsync__TSource__3__0;
  3130. private static MethodInfo SingleAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  3131. (s_SingleAwaitWithCancellationAsync__TSource__3__0 ??
  3132. (s_SingleAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(SingleAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3133. public static ValueTask<TSource> SingleAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  3134. {
  3135. if (source == null)
  3136. throw new ArgumentNullException(nameof(source));
  3137. if (predicate == null)
  3138. throw new ArgumentNullException(nameof(predicate));
  3139. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3140. }
  3141. private static MethodInfo s_SingleOrDefaultAsync__TSource__2__0;
  3142. private static MethodInfo SingleOrDefaultAsync__TSource__2__0(Type TSource) =>
  3143. (s_SingleOrDefaultAsync__TSource__2__0 ??
  3144. (s_SingleOrDefaultAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object>>(SingleOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3145. public static ValueTask<TSource> SingleOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  3146. {
  3147. if (source == null)
  3148. throw new ArgumentNullException(nameof(source));
  3149. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleOrDefaultAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3150. }
  3151. private static MethodInfo s_SingleOrDefaultAsync__TSource__3__0;
  3152. private static MethodInfo SingleOrDefaultAsync__TSource__3__0(Type TSource) =>
  3153. (s_SingleOrDefaultAsync__TSource__3__0 ??
  3154. (s_SingleOrDefaultAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, CancellationToken, ValueTask<object>>(SingleOrDefaultAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3155. public static ValueTask<TSource> SingleOrDefaultAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
  3156. {
  3157. if (source == null)
  3158. throw new ArgumentNullException(nameof(source));
  3159. if (predicate == null)
  3160. throw new ArgumentNullException(nameof(predicate));
  3161. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleOrDefaultAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3162. }
  3163. private static MethodInfo s_SingleOrDefaultAwaitAsync__TSource__3__0;
  3164. private static MethodInfo SingleOrDefaultAwaitAsync__TSource__3__0(Type TSource) =>
  3165. (s_SingleOrDefaultAwaitAsync__TSource__3__0 ??
  3166. (s_SingleOrDefaultAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(SingleOrDefaultAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3167. public static ValueTask<TSource> SingleOrDefaultAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  3168. {
  3169. if (source == null)
  3170. throw new ArgumentNullException(nameof(source));
  3171. if (predicate == null)
  3172. throw new ArgumentNullException(nameof(predicate));
  3173. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleOrDefaultAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3174. }
  3175. private static MethodInfo s_SingleOrDefaultAwaitWithCancellationAsync__TSource__3__0;
  3176. private static MethodInfo SingleOrDefaultAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  3177. (s_SingleOrDefaultAwaitWithCancellationAsync__TSource__3__0 ??
  3178. (s_SingleOrDefaultAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, CancellationToken, ValueTask<object>>(SingleOrDefaultAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3179. public static ValueTask<TSource> SingleOrDefaultAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate, CancellationToken cancellationToken = default)
  3180. {
  3181. if (source == null)
  3182. throw new ArgumentNullException(nameof(source));
  3183. if (predicate == null)
  3184. throw new ArgumentNullException(nameof(predicate));
  3185. return source.Provider.ExecuteAsync<TSource>(Expression.Call(SingleOrDefaultAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3186. }
  3187. private static MethodInfo s_Skip__TSource__2__0;
  3188. private static MethodInfo Skip__TSource__2__0(Type TSource) =>
  3189. (s_Skip__TSource__2__0 ??
  3190. (s_Skip__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Skip<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3191. public static IAsyncQueryable<TSource> Skip<TSource>(this IAsyncQueryable<TSource> source, int count)
  3192. {
  3193. if (source == null)
  3194. throw new ArgumentNullException(nameof(source));
  3195. return source.Provider.CreateQuery<TSource>(Expression.Call(Skip__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  3196. }
  3197. private static MethodInfo s_SkipLast__TSource__2__0;
  3198. private static MethodInfo SkipLast__TSource__2__0(Type TSource) =>
  3199. (s_SkipLast__TSource__2__0 ??
  3200. (s_SkipLast__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(SkipLast<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3201. public static IAsyncQueryable<TSource> SkipLast<TSource>(this IAsyncQueryable<TSource> source, int count)
  3202. {
  3203. if (source == null)
  3204. throw new ArgumentNullException(nameof(source));
  3205. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipLast__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  3206. }
  3207. private static MethodInfo s_SkipWhile__TSource__2__0;
  3208. private static MethodInfo SkipWhile__TSource__2__0(Type TSource) =>
  3209. (s_SkipWhile__TSource__2__0 ??
  3210. (s_SkipWhile__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, IAsyncQueryable<object>>(SkipWhile<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3211. public static IAsyncQueryable<TSource> SkipWhile<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
  3212. {
  3213. if (source == null)
  3214. throw new ArgumentNullException(nameof(source));
  3215. if (predicate == null)
  3216. throw new ArgumentNullException(nameof(predicate));
  3217. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhile__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3218. }
  3219. private static MethodInfo s_SkipWhile__TSource__2__1;
  3220. private static MethodInfo SkipWhile__TSource__2__1(Type TSource) =>
  3221. (s_SkipWhile__TSource__2__1 ??
  3222. (s_SkipWhile__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, bool>>, IAsyncQueryable<object>>(SkipWhile<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3223. public static IAsyncQueryable<TSource> SkipWhile<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
  3224. {
  3225. if (source == null)
  3226. throw new ArgumentNullException(nameof(source));
  3227. if (predicate == null)
  3228. throw new ArgumentNullException(nameof(predicate));
  3229. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhile__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3230. }
  3231. private static MethodInfo s_SkipWhileAwait__TSource__2__0;
  3232. private static MethodInfo SkipWhileAwait__TSource__2__0(Type TSource) =>
  3233. (s_SkipWhileAwait__TSource__2__0 ??
  3234. (s_SkipWhileAwait__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<bool>>>, IAsyncQueryable<object>>(SkipWhileAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3235. public static IAsyncQueryable<TSource> SkipWhileAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<bool>>> predicate)
  3236. {
  3237. if (source == null)
  3238. throw new ArgumentNullException(nameof(source));
  3239. if (predicate == null)
  3240. throw new ArgumentNullException(nameof(predicate));
  3241. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhileAwait__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3242. }
  3243. private static MethodInfo s_SkipWhileAwait__TSource__2__1;
  3244. private static MethodInfo SkipWhileAwait__TSource__2__1(Type TSource) =>
  3245. (s_SkipWhileAwait__TSource__2__1 ??
  3246. (s_SkipWhileAwait__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, IAsyncQueryable<object>>(SkipWhileAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3247. public static IAsyncQueryable<TSource> SkipWhileAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate)
  3248. {
  3249. if (source == null)
  3250. throw new ArgumentNullException(nameof(source));
  3251. if (predicate == null)
  3252. throw new ArgumentNullException(nameof(predicate));
  3253. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhileAwait__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3254. }
  3255. private static MethodInfo s_SkipWhileAwaitWithCancellation__TSource__2__0;
  3256. private static MethodInfo SkipWhileAwaitWithCancellation__TSource__2__0(Type TSource) =>
  3257. (s_SkipWhileAwaitWithCancellation__TSource__2__0 ??
  3258. (s_SkipWhileAwaitWithCancellation__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(SkipWhileAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3259. public static IAsyncQueryable<TSource> SkipWhileAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate)
  3260. {
  3261. if (source == null)
  3262. throw new ArgumentNullException(nameof(source));
  3263. if (predicate == null)
  3264. throw new ArgumentNullException(nameof(predicate));
  3265. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhileAwaitWithCancellation__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3266. }
  3267. private static MethodInfo s_SkipWhileAwaitWithCancellation__TSource__2__1;
  3268. private static MethodInfo SkipWhileAwaitWithCancellation__TSource__2__1(Type TSource) =>
  3269. (s_SkipWhileAwaitWithCancellation__TSource__2__1 ??
  3270. (s_SkipWhileAwaitWithCancellation__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(SkipWhileAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3271. public static IAsyncQueryable<TSource> SkipWhileAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<bool>>> predicate)
  3272. {
  3273. if (source == null)
  3274. throw new ArgumentNullException(nameof(source));
  3275. if (predicate == null)
  3276. throw new ArgumentNullException(nameof(predicate));
  3277. return source.Provider.CreateQuery<TSource>(Expression.Call(SkipWhileAwaitWithCancellation__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3278. }
  3279. private static MethodInfo s_SumAsync__2__0;
  3280. private static MethodInfo SumAsync__2__0 =>
  3281. (s_SumAsync__2__0 ??
  3282. (s_SumAsync__2__0 = new Func<IAsyncQueryable<decimal?>, CancellationToken, ValueTask<decimal?>>(SumAsync).GetMethodInfo()));
  3283. public static ValueTask<decimal?> SumAsync(this IAsyncQueryable<decimal?> source, CancellationToken cancellationToken = default)
  3284. {
  3285. if (source == null)
  3286. throw new ArgumentNullException(nameof(source));
  3287. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(SumAsync__2__0, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3288. }
  3289. private static MethodInfo s_SumAsync__2__1;
  3290. private static MethodInfo SumAsync__2__1 =>
  3291. (s_SumAsync__2__1 ??
  3292. (s_SumAsync__2__1 = new Func<IAsyncQueryable<decimal>, CancellationToken, ValueTask<decimal>>(SumAsync).GetMethodInfo()));
  3293. public static ValueTask<decimal> SumAsync(this IAsyncQueryable<decimal> source, CancellationToken cancellationToken = default)
  3294. {
  3295. if (source == null)
  3296. throw new ArgumentNullException(nameof(source));
  3297. return source.Provider.ExecuteAsync<decimal>(Expression.Call(SumAsync__2__1, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3298. }
  3299. private static MethodInfo s_SumAsync__2__2;
  3300. private static MethodInfo SumAsync__2__2 =>
  3301. (s_SumAsync__2__2 ??
  3302. (s_SumAsync__2__2 = new Func<IAsyncQueryable<double?>, CancellationToken, ValueTask<double?>>(SumAsync).GetMethodInfo()));
  3303. public static ValueTask<double?> SumAsync(this IAsyncQueryable<double?> source, CancellationToken cancellationToken = default)
  3304. {
  3305. if (source == null)
  3306. throw new ArgumentNullException(nameof(source));
  3307. return source.Provider.ExecuteAsync<double?>(Expression.Call(SumAsync__2__2, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3308. }
  3309. private static MethodInfo s_SumAsync__2__3;
  3310. private static MethodInfo SumAsync__2__3 =>
  3311. (s_SumAsync__2__3 ??
  3312. (s_SumAsync__2__3 = new Func<IAsyncQueryable<double>, CancellationToken, ValueTask<double>>(SumAsync).GetMethodInfo()));
  3313. public static ValueTask<double> SumAsync(this IAsyncQueryable<double> source, CancellationToken cancellationToken = default)
  3314. {
  3315. if (source == null)
  3316. throw new ArgumentNullException(nameof(source));
  3317. return source.Provider.ExecuteAsync<double>(Expression.Call(SumAsync__2__3, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3318. }
  3319. private static MethodInfo s_SumAsync__2__4;
  3320. private static MethodInfo SumAsync__2__4 =>
  3321. (s_SumAsync__2__4 ??
  3322. (s_SumAsync__2__4 = new Func<IAsyncQueryable<float?>, CancellationToken, ValueTask<float?>>(SumAsync).GetMethodInfo()));
  3323. public static ValueTask<float?> SumAsync(this IAsyncQueryable<float?> source, CancellationToken cancellationToken = default)
  3324. {
  3325. if (source == null)
  3326. throw new ArgumentNullException(nameof(source));
  3327. return source.Provider.ExecuteAsync<float?>(Expression.Call(SumAsync__2__4, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3328. }
  3329. private static MethodInfo s_SumAsync__2__5;
  3330. private static MethodInfo SumAsync__2__5 =>
  3331. (s_SumAsync__2__5 ??
  3332. (s_SumAsync__2__5 = new Func<IAsyncQueryable<float>, CancellationToken, ValueTask<float>>(SumAsync).GetMethodInfo()));
  3333. public static ValueTask<float> SumAsync(this IAsyncQueryable<float> source, CancellationToken cancellationToken = default)
  3334. {
  3335. if (source == null)
  3336. throw new ArgumentNullException(nameof(source));
  3337. return source.Provider.ExecuteAsync<float>(Expression.Call(SumAsync__2__5, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3338. }
  3339. private static MethodInfo s_SumAsync__2__6;
  3340. private static MethodInfo SumAsync__2__6 =>
  3341. (s_SumAsync__2__6 ??
  3342. (s_SumAsync__2__6 = new Func<IAsyncQueryable<int?>, CancellationToken, ValueTask<int?>>(SumAsync).GetMethodInfo()));
  3343. public static ValueTask<int?> SumAsync(this IAsyncQueryable<int?> source, CancellationToken cancellationToken = default)
  3344. {
  3345. if (source == null)
  3346. throw new ArgumentNullException(nameof(source));
  3347. return source.Provider.ExecuteAsync<int?>(Expression.Call(SumAsync__2__6, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3348. }
  3349. private static MethodInfo s_SumAsync__2__7;
  3350. private static MethodInfo SumAsync__2__7 =>
  3351. (s_SumAsync__2__7 ??
  3352. (s_SumAsync__2__7 = new Func<IAsyncQueryable<int>, CancellationToken, ValueTask<int>>(SumAsync).GetMethodInfo()));
  3353. public static ValueTask<int> SumAsync(this IAsyncQueryable<int> source, CancellationToken cancellationToken = default)
  3354. {
  3355. if (source == null)
  3356. throw new ArgumentNullException(nameof(source));
  3357. return source.Provider.ExecuteAsync<int>(Expression.Call(SumAsync__2__7, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3358. }
  3359. private static MethodInfo s_SumAsync__2__8;
  3360. private static MethodInfo SumAsync__2__8 =>
  3361. (s_SumAsync__2__8 ??
  3362. (s_SumAsync__2__8 = new Func<IAsyncQueryable<long?>, CancellationToken, ValueTask<long?>>(SumAsync).GetMethodInfo()));
  3363. public static ValueTask<long?> SumAsync(this IAsyncQueryable<long?> source, CancellationToken cancellationToken = default)
  3364. {
  3365. if (source == null)
  3366. throw new ArgumentNullException(nameof(source));
  3367. return source.Provider.ExecuteAsync<long?>(Expression.Call(SumAsync__2__8, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3368. }
  3369. private static MethodInfo s_SumAsync__2__9;
  3370. private static MethodInfo SumAsync__2__9 =>
  3371. (s_SumAsync__2__9 ??
  3372. (s_SumAsync__2__9 = new Func<IAsyncQueryable<long>, CancellationToken, ValueTask<long>>(SumAsync).GetMethodInfo()));
  3373. public static ValueTask<long> SumAsync(this IAsyncQueryable<long> source, CancellationToken cancellationToken = default)
  3374. {
  3375. if (source == null)
  3376. throw new ArgumentNullException(nameof(source));
  3377. return source.Provider.ExecuteAsync<long>(Expression.Call(SumAsync__2__9, source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3378. }
  3379. private static MethodInfo s_SumAsync__TSource__3__0;
  3380. private static MethodInfo SumAsync__TSource__3__0(Type TSource) =>
  3381. (s_SumAsync__TSource__3__0 ??
  3382. (s_SumAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal?>>, CancellationToken, ValueTask<decimal?>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3383. public static ValueTask<decimal?> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
  3384. {
  3385. if (source == null)
  3386. throw new ArgumentNullException(nameof(source));
  3387. if (selector == null)
  3388. throw new ArgumentNullException(nameof(selector));
  3389. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(SumAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3390. }
  3391. private static MethodInfo s_SumAsync__TSource__3__1;
  3392. private static MethodInfo SumAsync__TSource__3__1(Type TSource) =>
  3393. (s_SumAsync__TSource__3__1 ??
  3394. (s_SumAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, decimal>>, CancellationToken, ValueTask<decimal>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3395. public static ValueTask<decimal> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
  3396. {
  3397. if (source == null)
  3398. throw new ArgumentNullException(nameof(source));
  3399. if (selector == null)
  3400. throw new ArgumentNullException(nameof(selector));
  3401. return source.Provider.ExecuteAsync<decimal>(Expression.Call(SumAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3402. }
  3403. private static MethodInfo s_SumAsync__TSource__3__2;
  3404. private static MethodInfo SumAsync__TSource__3__2(Type TSource) =>
  3405. (s_SumAsync__TSource__3__2 ??
  3406. (s_SumAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, double?>>, CancellationToken, ValueTask<double?>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3407. public static ValueTask<double?> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
  3408. {
  3409. if (source == null)
  3410. throw new ArgumentNullException(nameof(source));
  3411. if (selector == null)
  3412. throw new ArgumentNullException(nameof(selector));
  3413. return source.Provider.ExecuteAsync<double?>(Expression.Call(SumAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3414. }
  3415. private static MethodInfo s_SumAsync__TSource__3__3;
  3416. private static MethodInfo SumAsync__TSource__3__3(Type TSource) =>
  3417. (s_SumAsync__TSource__3__3 ??
  3418. (s_SumAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, double>>, CancellationToken, ValueTask<double>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3419. public static ValueTask<double> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
  3420. {
  3421. if (source == null)
  3422. throw new ArgumentNullException(nameof(source));
  3423. if (selector == null)
  3424. throw new ArgumentNullException(nameof(selector));
  3425. return source.Provider.ExecuteAsync<double>(Expression.Call(SumAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3426. }
  3427. private static MethodInfo s_SumAsync__TSource__3__4;
  3428. private static MethodInfo SumAsync__TSource__3__4(Type TSource) =>
  3429. (s_SumAsync__TSource__3__4 ??
  3430. (s_SumAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, float?>>, CancellationToken, ValueTask<float?>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3431. public static ValueTask<float?> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
  3432. {
  3433. if (source == null)
  3434. throw new ArgumentNullException(nameof(source));
  3435. if (selector == null)
  3436. throw new ArgumentNullException(nameof(selector));
  3437. return source.Provider.ExecuteAsync<float?>(Expression.Call(SumAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3438. }
  3439. private static MethodInfo s_SumAsync__TSource__3__5;
  3440. private static MethodInfo SumAsync__TSource__3__5(Type TSource) =>
  3441. (s_SumAsync__TSource__3__5 ??
  3442. (s_SumAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, float>>, CancellationToken, ValueTask<float>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3443. public static ValueTask<float> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
  3444. {
  3445. if (source == null)
  3446. throw new ArgumentNullException(nameof(source));
  3447. if (selector == null)
  3448. throw new ArgumentNullException(nameof(selector));
  3449. return source.Provider.ExecuteAsync<float>(Expression.Call(SumAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3450. }
  3451. private static MethodInfo s_SumAsync__TSource__3__6;
  3452. private static MethodInfo SumAsync__TSource__3__6(Type TSource) =>
  3453. (s_SumAsync__TSource__3__6 ??
  3454. (s_SumAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, int?>>, CancellationToken, ValueTask<int?>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3455. public static ValueTask<int?> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
  3456. {
  3457. if (source == null)
  3458. throw new ArgumentNullException(nameof(source));
  3459. if (selector == null)
  3460. throw new ArgumentNullException(nameof(selector));
  3461. return source.Provider.ExecuteAsync<int?>(Expression.Call(SumAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3462. }
  3463. private static MethodInfo s_SumAsync__TSource__3__7;
  3464. private static MethodInfo SumAsync__TSource__3__7(Type TSource) =>
  3465. (s_SumAsync__TSource__3__7 ??
  3466. (s_SumAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, int>>, CancellationToken, ValueTask<int>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3467. public static ValueTask<int> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
  3468. {
  3469. if (source == null)
  3470. throw new ArgumentNullException(nameof(source));
  3471. if (selector == null)
  3472. throw new ArgumentNullException(nameof(selector));
  3473. return source.Provider.ExecuteAsync<int>(Expression.Call(SumAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3474. }
  3475. private static MethodInfo s_SumAsync__TSource__3__8;
  3476. private static MethodInfo SumAsync__TSource__3__8(Type TSource) =>
  3477. (s_SumAsync__TSource__3__8 ??
  3478. (s_SumAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, long?>>, CancellationToken, ValueTask<long?>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3479. public static ValueTask<long?> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
  3480. {
  3481. if (source == null)
  3482. throw new ArgumentNullException(nameof(source));
  3483. if (selector == null)
  3484. throw new ArgumentNullException(nameof(selector));
  3485. return source.Provider.ExecuteAsync<long?>(Expression.Call(SumAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3486. }
  3487. private static MethodInfo s_SumAsync__TSource__3__9;
  3488. private static MethodInfo SumAsync__TSource__3__9(Type TSource) =>
  3489. (s_SumAsync__TSource__3__9 ??
  3490. (s_SumAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, long>>, CancellationToken, ValueTask<long>>(SumAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3491. public static ValueTask<long> SumAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
  3492. {
  3493. if (source == null)
  3494. throw new ArgumentNullException(nameof(source));
  3495. if (selector == null)
  3496. throw new ArgumentNullException(nameof(selector));
  3497. return source.Provider.ExecuteAsync<long>(Expression.Call(SumAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3498. }
  3499. private static MethodInfo s_SumAwaitAsync__TSource__3__0;
  3500. private static MethodInfo SumAwaitAsync__TSource__3__0(Type TSource) =>
  3501. (s_SumAwaitAsync__TSource__3__0 ??
  3502. (s_SumAwaitAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3503. public static ValueTask<decimal?> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  3504. {
  3505. if (source == null)
  3506. throw new ArgumentNullException(nameof(source));
  3507. if (selector == null)
  3508. throw new ArgumentNullException(nameof(selector));
  3509. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(SumAwaitAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3510. }
  3511. private static MethodInfo s_SumAwaitAsync__TSource__3__1;
  3512. private static MethodInfo SumAwaitAsync__TSource__3__1(Type TSource) =>
  3513. (s_SumAwaitAsync__TSource__3__1 ??
  3514. (s_SumAwaitAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3515. public static ValueTask<decimal> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  3516. {
  3517. if (source == null)
  3518. throw new ArgumentNullException(nameof(source));
  3519. if (selector == null)
  3520. throw new ArgumentNullException(nameof(selector));
  3521. return source.Provider.ExecuteAsync<decimal>(Expression.Call(SumAwaitAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3522. }
  3523. private static MethodInfo s_SumAwaitAsync__TSource__3__2;
  3524. private static MethodInfo SumAwaitAsync__TSource__3__2(Type TSource) =>
  3525. (s_SumAwaitAsync__TSource__3__2 ??
  3526. (s_SumAwaitAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3527. public static ValueTask<double?> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  3528. {
  3529. if (source == null)
  3530. throw new ArgumentNullException(nameof(source));
  3531. if (selector == null)
  3532. throw new ArgumentNullException(nameof(selector));
  3533. return source.Provider.ExecuteAsync<double?>(Expression.Call(SumAwaitAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3534. }
  3535. private static MethodInfo s_SumAwaitAsync__TSource__3__3;
  3536. private static MethodInfo SumAwaitAsync__TSource__3__3(Type TSource) =>
  3537. (s_SumAwaitAsync__TSource__3__3 ??
  3538. (s_SumAwaitAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<double>>>, CancellationToken, ValueTask<double>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3539. public static ValueTask<double> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  3540. {
  3541. if (source == null)
  3542. throw new ArgumentNullException(nameof(source));
  3543. if (selector == null)
  3544. throw new ArgumentNullException(nameof(selector));
  3545. return source.Provider.ExecuteAsync<double>(Expression.Call(SumAwaitAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3546. }
  3547. private static MethodInfo s_SumAwaitAsync__TSource__3__4;
  3548. private static MethodInfo SumAwaitAsync__TSource__3__4(Type TSource) =>
  3549. (s_SumAwaitAsync__TSource__3__4 ??
  3550. (s_SumAwaitAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3551. public static ValueTask<float?> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  3552. {
  3553. if (source == null)
  3554. throw new ArgumentNullException(nameof(source));
  3555. if (selector == null)
  3556. throw new ArgumentNullException(nameof(selector));
  3557. return source.Provider.ExecuteAsync<float?>(Expression.Call(SumAwaitAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3558. }
  3559. private static MethodInfo s_SumAwaitAsync__TSource__3__5;
  3560. private static MethodInfo SumAwaitAsync__TSource__3__5(Type TSource) =>
  3561. (s_SumAwaitAsync__TSource__3__5 ??
  3562. (s_SumAwaitAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<float>>>, CancellationToken, ValueTask<float>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3563. public static ValueTask<float> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  3564. {
  3565. if (source == null)
  3566. throw new ArgumentNullException(nameof(source));
  3567. if (selector == null)
  3568. throw new ArgumentNullException(nameof(selector));
  3569. return source.Provider.ExecuteAsync<float>(Expression.Call(SumAwaitAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3570. }
  3571. private static MethodInfo s_SumAwaitAsync__TSource__3__6;
  3572. private static MethodInfo SumAwaitAsync__TSource__3__6(Type TSource) =>
  3573. (s_SumAwaitAsync__TSource__3__6 ??
  3574. (s_SumAwaitAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3575. public static ValueTask<int?> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  3576. {
  3577. if (source == null)
  3578. throw new ArgumentNullException(nameof(source));
  3579. if (selector == null)
  3580. throw new ArgumentNullException(nameof(selector));
  3581. return source.Provider.ExecuteAsync<int?>(Expression.Call(SumAwaitAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3582. }
  3583. private static MethodInfo s_SumAwaitAsync__TSource__3__7;
  3584. private static MethodInfo SumAwaitAsync__TSource__3__7(Type TSource) =>
  3585. (s_SumAwaitAsync__TSource__3__7 ??
  3586. (s_SumAwaitAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<int>>>, CancellationToken, ValueTask<int>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3587. public static ValueTask<int> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  3588. {
  3589. if (source == null)
  3590. throw new ArgumentNullException(nameof(source));
  3591. if (selector == null)
  3592. throw new ArgumentNullException(nameof(selector));
  3593. return source.Provider.ExecuteAsync<int>(Expression.Call(SumAwaitAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3594. }
  3595. private static MethodInfo s_SumAwaitAsync__TSource__3__8;
  3596. private static MethodInfo SumAwaitAsync__TSource__3__8(Type TSource) =>
  3597. (s_SumAwaitAsync__TSource__3__8 ??
  3598. (s_SumAwaitAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3599. public static ValueTask<long?> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  3600. {
  3601. if (source == null)
  3602. throw new ArgumentNullException(nameof(source));
  3603. if (selector == null)
  3604. throw new ArgumentNullException(nameof(selector));
  3605. return source.Provider.ExecuteAsync<long?>(Expression.Call(SumAwaitAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3606. }
  3607. private static MethodInfo s_SumAwaitAsync__TSource__3__9;
  3608. private static MethodInfo SumAwaitAsync__TSource__3__9(Type TSource) =>
  3609. (s_SumAwaitAsync__TSource__3__9 ??
  3610. (s_SumAwaitAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<long>>>, CancellationToken, ValueTask<long>>(SumAwaitAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3611. public static ValueTask<long> SumAwaitAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  3612. {
  3613. if (source == null)
  3614. throw new ArgumentNullException(nameof(source));
  3615. if (selector == null)
  3616. throw new ArgumentNullException(nameof(selector));
  3617. return source.Provider.ExecuteAsync<long>(Expression.Call(SumAwaitAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3618. }
  3619. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__0;
  3620. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__0(Type TSource) =>
  3621. (s_SumAwaitWithCancellationAsync__TSource__3__0 ??
  3622. (s_SumAwaitWithCancellationAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal?>>>, CancellationToken, ValueTask<decimal?>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3623. public static ValueTask<decimal?> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal?>>> selector, CancellationToken cancellationToken = default)
  3624. {
  3625. if (source == null)
  3626. throw new ArgumentNullException(nameof(source));
  3627. if (selector == null)
  3628. throw new ArgumentNullException(nameof(selector));
  3629. return source.Provider.ExecuteAsync<decimal?>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__0(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3630. }
  3631. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__1;
  3632. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__1(Type TSource) =>
  3633. (s_SumAwaitWithCancellationAsync__TSource__3__1 ??
  3634. (s_SumAwaitWithCancellationAsync__TSource__3__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<decimal>>>, CancellationToken, ValueTask<decimal>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3635. public static ValueTask<decimal> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<decimal>>> selector, CancellationToken cancellationToken = default)
  3636. {
  3637. if (source == null)
  3638. throw new ArgumentNullException(nameof(source));
  3639. if (selector == null)
  3640. throw new ArgumentNullException(nameof(selector));
  3641. return source.Provider.ExecuteAsync<decimal>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__1(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3642. }
  3643. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__2;
  3644. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__2(Type TSource) =>
  3645. (s_SumAwaitWithCancellationAsync__TSource__3__2 ??
  3646. (s_SumAwaitWithCancellationAsync__TSource__3__2 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double?>>>, CancellationToken, ValueTask<double?>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3647. public static ValueTask<double?> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double?>>> selector, CancellationToken cancellationToken = default)
  3648. {
  3649. if (source == null)
  3650. throw new ArgumentNullException(nameof(source));
  3651. if (selector == null)
  3652. throw new ArgumentNullException(nameof(selector));
  3653. return source.Provider.ExecuteAsync<double?>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__2(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3654. }
  3655. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__3;
  3656. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__3(Type TSource) =>
  3657. (s_SumAwaitWithCancellationAsync__TSource__3__3 ??
  3658. (s_SumAwaitWithCancellationAsync__TSource__3__3 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<double>>>, CancellationToken, ValueTask<double>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3659. public static ValueTask<double> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<double>>> selector, CancellationToken cancellationToken = default)
  3660. {
  3661. if (source == null)
  3662. throw new ArgumentNullException(nameof(source));
  3663. if (selector == null)
  3664. throw new ArgumentNullException(nameof(selector));
  3665. return source.Provider.ExecuteAsync<double>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__3(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3666. }
  3667. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__4;
  3668. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__4(Type TSource) =>
  3669. (s_SumAwaitWithCancellationAsync__TSource__3__4 ??
  3670. (s_SumAwaitWithCancellationAsync__TSource__3__4 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float?>>>, CancellationToken, ValueTask<float?>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3671. public static ValueTask<float?> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float?>>> selector, CancellationToken cancellationToken = default)
  3672. {
  3673. if (source == null)
  3674. throw new ArgumentNullException(nameof(source));
  3675. if (selector == null)
  3676. throw new ArgumentNullException(nameof(selector));
  3677. return source.Provider.ExecuteAsync<float?>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__4(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3678. }
  3679. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__5;
  3680. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__5(Type TSource) =>
  3681. (s_SumAwaitWithCancellationAsync__TSource__3__5 ??
  3682. (s_SumAwaitWithCancellationAsync__TSource__3__5 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<float>>>, CancellationToken, ValueTask<float>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3683. public static ValueTask<float> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<float>>> selector, CancellationToken cancellationToken = default)
  3684. {
  3685. if (source == null)
  3686. throw new ArgumentNullException(nameof(source));
  3687. if (selector == null)
  3688. throw new ArgumentNullException(nameof(selector));
  3689. return source.Provider.ExecuteAsync<float>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__5(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3690. }
  3691. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__6;
  3692. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__6(Type TSource) =>
  3693. (s_SumAwaitWithCancellationAsync__TSource__3__6 ??
  3694. (s_SumAwaitWithCancellationAsync__TSource__3__6 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int?>>>, CancellationToken, ValueTask<int?>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3695. public static ValueTask<int?> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int?>>> selector, CancellationToken cancellationToken = default)
  3696. {
  3697. if (source == null)
  3698. throw new ArgumentNullException(nameof(source));
  3699. if (selector == null)
  3700. throw new ArgumentNullException(nameof(selector));
  3701. return source.Provider.ExecuteAsync<int?>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__6(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3702. }
  3703. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__7;
  3704. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__7(Type TSource) =>
  3705. (s_SumAwaitWithCancellationAsync__TSource__3__7 ??
  3706. (s_SumAwaitWithCancellationAsync__TSource__3__7 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<int>>>, CancellationToken, ValueTask<int>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3707. public static ValueTask<int> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<int>>> selector, CancellationToken cancellationToken = default)
  3708. {
  3709. if (source == null)
  3710. throw new ArgumentNullException(nameof(source));
  3711. if (selector == null)
  3712. throw new ArgumentNullException(nameof(selector));
  3713. return source.Provider.ExecuteAsync<int>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__7(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3714. }
  3715. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__8;
  3716. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__8(Type TSource) =>
  3717. (s_SumAwaitWithCancellationAsync__TSource__3__8 ??
  3718. (s_SumAwaitWithCancellationAsync__TSource__3__8 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long?>>>, CancellationToken, ValueTask<long?>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3719. public static ValueTask<long?> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long?>>> selector, CancellationToken cancellationToken = default)
  3720. {
  3721. if (source == null)
  3722. throw new ArgumentNullException(nameof(source));
  3723. if (selector == null)
  3724. throw new ArgumentNullException(nameof(selector));
  3725. return source.Provider.ExecuteAsync<long?>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__8(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3726. }
  3727. private static MethodInfo s_SumAwaitWithCancellationAsync__TSource__3__9;
  3728. private static MethodInfo SumAwaitWithCancellationAsync__TSource__3__9(Type TSource) =>
  3729. (s_SumAwaitWithCancellationAsync__TSource__3__9 ??
  3730. (s_SumAwaitWithCancellationAsync__TSource__3__9 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<long>>>, CancellationToken, ValueTask<long>>(SumAwaitWithCancellationAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3731. public static ValueTask<long> SumAwaitWithCancellationAsync<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<long>>> selector, CancellationToken cancellationToken = default)
  3732. {
  3733. if (source == null)
  3734. throw new ArgumentNullException(nameof(source));
  3735. if (selector == null)
  3736. throw new ArgumentNullException(nameof(selector));
  3737. return source.Provider.ExecuteAsync<long>(Expression.Call(SumAwaitWithCancellationAsync__TSource__3__9(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3738. }
  3739. private static MethodInfo s_Take__TSource__2__0;
  3740. private static MethodInfo Take__TSource__2__0(Type TSource) =>
  3741. (s_Take__TSource__2__0 ??
  3742. (s_Take__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(Take<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3743. public static IAsyncQueryable<TSource> Take<TSource>(this IAsyncQueryable<TSource> source, int count)
  3744. {
  3745. if (source == null)
  3746. throw new ArgumentNullException(nameof(source));
  3747. return source.Provider.CreateQuery<TSource>(Expression.Call(Take__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  3748. }
  3749. private static MethodInfo s_TakeLast__TSource__2__0;
  3750. private static MethodInfo TakeLast__TSource__2__0(Type TSource) =>
  3751. (s_TakeLast__TSource__2__0 ??
  3752. (s_TakeLast__TSource__2__0 = new Func<IAsyncQueryable<object>, int, IAsyncQueryable<object>>(TakeLast<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3753. public static IAsyncQueryable<TSource> TakeLast<TSource>(this IAsyncQueryable<TSource> source, int count)
  3754. {
  3755. if (source == null)
  3756. throw new ArgumentNullException(nameof(source));
  3757. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeLast__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int))));
  3758. }
  3759. private static MethodInfo s_TakeWhile__TSource__2__0;
  3760. private static MethodInfo TakeWhile__TSource__2__0(Type TSource) =>
  3761. (s_TakeWhile__TSource__2__0 ??
  3762. (s_TakeWhile__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, IAsyncQueryable<object>>(TakeWhile<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3763. public static IAsyncQueryable<TSource> TakeWhile<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
  3764. {
  3765. if (source == null)
  3766. throw new ArgumentNullException(nameof(source));
  3767. if (predicate == null)
  3768. throw new ArgumentNullException(nameof(predicate));
  3769. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhile__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3770. }
  3771. private static MethodInfo s_TakeWhile__TSource__2__1;
  3772. private static MethodInfo TakeWhile__TSource__2__1(Type TSource) =>
  3773. (s_TakeWhile__TSource__2__1 ??
  3774. (s_TakeWhile__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, bool>>, IAsyncQueryable<object>>(TakeWhile<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3775. public static IAsyncQueryable<TSource> TakeWhile<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
  3776. {
  3777. if (source == null)
  3778. throw new ArgumentNullException(nameof(source));
  3779. if (predicate == null)
  3780. throw new ArgumentNullException(nameof(predicate));
  3781. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhile__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3782. }
  3783. private static MethodInfo s_TakeWhileAwait__TSource__2__0;
  3784. private static MethodInfo TakeWhileAwait__TSource__2__0(Type TSource) =>
  3785. (s_TakeWhileAwait__TSource__2__0 ??
  3786. (s_TakeWhileAwait__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<bool>>>, IAsyncQueryable<object>>(TakeWhileAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3787. public static IAsyncQueryable<TSource> TakeWhileAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<bool>>> predicate)
  3788. {
  3789. if (source == null)
  3790. throw new ArgumentNullException(nameof(source));
  3791. if (predicate == null)
  3792. throw new ArgumentNullException(nameof(predicate));
  3793. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhileAwait__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3794. }
  3795. private static MethodInfo s_TakeWhileAwait__TSource__2__1;
  3796. private static MethodInfo TakeWhileAwait__TSource__2__1(Type TSource) =>
  3797. (s_TakeWhileAwait__TSource__2__1 ??
  3798. (s_TakeWhileAwait__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, IAsyncQueryable<object>>(TakeWhileAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3799. public static IAsyncQueryable<TSource> TakeWhileAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate)
  3800. {
  3801. if (source == null)
  3802. throw new ArgumentNullException(nameof(source));
  3803. if (predicate == null)
  3804. throw new ArgumentNullException(nameof(predicate));
  3805. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhileAwait__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3806. }
  3807. private static MethodInfo s_TakeWhileAwaitWithCancellation__TSource__2__0;
  3808. private static MethodInfo TakeWhileAwaitWithCancellation__TSource__2__0(Type TSource) =>
  3809. (s_TakeWhileAwaitWithCancellation__TSource__2__0 ??
  3810. (s_TakeWhileAwaitWithCancellation__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(TakeWhileAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3811. public static IAsyncQueryable<TSource> TakeWhileAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate)
  3812. {
  3813. if (source == null)
  3814. throw new ArgumentNullException(nameof(source));
  3815. if (predicate == null)
  3816. throw new ArgumentNullException(nameof(predicate));
  3817. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhileAwaitWithCancellation__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  3818. }
  3819. private static MethodInfo s_TakeWhileAwaitWithCancellation__TSource__2__1;
  3820. private static MethodInfo TakeWhileAwaitWithCancellation__TSource__2__1(Type TSource) =>
  3821. (s_TakeWhileAwaitWithCancellation__TSource__2__1 ??
  3822. (s_TakeWhileAwaitWithCancellation__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(TakeWhileAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3823. public static IAsyncQueryable<TSource> TakeWhileAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<bool>>> predicate)
  3824. {
  3825. if (source == null)
  3826. throw new ArgumentNullException(nameof(source));
  3827. if (predicate == null)
  3828. throw new ArgumentNullException(nameof(predicate));
  3829. return source.Provider.CreateQuery<TSource>(Expression.Call(TakeWhileAwaitWithCancellation__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  3830. }
  3831. private static MethodInfo s_ThenBy__TSource_TKey__2__0;
  3832. private static MethodInfo ThenBy__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3833. (s_ThenBy__TSource_TKey__2__0 ??
  3834. (s_ThenBy__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, object>>, IOrderedAsyncQueryable<object>>(ThenBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3835. public static IOrderedAsyncQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  3836. {
  3837. if (source == null)
  3838. throw new ArgumentNullException(nameof(source));
  3839. if (keySelector == null)
  3840. throw new ArgumentNullException(nameof(keySelector));
  3841. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenBy__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3842. }
  3843. private static MethodInfo s_ThenBy__TSource_TKey__3__0;
  3844. private static MethodInfo ThenBy__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3845. (s_ThenBy__TSource_TKey__3__0 ??
  3846. (s_ThenBy__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenBy<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3847. public static IOrderedAsyncQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
  3848. {
  3849. if (source == null)
  3850. throw new ArgumentNullException(nameof(source));
  3851. if (keySelector == null)
  3852. throw new ArgumentNullException(nameof(keySelector));
  3853. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenBy__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3854. }
  3855. private static MethodInfo s_ThenByAwait__TSource_TKey__2__0;
  3856. private static MethodInfo ThenByAwait__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3857. (s_ThenByAwait__TSource_TKey__2__0 ??
  3858. (s_ThenByAwait__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(ThenByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3859. public static IOrderedAsyncQueryable<TSource> ThenByAwait<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  3860. {
  3861. if (source == null)
  3862. throw new ArgumentNullException(nameof(source));
  3863. if (keySelector == null)
  3864. throw new ArgumentNullException(nameof(keySelector));
  3865. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByAwait__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3866. }
  3867. private static MethodInfo s_ThenByAwait__TSource_TKey__3__0;
  3868. private static MethodInfo ThenByAwait__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3869. (s_ThenByAwait__TSource_TKey__3__0 ??
  3870. (s_ThenByAwait__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenByAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3871. public static IOrderedAsyncQueryable<TSource> ThenByAwait<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  3872. {
  3873. if (source == null)
  3874. throw new ArgumentNullException(nameof(source));
  3875. if (keySelector == null)
  3876. throw new ArgumentNullException(nameof(keySelector));
  3877. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByAwait__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3878. }
  3879. private static MethodInfo s_ThenByAwaitWithCancellation__TSource_TKey__2__0;
  3880. private static MethodInfo ThenByAwaitWithCancellation__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3881. (s_ThenByAwaitWithCancellation__TSource_TKey__2__0 ??
  3882. (s_ThenByAwaitWithCancellation__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(ThenByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3883. public static IOrderedAsyncQueryable<TSource> ThenByAwaitWithCancellation<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  3884. {
  3885. if (source == null)
  3886. throw new ArgumentNullException(nameof(source));
  3887. if (keySelector == null)
  3888. throw new ArgumentNullException(nameof(keySelector));
  3889. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByAwaitWithCancellation__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3890. }
  3891. private static MethodInfo s_ThenByAwaitWithCancellation__TSource_TKey__3__0;
  3892. private static MethodInfo ThenByAwaitWithCancellation__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3893. (s_ThenByAwaitWithCancellation__TSource_TKey__3__0 ??
  3894. (s_ThenByAwaitWithCancellation__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenByAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3895. public static IOrderedAsyncQueryable<TSource> ThenByAwaitWithCancellation<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  3896. {
  3897. if (source == null)
  3898. throw new ArgumentNullException(nameof(source));
  3899. if (keySelector == null)
  3900. throw new ArgumentNullException(nameof(keySelector));
  3901. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByAwaitWithCancellation__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3902. }
  3903. private static MethodInfo s_ThenByDescending__TSource_TKey__2__0;
  3904. private static MethodInfo ThenByDescending__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3905. (s_ThenByDescending__TSource_TKey__2__0 ??
  3906. (s_ThenByDescending__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, object>>, IOrderedAsyncQueryable<object>>(ThenByDescending<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3907. public static IOrderedAsyncQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
  3908. {
  3909. if (source == null)
  3910. throw new ArgumentNullException(nameof(source));
  3911. if (keySelector == null)
  3912. throw new ArgumentNullException(nameof(keySelector));
  3913. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescending__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3914. }
  3915. private static MethodInfo s_ThenByDescending__TSource_TKey__3__0;
  3916. private static MethodInfo ThenByDescending__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3917. (s_ThenByDescending__TSource_TKey__3__0 ??
  3918. (s_ThenByDescending__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenByDescending<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3919. public static IOrderedAsyncQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
  3920. {
  3921. if (source == null)
  3922. throw new ArgumentNullException(nameof(source));
  3923. if (keySelector == null)
  3924. throw new ArgumentNullException(nameof(keySelector));
  3925. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescending__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3926. }
  3927. private static MethodInfo s_ThenByDescendingAwait__TSource_TKey__2__0;
  3928. private static MethodInfo ThenByDescendingAwait__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3929. (s_ThenByDescendingAwait__TSource_TKey__2__0 ??
  3930. (s_ThenByDescendingAwait__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(ThenByDescendingAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3931. public static IOrderedAsyncQueryable<TSource> ThenByDescendingAwait<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector)
  3932. {
  3933. if (source == null)
  3934. throw new ArgumentNullException(nameof(source));
  3935. if (keySelector == null)
  3936. throw new ArgumentNullException(nameof(keySelector));
  3937. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescendingAwait__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3938. }
  3939. private static MethodInfo s_ThenByDescendingAwait__TSource_TKey__3__0;
  3940. private static MethodInfo ThenByDescendingAwait__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3941. (s_ThenByDescendingAwait__TSource_TKey__3__0 ??
  3942. (s_ThenByDescendingAwait__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenByDescendingAwait<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3943. public static IOrderedAsyncQueryable<TSource> ThenByDescendingAwait<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  3944. {
  3945. if (source == null)
  3946. throw new ArgumentNullException(nameof(source));
  3947. if (keySelector == null)
  3948. throw new ArgumentNullException(nameof(keySelector));
  3949. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescendingAwait__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3950. }
  3951. private static MethodInfo s_ThenByDescendingAwaitWithCancellation__TSource_TKey__2__0;
  3952. private static MethodInfo ThenByDescendingAwaitWithCancellation__TSource_TKey__2__0(Type TSource, Type TKey) =>
  3953. (s_ThenByDescendingAwaitWithCancellation__TSource_TKey__2__0 ??
  3954. (s_ThenByDescendingAwaitWithCancellation__TSource_TKey__2__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IOrderedAsyncQueryable<object>>(ThenByDescendingAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3955. public static IOrderedAsyncQueryable<TSource> ThenByDescendingAwaitWithCancellation<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector)
  3956. {
  3957. if (source == null)
  3958. throw new ArgumentNullException(nameof(source));
  3959. if (keySelector == null)
  3960. throw new ArgumentNullException(nameof(keySelector));
  3961. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescendingAwaitWithCancellation__TSource_TKey__2__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector));
  3962. }
  3963. private static MethodInfo s_ThenByDescendingAwaitWithCancellation__TSource_TKey__3__0;
  3964. private static MethodInfo ThenByDescendingAwaitWithCancellation__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3965. (s_ThenByDescendingAwaitWithCancellation__TSource_TKey__3__0 ??
  3966. (s_ThenByDescendingAwaitWithCancellation__TSource_TKey__3__0 = new Func<IOrderedAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IComparer<object>, IOrderedAsyncQueryable<object>>(ThenByDescendingAwaitWithCancellation<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3967. public static IOrderedAsyncQueryable<TSource> ThenByDescendingAwaitWithCancellation<TSource, TKey>(this IOrderedAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IComparer<TKey>? comparer)
  3968. {
  3969. if (source == null)
  3970. throw new ArgumentNullException(nameof(source));
  3971. if (keySelector == null)
  3972. throw new ArgumentNullException(nameof(keySelector));
  3973. return (IOrderedAsyncQueryable<TSource>)source.Provider.CreateQuery<TSource>(Expression.Call(ThenByDescendingAwaitWithCancellation__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer<TKey>))));
  3974. }
  3975. private static MethodInfo s_ToArrayAsync__TSource__2__0;
  3976. private static MethodInfo ToArrayAsync__TSource__2__0(Type TSource) =>
  3977. (s_ToArrayAsync__TSource__2__0 ??
  3978. (s_ToArrayAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<object[]>>(ToArrayAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  3979. public static ValueTask<TSource[]> ToArrayAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  3980. {
  3981. if (source == null)
  3982. throw new ArgumentNullException(nameof(source));
  3983. return source.Provider.ExecuteAsync<TSource[]>(Expression.Call(ToArrayAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3984. }
  3985. private static MethodInfo s_ToDictionaryAsync__TSource_TKey__3__0;
  3986. private static MethodInfo ToDictionaryAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  3987. (s_ToDictionaryAsync__TSource_TKey__3__0 ??
  3988. (s_ToDictionaryAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  3989. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  3990. {
  3991. if (source == null)
  3992. throw new ArgumentNullException(nameof(source));
  3993. if (keySelector == null)
  3994. throw new ArgumentNullException(nameof(keySelector));
  3995. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  3996. }
  3997. private static MethodInfo s_ToDictionaryAsync__TSource_TKey__4__0;
  3998. private static MethodInfo ToDictionaryAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  3999. (s_ToDictionaryAsync__TSource_TKey__4__0 ??
  4000. (s_ToDictionaryAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4001. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4002. {
  4003. if (source == null)
  4004. throw new ArgumentNullException(nameof(source));
  4005. if (keySelector == null)
  4006. throw new ArgumentNullException(nameof(keySelector));
  4007. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4008. }
  4009. private static MethodInfo s_ToDictionaryAsync__TSource_TKey_TElement__4__0;
  4010. private static MethodInfo ToDictionaryAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4011. (s_ToDictionaryAsync__TSource_TKey_TElement__4__0 ??
  4012. (s_ToDictionaryAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4013. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, CancellationToken cancellationToken = default)
  4014. {
  4015. if (source == null)
  4016. throw new ArgumentNullException(nameof(source));
  4017. if (keySelector == null)
  4018. throw new ArgumentNullException(nameof(keySelector));
  4019. if (elementSelector == null)
  4020. throw new ArgumentNullException(nameof(elementSelector));
  4021. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4022. }
  4023. private static MethodInfo s_ToDictionaryAsync__TSource_TKey_TElement__5__0;
  4024. private static MethodInfo ToDictionaryAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4025. (s_ToDictionaryAsync__TSource_TKey_TElement__5__0 ??
  4026. (s_ToDictionaryAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4027. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4028. {
  4029. if (source == null)
  4030. throw new ArgumentNullException(nameof(source));
  4031. if (keySelector == null)
  4032. throw new ArgumentNullException(nameof(keySelector));
  4033. if (elementSelector == null)
  4034. throw new ArgumentNullException(nameof(elementSelector));
  4035. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4036. }
  4037. private static MethodInfo s_ToDictionaryAwaitAsync__TSource_TKey__3__0;
  4038. private static MethodInfo ToDictionaryAwaitAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  4039. (s_ToDictionaryAwaitAsync__TSource_TKey__3__0 ??
  4040. (s_ToDictionaryAwaitAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4041. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAwaitAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  4042. {
  4043. if (source == null)
  4044. throw new ArgumentNullException(nameof(source));
  4045. if (keySelector == null)
  4046. throw new ArgumentNullException(nameof(keySelector));
  4047. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAwaitAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4048. }
  4049. private static MethodInfo s_ToDictionaryAwaitAsync__TSource_TKey__4__0;
  4050. private static MethodInfo ToDictionaryAwaitAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  4051. (s_ToDictionaryAwaitAsync__TSource_TKey__4__0 ??
  4052. (s_ToDictionaryAwaitAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4053. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAwaitAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4054. {
  4055. if (source == null)
  4056. throw new ArgumentNullException(nameof(source));
  4057. if (keySelector == null)
  4058. throw new ArgumentNullException(nameof(keySelector));
  4059. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAwaitAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4060. }
  4061. private static MethodInfo s_ToDictionaryAwaitAsync__TSource_TKey_TElement__4__0;
  4062. private static MethodInfo ToDictionaryAwaitAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4063. (s_ToDictionaryAwaitAsync__TSource_TKey_TElement__4__0 ??
  4064. (s_ToDictionaryAwaitAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4065. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAwaitAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, CancellationToken cancellationToken = default)
  4066. {
  4067. if (source == null)
  4068. throw new ArgumentNullException(nameof(source));
  4069. if (keySelector == null)
  4070. throw new ArgumentNullException(nameof(keySelector));
  4071. if (elementSelector == null)
  4072. throw new ArgumentNullException(nameof(elementSelector));
  4073. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAwaitAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4074. }
  4075. private static MethodInfo s_ToDictionaryAwaitAsync__TSource_TKey_TElement__5__0;
  4076. private static MethodInfo ToDictionaryAwaitAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4077. (s_ToDictionaryAwaitAsync__TSource_TKey_TElement__5__0 ??
  4078. (s_ToDictionaryAwaitAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4079. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAwaitAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4080. {
  4081. if (source == null)
  4082. throw new ArgumentNullException(nameof(source));
  4083. if (keySelector == null)
  4084. throw new ArgumentNullException(nameof(keySelector));
  4085. if (elementSelector == null)
  4086. throw new ArgumentNullException(nameof(elementSelector));
  4087. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAwaitAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4088. }
  4089. private static MethodInfo s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__3__0;
  4090. private static MethodInfo ToDictionaryAwaitWithCancellationAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  4091. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__3__0 ??
  4092. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4093. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAwaitWithCancellationAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  4094. {
  4095. if (source == null)
  4096. throw new ArgumentNullException(nameof(source));
  4097. if (keySelector == null)
  4098. throw new ArgumentNullException(nameof(keySelector));
  4099. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAwaitWithCancellationAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4100. }
  4101. private static MethodInfo s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__4__0;
  4102. private static MethodInfo ToDictionaryAwaitWithCancellationAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  4103. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__4__0 ??
  4104. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4105. public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAwaitWithCancellationAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4106. {
  4107. if (source == null)
  4108. throw new ArgumentNullException(nameof(source));
  4109. if (keySelector == null)
  4110. throw new ArgumentNullException(nameof(keySelector));
  4111. return source.Provider.ExecuteAsync<Dictionary<TKey, TSource>>(Expression.Call(ToDictionaryAwaitWithCancellationAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4112. }
  4113. private static MethodInfo s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__4__0;
  4114. private static MethodInfo ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4115. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__4__0 ??
  4116. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitWithCancellationAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4117. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAwaitWithCancellationAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, CancellationToken cancellationToken = default)
  4118. {
  4119. if (source == null)
  4120. throw new ArgumentNullException(nameof(source));
  4121. if (keySelector == null)
  4122. throw new ArgumentNullException(nameof(keySelector));
  4123. if (elementSelector == null)
  4124. throw new ArgumentNullException(nameof(elementSelector));
  4125. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4126. }
  4127. private static MethodInfo s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__5__0;
  4128. private static MethodInfo ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4129. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__5__0 ??
  4130. (s_ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<Dictionary<object, object>>>(ToDictionaryAwaitWithCancellationAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4131. public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAwaitWithCancellationAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4132. {
  4133. if (source == null)
  4134. throw new ArgumentNullException(nameof(source));
  4135. if (keySelector == null)
  4136. throw new ArgumentNullException(nameof(keySelector));
  4137. if (elementSelector == null)
  4138. throw new ArgumentNullException(nameof(elementSelector));
  4139. return source.Provider.ExecuteAsync<Dictionary<TKey, TElement>>(Expression.Call(ToDictionaryAwaitWithCancellationAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4140. }
  4141. private static MethodInfo s_ToHashSetAsync__TSource__2__0;
  4142. private static MethodInfo ToHashSetAsync__TSource__2__0(Type TSource) =>
  4143. (s_ToHashSetAsync__TSource__2__0 ??
  4144. (s_ToHashSetAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<HashSet<object>>>(ToHashSetAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4145. public static ValueTask<HashSet<TSource>> ToHashSetAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  4146. {
  4147. if (source == null)
  4148. throw new ArgumentNullException(nameof(source));
  4149. return source.Provider.ExecuteAsync<HashSet<TSource>>(Expression.Call(ToHashSetAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4150. }
  4151. private static MethodInfo s_ToHashSetAsync__TSource__3__0;
  4152. private static MethodInfo ToHashSetAsync__TSource__3__0(Type TSource) =>
  4153. (s_ToHashSetAsync__TSource__3__0 ??
  4154. (s_ToHashSetAsync__TSource__3__0 = new Func<IAsyncQueryable<object>, IEqualityComparer<object>, CancellationToken, ValueTask<HashSet<object>>>(ToHashSetAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4155. public static ValueTask<HashSet<TSource>> ToHashSetAsync<TSource>(this IAsyncQueryable<TSource> source, IEqualityComparer<TSource>? comparer, CancellationToken cancellationToken = default)
  4156. {
  4157. if (source == null)
  4158. throw new ArgumentNullException(nameof(source));
  4159. return source.Provider.ExecuteAsync<HashSet<TSource>>(Expression.Call(ToHashSetAsync__TSource__3__0(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4160. }
  4161. private static MethodInfo s_ToListAsync__TSource__2__0;
  4162. private static MethodInfo ToListAsync__TSource__2__0(Type TSource) =>
  4163. (s_ToListAsync__TSource__2__0 ??
  4164. (s_ToListAsync__TSource__2__0 = new Func<IAsyncQueryable<object>, CancellationToken, ValueTask<List<object>>>(ToListAsync<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4165. public static ValueTask<List<TSource>> ToListAsync<TSource>(this IAsyncQueryable<TSource> source, CancellationToken cancellationToken = default)
  4166. {
  4167. if (source == null)
  4168. throw new ArgumentNullException(nameof(source));
  4169. return source.Provider.ExecuteAsync<List<TSource>>(Expression.Call(ToListAsync__TSource__2__0(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4170. }
  4171. private static MethodInfo s_ToLookupAsync__TSource_TKey__3__0;
  4172. private static MethodInfo ToLookupAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  4173. (s_ToLookupAsync__TSource_TKey__3__0 ??
  4174. (s_ToLookupAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4175. public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, CancellationToken cancellationToken = default)
  4176. {
  4177. if (source == null)
  4178. throw new ArgumentNullException(nameof(source));
  4179. if (keySelector == null)
  4180. throw new ArgumentNullException(nameof(keySelector));
  4181. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4182. }
  4183. private static MethodInfo s_ToLookupAsync__TSource_TKey__4__0;
  4184. private static MethodInfo ToLookupAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  4185. (s_ToLookupAsync__TSource_TKey__4__0 ??
  4186. (s_ToLookupAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4187. public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4188. {
  4189. if (source == null)
  4190. throw new ArgumentNullException(nameof(source));
  4191. if (keySelector == null)
  4192. throw new ArgumentNullException(nameof(keySelector));
  4193. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4194. }
  4195. private static MethodInfo s_ToLookupAsync__TSource_TKey_TElement__4__0;
  4196. private static MethodInfo ToLookupAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4197. (s_ToLookupAsync__TSource_TKey_TElement__4__0 ??
  4198. (s_ToLookupAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4199. public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, CancellationToken cancellationToken = default)
  4200. {
  4201. if (source == null)
  4202. throw new ArgumentNullException(nameof(source));
  4203. if (keySelector == null)
  4204. throw new ArgumentNullException(nameof(keySelector));
  4205. if (elementSelector == null)
  4206. throw new ArgumentNullException(nameof(elementSelector));
  4207. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4208. }
  4209. private static MethodInfo s_ToLookupAsync__TSource_TKey_TElement__5__0;
  4210. private static MethodInfo ToLookupAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4211. (s_ToLookupAsync__TSource_TKey_TElement__5__0 ??
  4212. (s_ToLookupAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4213. public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4214. {
  4215. if (source == null)
  4216. throw new ArgumentNullException(nameof(source));
  4217. if (keySelector == null)
  4218. throw new ArgumentNullException(nameof(keySelector));
  4219. if (elementSelector == null)
  4220. throw new ArgumentNullException(nameof(elementSelector));
  4221. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4222. }
  4223. private static MethodInfo s_ToLookupAwaitAsync__TSource_TKey__3__0;
  4224. private static MethodInfo ToLookupAwaitAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  4225. (s_ToLookupAwaitAsync__TSource_TKey__3__0 ??
  4226. (s_ToLookupAwaitAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4227. public static ValueTask<ILookup<TKey, TSource>> ToLookupAwaitAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  4228. {
  4229. if (source == null)
  4230. throw new ArgumentNullException(nameof(source));
  4231. if (keySelector == null)
  4232. throw new ArgumentNullException(nameof(keySelector));
  4233. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAwaitAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4234. }
  4235. private static MethodInfo s_ToLookupAwaitAsync__TSource_TKey__4__0;
  4236. private static MethodInfo ToLookupAwaitAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  4237. (s_ToLookupAwaitAsync__TSource_TKey__4__0 ??
  4238. (s_ToLookupAwaitAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4239. public static ValueTask<ILookup<TKey, TSource>> ToLookupAwaitAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4240. {
  4241. if (source == null)
  4242. throw new ArgumentNullException(nameof(source));
  4243. if (keySelector == null)
  4244. throw new ArgumentNullException(nameof(keySelector));
  4245. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAwaitAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4246. }
  4247. private static MethodInfo s_ToLookupAwaitAsync__TSource_TKey_TElement__4__0;
  4248. private static MethodInfo ToLookupAwaitAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4249. (s_ToLookupAwaitAsync__TSource_TKey_TElement__4__0 ??
  4250. (s_ToLookupAwaitAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4251. public static ValueTask<ILookup<TKey, TElement>> ToLookupAwaitAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, CancellationToken cancellationToken = default)
  4252. {
  4253. if (source == null)
  4254. throw new ArgumentNullException(nameof(source));
  4255. if (keySelector == null)
  4256. throw new ArgumentNullException(nameof(keySelector));
  4257. if (elementSelector == null)
  4258. throw new ArgumentNullException(nameof(elementSelector));
  4259. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAwaitAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4260. }
  4261. private static MethodInfo s_ToLookupAwaitAsync__TSource_TKey_TElement__5__0;
  4262. private static MethodInfo ToLookupAwaitAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4263. (s_ToLookupAwaitAsync__TSource_TKey_TElement__5__0 ??
  4264. (s_ToLookupAwaitAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<object>>>, Expression<Func<object, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4265. public static ValueTask<ILookup<TKey, TElement>> ToLookupAwaitAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<TKey>>> keySelector, Expression<Func<TSource, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4266. {
  4267. if (source == null)
  4268. throw new ArgumentNullException(nameof(source));
  4269. if (keySelector == null)
  4270. throw new ArgumentNullException(nameof(keySelector));
  4271. if (elementSelector == null)
  4272. throw new ArgumentNullException(nameof(elementSelector));
  4273. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAwaitAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4274. }
  4275. private static MethodInfo s_ToLookupAwaitWithCancellationAsync__TSource_TKey__3__0;
  4276. private static MethodInfo ToLookupAwaitWithCancellationAsync__TSource_TKey__3__0(Type TSource, Type TKey) =>
  4277. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey__3__0 ??
  4278. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey__3__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4279. public static ValueTask<ILookup<TKey, TSource>> ToLookupAwaitWithCancellationAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, CancellationToken cancellationToken = default)
  4280. {
  4281. if (source == null)
  4282. throw new ArgumentNullException(nameof(source));
  4283. if (keySelector == null)
  4284. throw new ArgumentNullException(nameof(keySelector));
  4285. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAwaitWithCancellationAsync__TSource_TKey__3__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4286. }
  4287. private static MethodInfo s_ToLookupAwaitWithCancellationAsync__TSource_TKey__4__0;
  4288. private static MethodInfo ToLookupAwaitWithCancellationAsync__TSource_TKey__4__0(Type TSource, Type TKey) =>
  4289. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey__4__0 ??
  4290. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitWithCancellationAsync<object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey);
  4291. public static ValueTask<ILookup<TKey, TSource>> ToLookupAwaitWithCancellationAsync<TSource, TKey>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4292. {
  4293. if (source == null)
  4294. throw new ArgumentNullException(nameof(source));
  4295. if (keySelector == null)
  4296. throw new ArgumentNullException(nameof(keySelector));
  4297. return source.Provider.ExecuteAsync<ILookup<TKey, TSource>>(Expression.Call(ToLookupAwaitWithCancellationAsync__TSource_TKey__4__0(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4298. }
  4299. private static MethodInfo s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__4__0;
  4300. private static MethodInfo ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__4__0(Type TSource, Type TKey, Type TElement) =>
  4301. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__4__0 ??
  4302. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__4__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitWithCancellationAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4303. public static ValueTask<ILookup<TKey, TElement>> ToLookupAwaitWithCancellationAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, CancellationToken cancellationToken = default)
  4304. {
  4305. if (source == null)
  4306. throw new ArgumentNullException(nameof(source));
  4307. if (keySelector == null)
  4308. throw new ArgumentNullException(nameof(keySelector));
  4309. if (elementSelector == null)
  4310. throw new ArgumentNullException(nameof(elementSelector));
  4311. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__4__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4312. }
  4313. private static MethodInfo s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__5__0;
  4314. private static MethodInfo ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__5__0(Type TSource, Type TKey, Type TElement) =>
  4315. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__5__0 ??
  4316. (s_ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__5__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<object>>>, Expression<Func<object, CancellationToken, ValueTask<object>>>, IEqualityComparer<object>, CancellationToken, ValueTask<ILookup<object, object>>>(ToLookupAwaitWithCancellationAsync<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource, TKey, TElement);
  4317. public static ValueTask<ILookup<TKey, TElement>> ToLookupAwaitWithCancellationAsync<TSource, TKey, TElement>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<TKey>>> keySelector, Expression<Func<TSource, CancellationToken, ValueTask<TElement>>> elementSelector, IEqualityComparer<TKey>? comparer, CancellationToken cancellationToken = default)
  4318. {
  4319. if (source == null)
  4320. throw new ArgumentNullException(nameof(source));
  4321. if (keySelector == null)
  4322. throw new ArgumentNullException(nameof(keySelector));
  4323. if (elementSelector == null)
  4324. throw new ArgumentNullException(nameof(elementSelector));
  4325. return source.Provider.ExecuteAsync<ILookup<TKey, TElement>>(Expression.Call(ToLookupAwaitWithCancellationAsync__TSource_TKey_TElement__5__0(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken);
  4326. }
  4327. private static MethodInfo s_Union__TSource__2__0;
  4328. private static MethodInfo Union__TSource__2__0(Type TSource) =>
  4329. (s_Union__TSource__2__0 ??
  4330. (s_Union__TSource__2__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IAsyncQueryable<object>>(Union<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4331. public static IAsyncQueryable<TSource> Union<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second)
  4332. {
  4333. if (first == null)
  4334. throw new ArgumentNullException(nameof(first));
  4335. if (second == null)
  4336. throw new ArgumentNullException(nameof(second));
  4337. return first.Provider.CreateQuery<TSource>(Expression.Call(Union__TSource__2__0(typeof(TSource)), first.Expression, GetSourceExpression(second)));
  4338. }
  4339. private static MethodInfo s_Union__TSource__3__0;
  4340. private static MethodInfo Union__TSource__3__0(Type TSource) =>
  4341. (s_Union__TSource__3__0 ??
  4342. (s_Union__TSource__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, IEqualityComparer<object>, IAsyncQueryable<object>>(Union<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4343. public static IAsyncQueryable<TSource> Union<TSource>(this IAsyncQueryable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource>? comparer)
  4344. {
  4345. if (first == null)
  4346. throw new ArgumentNullException(nameof(first));
  4347. if (second == null)
  4348. throw new ArgumentNullException(nameof(second));
  4349. return first.Provider.CreateQuery<TSource>(Expression.Call(Union__TSource__3__0(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
  4350. }
  4351. private static MethodInfo s_Where__TSource__2__0;
  4352. private static MethodInfo Where__TSource__2__0(Type TSource) =>
  4353. (s_Where__TSource__2__0 ??
  4354. (s_Where__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, bool>>, IAsyncQueryable<object>>(Where<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4355. public static IAsyncQueryable<TSource> Where<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
  4356. {
  4357. if (source == null)
  4358. throw new ArgumentNullException(nameof(source));
  4359. if (predicate == null)
  4360. throw new ArgumentNullException(nameof(predicate));
  4361. return source.Provider.CreateQuery<TSource>(Expression.Call(Where__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  4362. }
  4363. private static MethodInfo s_Where__TSource__2__1;
  4364. private static MethodInfo Where__TSource__2__1(Type TSource) =>
  4365. (s_Where__TSource__2__1 ??
  4366. (s_Where__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, bool>>, IAsyncQueryable<object>>(Where<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4367. public static IAsyncQueryable<TSource> Where<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
  4368. {
  4369. if (source == null)
  4370. throw new ArgumentNullException(nameof(source));
  4371. if (predicate == null)
  4372. throw new ArgumentNullException(nameof(predicate));
  4373. return source.Provider.CreateQuery<TSource>(Expression.Call(Where__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  4374. }
  4375. private static MethodInfo s_WhereAwait__TSource__2__0;
  4376. private static MethodInfo WhereAwait__TSource__2__0(Type TSource) =>
  4377. (s_WhereAwait__TSource__2__0 ??
  4378. (s_WhereAwait__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, ValueTask<bool>>>, IAsyncQueryable<object>>(WhereAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4379. public static IAsyncQueryable<TSource> WhereAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, ValueTask<bool>>> predicate)
  4380. {
  4381. if (source == null)
  4382. throw new ArgumentNullException(nameof(source));
  4383. if (predicate == null)
  4384. throw new ArgumentNullException(nameof(predicate));
  4385. return source.Provider.CreateQuery<TSource>(Expression.Call(WhereAwait__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  4386. }
  4387. private static MethodInfo s_WhereAwait__TSource__2__1;
  4388. private static MethodInfo WhereAwait__TSource__2__1(Type TSource) =>
  4389. (s_WhereAwait__TSource__2__1 ??
  4390. (s_WhereAwait__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, ValueTask<bool>>>, IAsyncQueryable<object>>(WhereAwait<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4391. public static IAsyncQueryable<TSource> WhereAwait<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, ValueTask<bool>>> predicate)
  4392. {
  4393. if (source == null)
  4394. throw new ArgumentNullException(nameof(source));
  4395. if (predicate == null)
  4396. throw new ArgumentNullException(nameof(predicate));
  4397. return source.Provider.CreateQuery<TSource>(Expression.Call(WhereAwait__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  4398. }
  4399. private static MethodInfo s_WhereAwaitWithCancellation__TSource__2__0;
  4400. private static MethodInfo WhereAwaitWithCancellation__TSource__2__0(Type TSource) =>
  4401. (s_WhereAwaitWithCancellation__TSource__2__0 ??
  4402. (s_WhereAwaitWithCancellation__TSource__2__0 = new Func<IAsyncQueryable<object>, Expression<Func<object, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(WhereAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4403. public static IAsyncQueryable<TSource> WhereAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, CancellationToken, ValueTask<bool>>> predicate)
  4404. {
  4405. if (source == null)
  4406. throw new ArgumentNullException(nameof(source));
  4407. if (predicate == null)
  4408. throw new ArgumentNullException(nameof(predicate));
  4409. return source.Provider.CreateQuery<TSource>(Expression.Call(WhereAwaitWithCancellation__TSource__2__0(typeof(TSource)), source.Expression, predicate));
  4410. }
  4411. private static MethodInfo s_WhereAwaitWithCancellation__TSource__2__1;
  4412. private static MethodInfo WhereAwaitWithCancellation__TSource__2__1(Type TSource) =>
  4413. (s_WhereAwaitWithCancellation__TSource__2__1 ??
  4414. (s_WhereAwaitWithCancellation__TSource__2__1 = new Func<IAsyncQueryable<object>, Expression<Func<object, int, CancellationToken, ValueTask<bool>>>, IAsyncQueryable<object>>(WhereAwaitWithCancellation<object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TSource);
  4415. public static IAsyncQueryable<TSource> WhereAwaitWithCancellation<TSource>(this IAsyncQueryable<TSource> source, Expression<Func<TSource, int, CancellationToken, ValueTask<bool>>> predicate)
  4416. {
  4417. if (source == null)
  4418. throw new ArgumentNullException(nameof(source));
  4419. if (predicate == null)
  4420. throw new ArgumentNullException(nameof(predicate));
  4421. return source.Provider.CreateQuery<TSource>(Expression.Call(WhereAwaitWithCancellation__TSource__2__1(typeof(TSource)), source.Expression, predicate));
  4422. }
  4423. private static MethodInfo s_Zip__TFirst_TSecond_TResult__3__0;
  4424. private static MethodInfo Zip__TFirst_TSecond_TResult__3__0(Type TFirst, Type TSecond, Type TResult) =>
  4425. (s_Zip__TFirst_TSecond_TResult__3__0 ??
  4426. (s_Zip__TFirst_TSecond_TResult__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object, object>>, IAsyncQueryable<object>>(Zip<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TFirst, TSecond, TResult);
  4427. public static IAsyncQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IAsyncQueryable<TFirst> first, IAsyncEnumerable<TSecond> second, Expression<Func<TFirst, TSecond, TResult>> selector)
  4428. {
  4429. if (first == null)
  4430. throw new ArgumentNullException(nameof(first));
  4431. if (second == null)
  4432. throw new ArgumentNullException(nameof(second));
  4433. if (selector == null)
  4434. throw new ArgumentNullException(nameof(selector));
  4435. return first.Provider.CreateQuery<TResult>(Expression.Call(Zip__TFirst_TSecond_TResult__3__0(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector));
  4436. }
  4437. private static MethodInfo s_ZipAwait__TFirst_TSecond_TResult__3__0;
  4438. private static MethodInfo ZipAwait__TFirst_TSecond_TResult__3__0(Type TFirst, Type TSecond, Type TResult) =>
  4439. (s_ZipAwait__TFirst_TSecond_TResult__3__0 ??
  4440. (s_ZipAwait__TFirst_TSecond_TResult__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object, ValueTask<object>>>, IAsyncQueryable<object>>(ZipAwait<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TFirst, TSecond, TResult);
  4441. public static IAsyncQueryable<TResult> ZipAwait<TFirst, TSecond, TResult>(this IAsyncQueryable<TFirst> first, IAsyncEnumerable<TSecond> second, Expression<Func<TFirst, TSecond, ValueTask<TResult>>> selector)
  4442. {
  4443. if (first == null)
  4444. throw new ArgumentNullException(nameof(first));
  4445. if (second == null)
  4446. throw new ArgumentNullException(nameof(second));
  4447. if (selector == null)
  4448. throw new ArgumentNullException(nameof(selector));
  4449. return first.Provider.CreateQuery<TResult>(Expression.Call(ZipAwait__TFirst_TSecond_TResult__3__0(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector));
  4450. }
  4451. private static MethodInfo s_ZipAwaitWithCancellation__TFirst_TSecond_TResult__3__0;
  4452. private static MethodInfo ZipAwaitWithCancellation__TFirst_TSecond_TResult__3__0(Type TFirst, Type TSecond, Type TResult) =>
  4453. (s_ZipAwaitWithCancellation__TFirst_TSecond_TResult__3__0 ??
  4454. (s_ZipAwaitWithCancellation__TFirst_TSecond_TResult__3__0 = new Func<IAsyncQueryable<object>, IAsyncEnumerable<object>, Expression<Func<object, object, CancellationToken, ValueTask<object>>>, IAsyncQueryable<object>>(ZipAwaitWithCancellation<object, object, object>).GetMethodInfo().GetGenericMethodDefinition())).MakeGenericMethod(TFirst, TSecond, TResult);
  4455. public static IAsyncQueryable<TResult> ZipAwaitWithCancellation<TFirst, TSecond, TResult>(this IAsyncQueryable<TFirst> first, IAsyncEnumerable<TSecond> second, Expression<Func<TFirst, TSecond, CancellationToken, ValueTask<TResult>>> selector)
  4456. {
  4457. if (first == null)
  4458. throw new ArgumentNullException(nameof(first));
  4459. if (second == null)
  4460. throw new ArgumentNullException(nameof(second));
  4461. if (selector == null)
  4462. throw new ArgumentNullException(nameof(selector));
  4463. return first.Provider.CreateQuery<TResult>(Expression.Call(ZipAwaitWithCancellation__TFirst_TSecond_TResult__3__0(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector));
  4464. }
  4465. }
  4466. }