1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422 |
- // Licensed to the .NET Foundation under one or more agreements.
- // The .NET Foundation licenses this file to you under the Apache 2.0 License.
- // See the LICENSE file in the project root for more information.
- using System.Collections.Generic;
- using System.Reactive.Concurrency;
- using System.Threading; // Used in XML doc comments
- using System.Threading.Tasks;
- namespace System.Reactive.Linq
- {
- public static partial class Observable
- {
- #region + Amb +
- /// <summary>
- /// Propagates the observable sequence that reacts first.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="first">First observable sequence.</param>
- /// <param name="second">Second observable sequence.</param>
- /// <returns>An observable sequence that surfaces either of the given sequences, whichever reacted first.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
- public static IObservable<TSource> Amb<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- return s_impl.Amb<TSource>(first, second);
- }
- /// <summary>
- /// Propagates the observable sequence that reacts first.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sources competing to react first.</param>
- /// <returns>An observable sequence that surfaces any of the given sequences, whichever reacted first.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
- public static IObservable<TSource> Amb<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Amb<TSource>(sources);
- }
- /// <summary>
- /// Propagates the observable sequence that reacts first.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sources competing to react first.</param>
- /// <returns>An observable sequence that surfaces any of the given sequences, whichever reacted first.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Amb", Justification = "In honor of McCarthy.")]
- public static IObservable<TSource> Amb<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Amb<TSource>(sources);
- }
- #endregion
- #region + Buffer +
- /// <summary>
- /// Projects each element of an observable sequence into consecutive non-overlapping buffers.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
- /// <typeparam name="TBufferClosing">The type of the elements in the sequences indicating buffer closing events.</typeparam>
- /// <param name="source">Source sequence to produce buffers over.</param>
- /// <param name="bufferClosingSelector">A function invoked to define the boundaries of the produced buffers. A new buffer is started when the previous one is closed.</param>
- /// <returns>An observable sequence of buffers.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferClosingSelector"/> is null.</exception>
- public static IObservable<IList<TSource>> Buffer<TSource, TBufferClosing>(this IObservable<TSource> source, Func<IObservable<TBufferClosing>> bufferClosingSelector)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (bufferClosingSelector == null)
- throw new ArgumentNullException(nameof(bufferClosingSelector));
- return s_impl.Buffer<TSource, TBufferClosing>(source, bufferClosingSelector);
- }
- /// <summary>
- /// Projects each element of an observable sequence into zero or more buffers.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
- /// <typeparam name="TBufferOpening">The type of the elements in the sequence indicating buffer opening events, also passed to the closing selector to obtain a sequence of buffer closing events.</typeparam>
- /// <typeparam name="TBufferClosing">The type of the elements in the sequences indicating buffer closing events.</typeparam>
- /// <param name="source">Source sequence to produce buffers over.</param>
- /// <param name="bufferOpenings">Observable sequence whose elements denote the creation of new buffers.</param>
- /// <param name="bufferClosingSelector">A function invoked to define the closing of each produced buffer.</param>
- /// <returns>An observable sequence of buffers.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferOpenings"/> or <paramref name="bufferClosingSelector"/> is null.</exception>
- public static IObservable<IList<TSource>> Buffer<TSource, TBufferOpening, TBufferClosing>(this IObservable<TSource> source, IObservable<TBufferOpening> bufferOpenings, Func<TBufferOpening, IObservable<TBufferClosing>> bufferClosingSelector)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (bufferOpenings == null)
- throw new ArgumentNullException(nameof(bufferOpenings));
- if (bufferClosingSelector == null)
- throw new ArgumentNullException(nameof(bufferClosingSelector));
- return s_impl.Buffer<TSource, TBufferOpening, TBufferClosing>(source, bufferOpenings, bufferClosingSelector);
- }
- /// <summary>
- /// Projects each element of an observable sequence into consecutive non-overlapping buffers.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the lists in the result sequence.</typeparam>
- /// <typeparam name="TBufferBoundary">The type of the elements in the sequences indicating buffer boundary events.</typeparam>
- /// <param name="source">Source sequence to produce buffers over.</param>
- /// <param name="bufferBoundaries">Sequence of buffer boundary markers. The current buffer is closed and a new buffer is opened upon receiving a boundary marker.</param>
- /// <returns>An observable sequence of buffers.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="bufferBoundaries"/> is null.</exception>
- public static IObservable<IList<TSource>> Buffer<TSource, TBufferBoundary>(this IObservable<TSource> source, IObservable<TBufferBoundary> bufferBoundaries)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (bufferBoundaries == null)
- throw new ArgumentNullException(nameof(bufferBoundaries));
- return s_impl.Buffer<TSource, TBufferBoundary>(source, bufferBoundaries);
- }
- #endregion
- #region + Catch +
- /// <summary>
- /// Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence and sequences returned by the exception handler function.</typeparam>
- /// <typeparam name="TException">The type of the exception to catch and handle. Needs to derive from <see cref="System.Exception"/>.</typeparam>
- /// <param name="source">Source sequence.</param>
- /// <param name="handler">Exception handler function, producing another observable sequence.</param>
- /// <returns>An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an exception occurred.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="handler"/> is null.</exception>
- public static IObservable<TSource> Catch<TSource, TException>(this IObservable<TSource> source, Func<TException, IObservable<TSource>> handler) where TException : Exception
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (handler == null)
- throw new ArgumentNullException(nameof(handler));
- return s_impl.Catch<TSource, TException>(source, handler);
- }
- /// <summary>
- /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence and handler sequence.</typeparam>
- /// <param name="first">First observable sequence whose exception (if any) is caught.</param>
- /// <param name="second">Second observable sequence used to produce results when an error occurred in the first sequence.</param>
- /// <returns>An observable sequence containing the first sequence's elements, followed by the elements of the second sequence in case an exception occurred.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
- public static IObservable<TSource> Catch<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- return s_impl.Catch<TSource>(first, second);
- }
- /// <summary>
- /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source and handler sequences.</typeparam>
- /// <param name="sources">Observable sequences to catch exceptions for.</param>
- /// <returns>An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Catch<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Catch<TSource>(sources);
- }
- /// <summary>
- /// Continues an observable sequence that is terminated by an exception with the next observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source and handler sequences.</typeparam>
- /// <param name="sources">Observable sequences to catch exceptions for.</param>
- /// <returns>An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Catch<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Catch<TSource>(sources);
- }
- #endregion
- #region + CombineLatest +
- /// <summary>
- /// Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="first">First observable source.</param>
- /// <param name="second">Second observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever either of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of both sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TResult>(first, second, resultSelector);
- }
- /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
- #region CombineLatest auto-generated code (8/3/2012 6:37:08 PM)
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, Func<TSource1, TSource2, TSource3, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TResult>(source1, source2, source3, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, Func<TSource1, TSource2, TSource3, TSource4, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TResult>(source1, source2, source3, source4, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(source1, source2, source3, source4, source5, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(source1, source2, source3, source4, source5, source6, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(source1, source2, source3, source4, source5, source6, source7, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="source15">Fifteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (source15 == null)
- throw new ArgumentNullException(nameof(source15));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
- /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="source15">Fifteenth observable source.</param>
- /// <param name="source16">Sixteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="source16"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, IObservable<TSource16> source16, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (source15 == null)
- throw new ArgumentNullException(nameof(source15));
- if (source16 == null)
- throw new ArgumentNullException(nameof(source16));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector);
- }
- #endregion
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <param name="resultSelector">Function to invoke whenever any of the sources produces an element. For efficiency, the input list is reused after the selector returns. Either aggregate or copy the values during the function call.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> CombineLatest<TSource, TResult>(this IEnumerable<IObservable<TSource>> sources, Func<IList<TSource>, TResult> resultSelector)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.CombineLatest<TSource, TResult>(sources, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by emitting a list with the latest source elements whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <returns>An observable sequence containing lists of the latest elements of the sources.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<IList<TSource>> CombineLatest<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.CombineLatest<TSource>(sources);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by emitting a list with the latest source elements whenever any of the observable sequences produces an element.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <returns>An observable sequence containing lists of the latest elements of the sources.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<IList<TSource>> CombineLatest<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.CombineLatest<TSource>(sources);
- }
- #endregion
- #region + Concat +
- /// <summary>
- /// Concatenates the second observable sequence to the first observable sequence upon successful termination of the first.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="first">First observable sequence.</param>
- /// <param name="second">Second observable sequence.</param>
- /// <returns>An observable sequence that contains the elements of the first sequence, followed by those of the second the sequence.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
- public static IObservable<TSource> Concat<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- return s_impl.Concat<TSource>(first, second);
- }
- /// <summary>
- /// Concatenates all of the specified observable sequences, as long as the previous observable sequence terminated successfully.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences to concatenate.</param>
- /// <returns>An observable sequence that contains the elements of each given sequence, in sequential order.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Concat<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Concat<TSource>(sources);
- }
- /// <summary>
- /// Concatenates all observable sequences in the given enumerable sequence, as long as the previous observable sequence terminated successfully.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences to concatenate.</param>
- /// <returns>An observable sequence that contains the elements of each given sequence, in sequential order.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Concat<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Concat<TSource>(sources);
- }
- /// <summary>
- /// Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequence of inner observable sequences.</param>
- /// <returns>An observable sequence that contains the elements of each observed inner sequence, in sequential order.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Concat<TSource>(this IObservable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Concat<TSource>(sources);
- }
- /// <summary>
- /// Concatenates all task results, as long as the previous task terminated successfully.
- /// </summary>
- /// <typeparam name="TSource">The type of the results produced by the tasks.</typeparam>
- /// <param name="sources">Observable sequence of tasks.</param>
- /// <returns>An observable sequence that contains the results of each task, in sequential order.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a concatenation operation using <see cref="Observable.Concat{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
- public static IObservable<TSource> Concat<TSource>(this IObservable<Task<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Concat<TSource>(sources);
- }
- #endregion
- #region + Merge +
- /// <summary>
- /// Merges elements from all inner observable sequences into a single observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequence of inner observable sequences.</param>
- /// <returns>The observable sequence that merges the elements of the inner sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(this IObservable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Merge<TSource>(sources);
- }
- /// <summary>
- /// Merges results from all source tasks into a single observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the results produced by the source tasks.</typeparam>
- /// <param name="sources">Observable sequence of tasks.</param>
- /// <returns>The observable sequence that merges the results of the source tasks.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a merge operation using <see cref="Observable.Merge{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
- public static IObservable<TSource> Merge<TSource>(this IObservable<Task<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Merge<TSource>(sources);
- }
- /// <summary>
- /// Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequence of inner observable sequences.</param>
- /// <param name="maxConcurrent">Maximum number of inner observable sequences being subscribed to concurrently.</param>
- /// <returns>The observable sequence that merges the elements of the inner sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
- public static IObservable<TSource> Merge<TSource>(this IObservable<IObservable<TSource>> sources, int maxConcurrent)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (maxConcurrent <= 0)
- throw new ArgumentOutOfRangeException(nameof(maxConcurrent));
- return s_impl.Merge<TSource>(sources, maxConcurrent);
- }
- /// <summary>
- /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Enumerable sequence of observable sequences.</param>
- /// <param name="maxConcurrent">Maximum number of observable sequences being subscribed to concurrently.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
- public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, int maxConcurrent)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (maxConcurrent <= 0)
- throw new ArgumentOutOfRangeException(nameof(maxConcurrent));
- return s_impl.Merge<TSource>(sources, maxConcurrent);
- }
- /// <summary>
- /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences, and using the specified scheduler for enumeration of and subscription to the sources.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Enumerable sequence of observable sequences.</param>
- /// <param name="maxConcurrent">Maximum number of observable sequences being subscribed to concurrently.</param>
- /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="scheduler"/> is null.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxConcurrent"/> is less than or equal to zero.</exception>
- public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, int maxConcurrent, IScheduler scheduler)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (maxConcurrent <= 0)
- throw new ArgumentOutOfRangeException(nameof(maxConcurrent));
- if (scheduler == null)
- throw new ArgumentNullException(nameof(scheduler));
- return s_impl.Merge<TSource>(sources, maxConcurrent, scheduler);
- }
- /// <summary>
- /// Merges elements from two observable sequences into a single observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="first">First observable sequence.</param>
- /// <param name="second">Second observable sequence.</param>
- /// <returns>The observable sequence that merges the elements of the given sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- return s_impl.Merge<TSource>(first, second);
- }
- /// <summary>
- /// Merges elements from two observable sequences into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="first">First observable sequence.</param>
- /// <param name="second">Second observable sequence.</param>
- /// <param name="scheduler">Scheduler used to introduce concurrency for making subscriptions to the given sequences.</param>
- /// <returns>The observable sequence that merges the elements of the given sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="scheduler"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(this IObservable<TSource> first, IObservable<TSource> second, IScheduler scheduler)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- if (scheduler == null)
- throw new ArgumentNullException(nameof(scheduler));
- return s_impl.Merge<TSource>(first, second, scheduler);
- }
- /// <summary>
- /// Merges elements from all of the specified observable sequences into a single observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Merge<TSource>(sources);
- }
- /// <summary>
- /// Merges elements from all of the specified observable sequences into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences.</param>
- /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="scheduler"/> or <paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(IScheduler scheduler, params IObservable<TSource>[] sources)
- {
- if (scheduler == null)
- throw new ArgumentNullException(nameof(scheduler));
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Merge<TSource>(scheduler, sources);
- }
- /// <summary>
- /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Enumerable sequence of observable sequences.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Merge<TSource>(sources);
- }
- /// <summary>
- /// Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence, using the specified scheduler for enumeration of and subscription to the sources.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Enumerable sequence of observable sequences.</param>
- /// <param name="scheduler">Scheduler to run the enumeration of the sequence of sources on.</param>
- /// <returns>The observable sequence that merges the elements of the observable sequences.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="scheduler"/> is null.</exception>
- public static IObservable<TSource> Merge<TSource>(this IEnumerable<IObservable<TSource>> sources, IScheduler scheduler)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (scheduler == null)
- throw new ArgumentNullException(nameof(scheduler));
- return s_impl.Merge<TSource>(sources, scheduler);
- }
- #endregion
- #region + OnErrorResumeNext +
- /// <summary>
- /// Concatenates the second observable sequence to the first observable sequence upon successful or exceptional termination of the first.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="first">First observable sequence whose exception (if any) is caught.</param>
- /// <param name="second">Second observable sequence used to produce results after the first sequence terminates.</param>
- /// <returns>An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> is null.</exception>
- public static IObservable<TSource> OnErrorResumeNext<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- return s_impl.OnErrorResumeNext<TSource>(first, second);
- }
- /// <summary>
- /// Concatenates all of the specified observable sequences, even if the previous observable sequence terminated exceptionally.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences to concatenate.</param>
- /// <returns>An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> OnErrorResumeNext<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.OnErrorResumeNext<TSource>(sources);
- }
- /// <summary>
- /// Concatenates all observable sequences in the given enumerable sequence, even if the previous observable sequence terminated exceptionally.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequences to concatenate.</param>
- /// <returns>An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> OnErrorResumeNext<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.OnErrorResumeNext<TSource>(sources);
- }
- #endregion
- #region + SkipUntil +
- /// <summary>
- /// Returns the elements from the source observable sequence only after the other observable sequence produces an element.
- /// Starting from Rx.NET 4.0, this will subscribe to <paramref name="other"/> before subscribing to <paramref name="source" />
- /// so in case <paramref name="other" /> emits an element right away, elements from <paramref name="source" /> are not missed.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TOther">The type of the elements in the other sequence that indicates the end of skip behavior.</typeparam>
- /// <param name="source">Source sequence to propagate elements for.</param>
- /// <param name="other">Observable sequence that triggers propagation of elements of the source sequence.</param>
- /// <returns>An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="other"/> is null.</exception>
- public static IObservable<TSource> SkipUntil<TSource, TOther>(this IObservable<TSource> source, IObservable<TOther> other)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (other == null)
- throw new ArgumentNullException(nameof(other));
- return s_impl.SkipUntil<TSource, TOther>(source, other);
- }
- #endregion
- #region + Switch +
- /// <summary>
- /// Transforms an observable sequence of observable sequences into an observable sequence
- /// producing values only from the most recent observable sequence.
- /// Each time a new inner observable sequence is received, unsubscribe from the
- /// previous inner observable sequence.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <param name="sources">Observable sequence of inner observable sequences.</param>
- /// <returns>The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<TSource> Switch<TSource>(this IObservable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Switch<TSource>(sources);
- }
- /// <summary>
- /// Transforms an observable sequence of tasks into an observable sequence
- /// producing values only from the most recent observable sequence.
- /// Each time a new task is received, the previous task's result is ignored.
- /// </summary>
- /// <typeparam name="TSource">The type of the results produced by the source tasks.</typeparam>
- /// <param name="sources">Observable sequence of tasks.</param>
- /// <returns>The observable sequence that at any point in time produces the result of the most recent task that has been received.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- /// <remarks>If the tasks support cancellation, consider manual conversion of the tasks using <see cref="Observable.FromAsync{TSource}(Func{CancellationToken, Task{TSource}})"/>, followed by a switch operation using <see cref="Observable.Switch{TSource}(IObservable{IObservable{TSource}})"/>.</remarks>
- public static IObservable<TSource> Switch<TSource>(this IObservable<Task<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Switch<TSource>(sources);
- }
- #endregion
- #region + TakeUntil +
- /// <summary>
- /// Returns the elements from the source observable sequence until the other observable sequence produces an element.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
- /// <typeparam name="TOther">The type of the elements in the other sequence that indicates the end of take behavior.</typeparam>
- /// <param name="source">Source sequence to propagate elements for.</param>
- /// <param name="other">Observable sequence that terminates propagation of elements of the source sequence.</param>
- /// <returns>An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="other"/> is null.</exception>
- public static IObservable<TSource> TakeUntil<TSource, TOther>(this IObservable<TSource> source, IObservable<TOther> other)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (other == null)
- throw new ArgumentNullException(nameof(other));
- return s_impl.TakeUntil<TSource, TOther>(source, other);
- }
- /// <summary>
- /// Relays elements from the source observable sequence and calls the predicate after an
- /// emission to check if the sequence should stop after that specific item.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source and result sequences.</typeparam>
- /// <param name="source">The source sequence to relay elements of.</param>
- /// <param name="stopPredicate">Called after each upstream item has been emitted with
- /// that upstream item and should return <code>true</code> to indicate the sequence should
- /// complete.</param>
- /// <returns>The observable sequence with the source elements until the stop predicate returns true.</returns>
- /// <example>
- /// The following sequence will stop after the value 5 has been encountered:
- /// <code>
- /// Observable.Range(1, 10)
- /// .TakeUntil(item => item == 5)
- /// .Subscribe(Console.WriteLine);
- /// </code>
- /// </example>
- /// <exception cref="ArgumentException">If <typeparamref name="TSource"/> or <paramref name="stopPredicate"/> is <code>null</code>.</exception>
- public static IObservable<TSource> TakeUntil<TSource>(this IObservable<TSource> source, Func<TSource, bool> stopPredicate)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (stopPredicate == null)
- throw new ArgumentNullException(nameof(stopPredicate));
- return s_impl.TakeUntil(source, stopPredicate);
- }
- #endregion
- #region + Window +
- /// <summary>
- /// Projects each element of an observable sequence into consecutive non-overlapping windows.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
- /// <typeparam name="TWindowClosing">The type of the elements in the sequences indicating window closing events.</typeparam>
- /// <param name="source">Source sequence to produce windows over.</param>
- /// <param name="windowClosingSelector">A function invoked to define the boundaries of the produced windows. A new window is started when the previous one is closed.</param>
- /// <returns>An observable sequence of windows.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowClosingSelector"/> is null.</exception>
- public static IObservable<IObservable<TSource>> Window<TSource, TWindowClosing>(this IObservable<TSource> source, Func<IObservable<TWindowClosing>> windowClosingSelector)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (windowClosingSelector == null)
- throw new ArgumentNullException(nameof(windowClosingSelector));
- return s_impl.Window<TSource, TWindowClosing>(source, windowClosingSelector);
- }
- /// <summary>
- /// Projects each element of an observable sequence into zero or more windows.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
- /// <typeparam name="TWindowOpening">The type of the elements in the sequence indicating window opening events, also passed to the closing selector to obtain a sequence of window closing events.</typeparam>
- /// <typeparam name="TWindowClosing">The type of the elements in the sequences indicating window closing events.</typeparam>
- /// <param name="source">Source sequence to produce windows over.</param>
- /// <param name="windowOpenings">Observable sequence whose elements denote the creation of new windows.</param>
- /// <param name="windowClosingSelector">A function invoked to define the closing of each produced window.</param>
- /// <returns>An observable sequence of windows.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowOpenings"/> or <paramref name="windowClosingSelector"/> is null.</exception>
- public static IObservable<IObservable<TSource>> Window<TSource, TWindowOpening, TWindowClosing>(this IObservable<TSource> source, IObservable<TWindowOpening> windowOpenings, Func<TWindowOpening, IObservable<TWindowClosing>> windowClosingSelector)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (windowOpenings == null)
- throw new ArgumentNullException(nameof(windowOpenings));
- if (windowClosingSelector == null)
- throw new ArgumentNullException(nameof(windowClosingSelector));
- return s_impl.Window<TSource, TWindowOpening, TWindowClosing>(source, windowOpenings, windowClosingSelector);
- }
- /// <summary>
- /// Projects each element of an observable sequence into consecutive non-overlapping windows.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequence, and in the windows in the result sequence.</typeparam>
- /// <typeparam name="TWindowBoundary">The type of the elements in the sequences indicating window boundary events.</typeparam>
- /// <param name="source">Source sequence to produce windows over.</param>
- /// <param name="windowBoundaries">Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker.</param>
- /// <returns>An observable sequence of windows.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="windowBoundaries"/> is null.</exception>
- public static IObservable<IObservable<TSource>> Window<TSource, TWindowBoundary>(this IObservable<TSource> source, IObservable<TWindowBoundary> windowBoundaries)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
- if (windowBoundaries == null)
- throw new ArgumentNullException(nameof(windowBoundaries));
- return s_impl.Window<TSource, TWindowBoundary>(source, windowBoundaries);
- }
- #endregion
- #region + WithLatestFrom +
- /// <summary>
- /// Merges two observable sequences into one observable sequence by combining each element from the first source with the latest element from the second source, if any.
- /// Starting from Rx.NET 4.0, this will subscribe to <paramref name="second"/> before subscribing to <paramref name="first" /> to have a latest element readily available
- /// in case <paramref name="first" /> emits an element right away.
- /// </summary>
- /// <typeparam name="TFirst">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSecond">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="first">First observable source.</param>
- /// <param name="second">Second observable source.</param>
- /// <param name="resultSelector">Function to invoke for each element from the first source combined with the latest element from the second source, if any.</param>
- /// <returns>An observable sequence containing the result of combining each element of the first source with the latest element from the second source, if any, using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> WithLatestFrom<TFirst, TSecond, TResult>(this IObservable<TFirst> first, IObservable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.WithLatestFrom<TFirst, TSecond, TResult>(first, second, resultSelector);
- }
- #endregion
- #region + Zip +
- /// <summary>
- /// Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="first">First observable source.</param>
- /// <param name="second">Second observable source.</param>
- /// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
- /// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IObservable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TResult>(first, second, resultSelector);
- }
- /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
- #region Zip auto-generated code (8/3/2012 6:37:02 PM)
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, Func<TSource1, TSource2, TSource3, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TResult>(source1, source2, source3, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, Func<TSource1, TSource2, TSource3, TSource4, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TResult>(source1, source2, source3, source4, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(source1, source2, source3, source4, source5, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(source1, source2, source3, source4, source5, source6, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(source1, source2, source3, source4, source5, source6, source7, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="source15">Fifteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (source15 == null)
- throw new ArgumentNullException(nameof(source15));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
- /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
- /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
- /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
- /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
- /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
- /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
- /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
- /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
- /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
- /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
- /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
- /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
- /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
- /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="source1">First observable source.</param>
- /// <param name="source2">Second observable source.</param>
- /// <param name="source3">Third observable source.</param>
- /// <param name="source4">Fourth observable source.</param>
- /// <param name="source5">Fifth observable source.</param>
- /// <param name="source6">Sixth observable source.</param>
- /// <param name="source7">Seventh observable source.</param>
- /// <param name="source8">Eighth observable source.</param>
- /// <param name="source9">Ninth observable source.</param>
- /// <param name="source10">Tenth observable source.</param>
- /// <param name="source11">Eleventh observable source.</param>
- /// <param name="source12">Twelfth observable source.</param>
- /// <param name="source13">Thirteenth observable source.</param>
- /// <param name="source14">Fourteenth observable source.</param>
- /// <param name="source15">Fifteenth observable source.</param>
- /// <param name="source16">Sixteenth observable source.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="source1"/> or <paramref name="source2"/> or <paramref name="source3"/> or <paramref name="source4"/> or <paramref name="source5"/> or <paramref name="source6"/> or <paramref name="source7"/> or <paramref name="source8"/> or <paramref name="source9"/> or <paramref name="source10"/> or <paramref name="source11"/> or <paramref name="source12"/> or <paramref name="source13"/> or <paramref name="source14"/> or <paramref name="source15"/> or <paramref name="source16"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, IObservable<TSource16> source16, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult> resultSelector)
- {
- if (source1 == null)
- throw new ArgumentNullException(nameof(source1));
- if (source2 == null)
- throw new ArgumentNullException(nameof(source2));
- if (source3 == null)
- throw new ArgumentNullException(nameof(source3));
- if (source4 == null)
- throw new ArgumentNullException(nameof(source4));
- if (source5 == null)
- throw new ArgumentNullException(nameof(source5));
- if (source6 == null)
- throw new ArgumentNullException(nameof(source6));
- if (source7 == null)
- throw new ArgumentNullException(nameof(source7));
- if (source8 == null)
- throw new ArgumentNullException(nameof(source8));
- if (source9 == null)
- throw new ArgumentNullException(nameof(source9));
- if (source10 == null)
- throw new ArgumentNullException(nameof(source10));
- if (source11 == null)
- throw new ArgumentNullException(nameof(source11));
- if (source12 == null)
- throw new ArgumentNullException(nameof(source12));
- if (source13 == null)
- throw new ArgumentNullException(nameof(source13));
- if (source14 == null)
- throw new ArgumentNullException(nameof(source14));
- if (source15 == null)
- throw new ArgumentNullException(nameof(source15));
- if (source16 == null)
- throw new ArgumentNullException(nameof(source16));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, source11, source12, source13, source14, source15, source16, resultSelector);
- }
- #endregion
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <param name="resultSelector">Function to invoke for each series of elements at corresponding indexes in the sources.</param>
- /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource, TResult>(this IEnumerable<IObservable<TSource>> sources, Func<IList<TSource>, TResult> resultSelector)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource, TResult>(sources, resultSelector);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <returns>An observable sequence containing lists of elements at corresponding indexes.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<IList<TSource>> Zip<TSource>(this IEnumerable<IObservable<TSource>> sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Zip<TSource>(sources);
- }
- /// <summary>
- /// Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes.
- /// </summary>
- /// <typeparam name="TSource">The type of the elements in the source sequences, and in the lists in the result sequence.</typeparam>
- /// <param name="sources">Observable sources.</param>
- /// <returns>An observable sequence containing lists of elements at corresponding indexes.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="sources"/> is null.</exception>
- public static IObservable<IList<TSource>> Zip<TSource>(params IObservable<TSource>[] sources)
- {
- if (sources == null)
- throw new ArgumentNullException(nameof(sources));
- return s_impl.Zip<TSource>(sources);
- }
- /// <summary>
- /// Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.
- /// </summary>
- /// <typeparam name="TSource1">The type of the elements in the first observable source sequence.</typeparam>
- /// <typeparam name="TSource2">The type of the elements in the second enumerable source sequence.</typeparam>
- /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
- /// <param name="first">First observable source.</param>
- /// <param name="second">Second enumerable source.</param>
- /// <param name="resultSelector">Function to invoke for each consecutive pair of elements from the first and second source.</param>
- /// <returns>An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="first"/> or <paramref name="second"/> or <paramref name="resultSelector"/> is null.</exception>
- public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IEnumerable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
- {
- if (first == null)
- throw new ArgumentNullException(nameof(first));
- if (second == null)
- throw new ArgumentNullException(nameof(second));
- if (resultSelector == null)
- throw new ArgumentNullException(nameof(resultSelector));
- return s_impl.Zip<TSource1, TSource2, TResult>(first, second, resultSelector);
- }
- #endregion
- }
- }
|