Pattern.Generated.cs 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT License.
  3. // See the LICENSE file in the project root for more information.
  4. namespace System.Reactive.Joins
  5. {
  6. /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */
  7. #region Joins auto-generated code (8/4/2012 1:00:26 AM)
  8. /// <summary>
  9. /// Represents a join pattern over one observable sequence.
  10. /// </summary>
  11. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  12. public class Pattern<TSource1> : Pattern
  13. {
  14. internal Pattern(IObservable<TSource1> first)
  15. {
  16. First = first;
  17. }
  18. internal IObservable<TSource1> First { get; }
  19. /// <summary>
  20. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  21. /// </summary>
  22. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  23. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  24. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  25. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  26. public Plan<TResult> Then<TResult>(Func<TSource1, TResult> selector)
  27. {
  28. if (selector == null)
  29. {
  30. throw new ArgumentNullException(nameof(selector));
  31. }
  32. return new Plan<TSource1, TResult>(this, selector);
  33. }
  34. }
  35. /// <summary>
  36. /// Represents a join pattern over two observable sequences.
  37. /// </summary>
  38. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  39. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  40. public class Pattern<TSource1, TSource2> : Pattern
  41. {
  42. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second)
  43. {
  44. First = first;
  45. Second = second;
  46. }
  47. internal IObservable<TSource1> First { get; }
  48. internal IObservable<TSource2> Second { get; }
  49. /// <summary>
  50. /// Creates a pattern that matches when all three observable sequences have an available element.
  51. /// </summary>
  52. /// <typeparam name="TSource3">The type of the elements in the third observable sequence.</typeparam>
  53. /// <param name="other">Observable sequence to match with the two previous sequences.</param>
  54. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  55. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  56. public Pattern<TSource1, TSource2, TSource3> And<TSource3>(IObservable<TSource3> other)
  57. {
  58. if (other == null)
  59. {
  60. throw new ArgumentNullException(nameof(other));
  61. }
  62. return new Pattern<TSource1, TSource2, TSource3>(First, Second, other);
  63. }
  64. /// <summary>
  65. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  66. /// </summary>
  67. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  68. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  69. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  70. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  71. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TResult> selector)
  72. {
  73. if (selector == null)
  74. {
  75. throw new ArgumentNullException(nameof(selector));
  76. }
  77. return new Plan<TSource1, TSource2, TResult>(this, selector);
  78. }
  79. }
  80. /// <summary>
  81. /// Represents a join pattern over three observable sequences.
  82. /// </summary>
  83. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  84. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  85. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  86. public class Pattern<TSource1, TSource2, TSource3> : Pattern
  87. {
  88. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third)
  89. {
  90. First = first;
  91. Second = second;
  92. Third = third;
  93. }
  94. internal IObservable<TSource1> First { get; }
  95. internal IObservable<TSource2> Second { get; }
  96. internal IObservable<TSource3> Third { get; }
  97. /// <summary>
  98. /// Creates a pattern that matches when all four observable sequences have an available element.
  99. /// </summary>
  100. /// <typeparam name="TSource4">The type of the elements in the fourth observable sequence.</typeparam>
  101. /// <param name="other">Observable sequence to match with the three previous sequences.</param>
  102. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  103. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  104. public Pattern<TSource1, TSource2, TSource3, TSource4> And<TSource4>(IObservable<TSource4> other)
  105. {
  106. if (other == null)
  107. {
  108. throw new ArgumentNullException(nameof(other));
  109. }
  110. return new Pattern<TSource1, TSource2, TSource3, TSource4>(First, Second, Third, other);
  111. }
  112. /// <summary>
  113. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  114. /// </summary>
  115. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  116. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  117. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  118. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  119. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TResult> selector)
  120. {
  121. if (selector == null)
  122. {
  123. throw new ArgumentNullException(nameof(selector));
  124. }
  125. return new Plan<TSource1, TSource2, TSource3, TResult>(this, selector);
  126. }
  127. }
  128. /// <summary>
  129. /// Represents a join pattern over four observable sequences.
  130. /// </summary>
  131. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  132. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  133. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  134. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  135. public class Pattern<TSource1, TSource2, TSource3, TSource4> : Pattern
  136. {
  137. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth)
  138. {
  139. First = first;
  140. Second = second;
  141. Third = third;
  142. Fourth = fourth;
  143. }
  144. internal IObservable<TSource1> First { get; }
  145. internal IObservable<TSource2> Second { get; }
  146. internal IObservable<TSource3> Third { get; }
  147. internal IObservable<TSource4> Fourth { get; }
  148. /// <summary>
  149. /// Creates a pattern that matches when all five observable sequences have an available element.
  150. /// </summary>
  151. /// <typeparam name="TSource5">The type of the elements in the fifth observable sequence.</typeparam>
  152. /// <param name="other">Observable sequence to match with the four previous sequences.</param>
  153. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  154. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  155. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5> And<TSource5>(IObservable<TSource5> other)
  156. {
  157. if (other == null)
  158. {
  159. throw new ArgumentNullException(nameof(other));
  160. }
  161. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5>(First, Second, Third, Fourth, other);
  162. }
  163. /// <summary>
  164. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  165. /// </summary>
  166. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  167. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  168. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  169. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  170. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TResult> selector)
  171. {
  172. if (selector == null)
  173. {
  174. throw new ArgumentNullException(nameof(selector));
  175. }
  176. return new Plan<TSource1, TSource2, TSource3, TSource4, TResult>(this, selector);
  177. }
  178. }
  179. /// <summary>
  180. /// Represents a join pattern over five observable sequences.
  181. /// </summary>
  182. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  183. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  184. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  185. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  186. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  187. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5> : Pattern
  188. {
  189. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth)
  190. {
  191. First = first;
  192. Second = second;
  193. Third = third;
  194. Fourth = fourth;
  195. Fifth = fifth;
  196. }
  197. internal IObservable<TSource1> First { get; }
  198. internal IObservable<TSource2> Second { get; }
  199. internal IObservable<TSource3> Third { get; }
  200. internal IObservable<TSource4> Fourth { get; }
  201. internal IObservable<TSource5> Fifth { get; }
  202. /// <summary>
  203. /// Creates a pattern that matches when all six observable sequences have an available element.
  204. /// </summary>
  205. /// <typeparam name="TSource6">The type of the elements in the sixth observable sequence.</typeparam>
  206. /// <param name="other">Observable sequence to match with the five previous sequences.</param>
  207. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  208. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  209. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6> And<TSource6>(IObservable<TSource6> other)
  210. {
  211. if (other == null)
  212. {
  213. throw new ArgumentNullException(nameof(other));
  214. }
  215. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6>(First, Second, Third, Fourth, Fifth, other);
  216. }
  217. /// <summary>
  218. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  219. /// </summary>
  220. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  221. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  222. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  223. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  224. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TResult> selector)
  225. {
  226. if (selector == null)
  227. {
  228. throw new ArgumentNullException(nameof(selector));
  229. }
  230. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TResult>(this, selector);
  231. }
  232. }
  233. /// <summary>
  234. /// Represents a join pattern over six observable sequences.
  235. /// </summary>
  236. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  237. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  238. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  239. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  240. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  241. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  242. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6> : Pattern
  243. {
  244. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth)
  245. {
  246. First = first;
  247. Second = second;
  248. Third = third;
  249. Fourth = fourth;
  250. Fifth = fifth;
  251. Sixth = sixth;
  252. }
  253. internal IObservable<TSource1> First { get; }
  254. internal IObservable<TSource2> Second { get; }
  255. internal IObservable<TSource3> Third { get; }
  256. internal IObservable<TSource4> Fourth { get; }
  257. internal IObservable<TSource5> Fifth { get; }
  258. internal IObservable<TSource6> Sixth { get; }
  259. /// <summary>
  260. /// Creates a pattern that matches when all seven observable sequences have an available element.
  261. /// </summary>
  262. /// <typeparam name="TSource7">The type of the elements in the seventh observable sequence.</typeparam>
  263. /// <param name="other">Observable sequence to match with the six previous sequences.</param>
  264. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  265. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  266. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7> And<TSource7>(IObservable<TSource7> other)
  267. {
  268. if (other == null)
  269. {
  270. throw new ArgumentNullException(nameof(other));
  271. }
  272. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7>(First, Second, Third, Fourth, Fifth, Sixth, other);
  273. }
  274. /// <summary>
  275. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  276. /// </summary>
  277. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  278. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  279. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  280. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  281. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult> selector)
  282. {
  283. if (selector == null)
  284. {
  285. throw new ArgumentNullException(nameof(selector));
  286. }
  287. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TResult>(this, selector);
  288. }
  289. }
  290. /// <summary>
  291. /// Represents a join pattern over seven observable sequences.
  292. /// </summary>
  293. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  294. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  295. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  296. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  297. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  298. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  299. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  300. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7> : Pattern
  301. {
  302. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh)
  303. {
  304. First = first;
  305. Second = second;
  306. Third = third;
  307. Fourth = fourth;
  308. Fifth = fifth;
  309. Sixth = sixth;
  310. Seventh = seventh;
  311. }
  312. internal IObservable<TSource1> First { get; }
  313. internal IObservable<TSource2> Second { get; }
  314. internal IObservable<TSource3> Third { get; }
  315. internal IObservable<TSource4> Fourth { get; }
  316. internal IObservable<TSource5> Fifth { get; }
  317. internal IObservable<TSource6> Sixth { get; }
  318. internal IObservable<TSource7> Seventh { get; }
  319. /// <summary>
  320. /// Creates a pattern that matches when all eight observable sequences have an available element.
  321. /// </summary>
  322. /// <typeparam name="TSource8">The type of the elements in the eighth observable sequence.</typeparam>
  323. /// <param name="other">Observable sequence to match with the seven previous sequences.</param>
  324. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  325. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  326. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8> And<TSource8>(IObservable<TSource8> other)
  327. {
  328. if (other == null)
  329. {
  330. throw new ArgumentNullException(nameof(other));
  331. }
  332. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, other);
  333. }
  334. /// <summary>
  335. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  336. /// </summary>
  337. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  338. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  339. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  340. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  341. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult> selector)
  342. {
  343. if (selector == null)
  344. {
  345. throw new ArgumentNullException(nameof(selector));
  346. }
  347. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TResult>(this, selector);
  348. }
  349. }
  350. /// <summary>
  351. /// Represents a join pattern over eight observable sequences.
  352. /// </summary>
  353. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  354. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  355. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  356. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  357. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  358. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  359. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  360. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  361. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8> : Pattern
  362. {
  363. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth)
  364. {
  365. First = first;
  366. Second = second;
  367. Third = third;
  368. Fourth = fourth;
  369. Fifth = fifth;
  370. Sixth = sixth;
  371. Seventh = seventh;
  372. Eighth = eighth;
  373. }
  374. internal IObservable<TSource1> First { get; }
  375. internal IObservable<TSource2> Second { get; }
  376. internal IObservable<TSource3> Third { get; }
  377. internal IObservable<TSource4> Fourth { get; }
  378. internal IObservable<TSource5> Fifth { get; }
  379. internal IObservable<TSource6> Sixth { get; }
  380. internal IObservable<TSource7> Seventh { get; }
  381. internal IObservable<TSource8> Eighth { get; }
  382. /// <summary>
  383. /// Creates a pattern that matches when all nine observable sequences have an available element.
  384. /// </summary>
  385. /// <typeparam name="TSource9">The type of the elements in the ninth observable sequence.</typeparam>
  386. /// <param name="other">Observable sequence to match with the eight previous sequences.</param>
  387. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  388. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  389. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9> And<TSource9>(IObservable<TSource9> other)
  390. {
  391. if (other == null)
  392. {
  393. throw new ArgumentNullException(nameof(other));
  394. }
  395. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, other);
  396. }
  397. /// <summary>
  398. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  399. /// </summary>
  400. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  401. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  402. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  403. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  404. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult> selector)
  405. {
  406. if (selector == null)
  407. {
  408. throw new ArgumentNullException(nameof(selector));
  409. }
  410. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TResult>(this, selector);
  411. }
  412. }
  413. /// <summary>
  414. /// Represents a join pattern over nine observable sequences.
  415. /// </summary>
  416. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  417. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  418. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  419. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  420. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  421. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  422. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  423. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  424. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  425. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9> : Pattern
  426. {
  427. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth)
  428. {
  429. First = first;
  430. Second = second;
  431. Third = third;
  432. Fourth = fourth;
  433. Fifth = fifth;
  434. Sixth = sixth;
  435. Seventh = seventh;
  436. Eighth = eighth;
  437. Ninth = ninth;
  438. }
  439. internal IObservable<TSource1> First { get; }
  440. internal IObservable<TSource2> Second { get; }
  441. internal IObservable<TSource3> Third { get; }
  442. internal IObservable<TSource4> Fourth { get; }
  443. internal IObservable<TSource5> Fifth { get; }
  444. internal IObservable<TSource6> Sixth { get; }
  445. internal IObservable<TSource7> Seventh { get; }
  446. internal IObservable<TSource8> Eighth { get; }
  447. internal IObservable<TSource9> Ninth { get; }
  448. /// <summary>
  449. /// Creates a pattern that matches when all ten observable sequences have an available element.
  450. /// </summary>
  451. /// <typeparam name="TSource10">The type of the elements in the tenth observable sequence.</typeparam>
  452. /// <param name="other">Observable sequence to match with the nine previous sequences.</param>
  453. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  454. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  455. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10> And<TSource10>(IObservable<TSource10> other)
  456. {
  457. if (other == null)
  458. {
  459. throw new ArgumentNullException(nameof(other));
  460. }
  461. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, other);
  462. }
  463. /// <summary>
  464. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  465. /// </summary>
  466. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  467. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  468. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  469. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  470. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult> selector)
  471. {
  472. if (selector == null)
  473. {
  474. throw new ArgumentNullException(nameof(selector));
  475. }
  476. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TResult>(this, selector);
  477. }
  478. }
  479. /// <summary>
  480. /// Represents a join pattern over ten observable sequences.
  481. /// </summary>
  482. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  483. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  484. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  485. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  486. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  487. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  488. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  489. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  490. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  491. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  492. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10> : Pattern
  493. {
  494. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth)
  495. {
  496. First = first;
  497. Second = second;
  498. Third = third;
  499. Fourth = fourth;
  500. Fifth = fifth;
  501. Sixth = sixth;
  502. Seventh = seventh;
  503. Eighth = eighth;
  504. Ninth = ninth;
  505. Tenth = tenth;
  506. }
  507. internal IObservable<TSource1> First { get; }
  508. internal IObservable<TSource2> Second { get; }
  509. internal IObservable<TSource3> Third { get; }
  510. internal IObservable<TSource4> Fourth { get; }
  511. internal IObservable<TSource5> Fifth { get; }
  512. internal IObservable<TSource6> Sixth { get; }
  513. internal IObservable<TSource7> Seventh { get; }
  514. internal IObservable<TSource8> Eighth { get; }
  515. internal IObservable<TSource9> Ninth { get; }
  516. internal IObservable<TSource10> Tenth { get; }
  517. /// <summary>
  518. /// Creates a pattern that matches when all eleven observable sequences have an available element.
  519. /// </summary>
  520. /// <typeparam name="TSource11">The type of the elements in the eleventh observable sequence.</typeparam>
  521. /// <param name="other">Observable sequence to match with the ten previous sequences.</param>
  522. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  523. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  524. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11> And<TSource11>(IObservable<TSource11> other)
  525. {
  526. if (other == null)
  527. {
  528. throw new ArgumentNullException(nameof(other));
  529. }
  530. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, other);
  531. }
  532. /// <summary>
  533. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  534. /// </summary>
  535. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  536. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  537. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  538. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  539. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult> selector)
  540. {
  541. if (selector == null)
  542. {
  543. throw new ArgumentNullException(nameof(selector));
  544. }
  545. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TResult>(this, selector);
  546. }
  547. }
  548. /// <summary>
  549. /// Represents a join pattern over eleven observable sequences.
  550. /// </summary>
  551. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  552. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  553. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  554. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  555. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  556. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  557. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  558. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  559. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  560. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  561. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  562. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11> : Pattern
  563. {
  564. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh)
  565. {
  566. First = first;
  567. Second = second;
  568. Third = third;
  569. Fourth = fourth;
  570. Fifth = fifth;
  571. Sixth = sixth;
  572. Seventh = seventh;
  573. Eighth = eighth;
  574. Ninth = ninth;
  575. Tenth = tenth;
  576. Eleventh = eleventh;
  577. }
  578. internal IObservable<TSource1> First { get; }
  579. internal IObservable<TSource2> Second { get; }
  580. internal IObservable<TSource3> Third { get; }
  581. internal IObservable<TSource4> Fourth { get; }
  582. internal IObservable<TSource5> Fifth { get; }
  583. internal IObservable<TSource6> Sixth { get; }
  584. internal IObservable<TSource7> Seventh { get; }
  585. internal IObservable<TSource8> Eighth { get; }
  586. internal IObservable<TSource9> Ninth { get; }
  587. internal IObservable<TSource10> Tenth { get; }
  588. internal IObservable<TSource11> Eleventh { get; }
  589. /// <summary>
  590. /// Creates a pattern that matches when all twelve observable sequences have an available element.
  591. /// </summary>
  592. /// <typeparam name="TSource12">The type of the elements in the twelfth observable sequence.</typeparam>
  593. /// <param name="other">Observable sequence to match with the eleven previous sequences.</param>
  594. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  595. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  596. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12> And<TSource12>(IObservable<TSource12> other)
  597. {
  598. if (other == null)
  599. {
  600. throw new ArgumentNullException(nameof(other));
  601. }
  602. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, other);
  603. }
  604. /// <summary>
  605. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  606. /// </summary>
  607. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  608. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  609. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  610. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  611. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult> selector)
  612. {
  613. if (selector == null)
  614. {
  615. throw new ArgumentNullException(nameof(selector));
  616. }
  617. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TResult>(this, selector);
  618. }
  619. }
  620. /// <summary>
  621. /// Represents a join pattern over twelve observable sequences.
  622. /// </summary>
  623. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  624. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  625. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  626. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  627. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  628. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  629. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  630. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  631. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  632. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  633. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  634. /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
  635. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12> : Pattern
  636. {
  637. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh, IObservable<TSource12> twelfth)
  638. {
  639. First = first;
  640. Second = second;
  641. Third = third;
  642. Fourth = fourth;
  643. Fifth = fifth;
  644. Sixth = sixth;
  645. Seventh = seventh;
  646. Eighth = eighth;
  647. Ninth = ninth;
  648. Tenth = tenth;
  649. Eleventh = eleventh;
  650. Twelfth = twelfth;
  651. }
  652. internal IObservable<TSource1> First { get; }
  653. internal IObservable<TSource2> Second { get; }
  654. internal IObservable<TSource3> Third { get; }
  655. internal IObservable<TSource4> Fourth { get; }
  656. internal IObservable<TSource5> Fifth { get; }
  657. internal IObservable<TSource6> Sixth { get; }
  658. internal IObservable<TSource7> Seventh { get; }
  659. internal IObservable<TSource8> Eighth { get; }
  660. internal IObservable<TSource9> Ninth { get; }
  661. internal IObservable<TSource10> Tenth { get; }
  662. internal IObservable<TSource11> Eleventh { get; }
  663. internal IObservable<TSource12> Twelfth { get; }
  664. /// <summary>
  665. /// Creates a pattern that matches when all thirteen observable sequences have an available element.
  666. /// </summary>
  667. /// <typeparam name="TSource13">The type of the elements in the thirteenth observable sequence.</typeparam>
  668. /// <param name="other">Observable sequence to match with the twelve previous sequences.</param>
  669. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  670. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  671. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13> And<TSource13>(IObservable<TSource13> other)
  672. {
  673. if (other == null)
  674. {
  675. throw new ArgumentNullException(nameof(other));
  676. }
  677. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth, other);
  678. }
  679. /// <summary>
  680. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  681. /// </summary>
  682. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  683. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  684. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  685. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  686. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult> selector)
  687. {
  688. if (selector == null)
  689. {
  690. throw new ArgumentNullException(nameof(selector));
  691. }
  692. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TResult>(this, selector);
  693. }
  694. }
  695. /// <summary>
  696. /// Represents a join pattern over thirteen observable sequences.
  697. /// </summary>
  698. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  699. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  700. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  701. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  702. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  703. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  704. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  705. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  706. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  707. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  708. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  709. /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
  710. /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
  711. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13> : Pattern
  712. {
  713. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh, IObservable<TSource12> twelfth, IObservable<TSource13> thirteenth)
  714. {
  715. First = first;
  716. Second = second;
  717. Third = third;
  718. Fourth = fourth;
  719. Fifth = fifth;
  720. Sixth = sixth;
  721. Seventh = seventh;
  722. Eighth = eighth;
  723. Ninth = ninth;
  724. Tenth = tenth;
  725. Eleventh = eleventh;
  726. Twelfth = twelfth;
  727. Thirteenth = thirteenth;
  728. }
  729. internal IObservable<TSource1> First { get; }
  730. internal IObservable<TSource2> Second { get; }
  731. internal IObservable<TSource3> Third { get; }
  732. internal IObservable<TSource4> Fourth { get; }
  733. internal IObservable<TSource5> Fifth { get; }
  734. internal IObservable<TSource6> Sixth { get; }
  735. internal IObservable<TSource7> Seventh { get; }
  736. internal IObservable<TSource8> Eighth { get; }
  737. internal IObservable<TSource9> Ninth { get; }
  738. internal IObservable<TSource10> Tenth { get; }
  739. internal IObservable<TSource11> Eleventh { get; }
  740. internal IObservable<TSource12> Twelfth { get; }
  741. internal IObservable<TSource13> Thirteenth { get; }
  742. /// <summary>
  743. /// Creates a pattern that matches when all fourteen observable sequences have an available element.
  744. /// </summary>
  745. /// <typeparam name="TSource14">The type of the elements in the fourteenth observable sequence.</typeparam>
  746. /// <param name="other">Observable sequence to match with the thirteen previous sequences.</param>
  747. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  748. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  749. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14> And<TSource14>(IObservable<TSource14> other)
  750. {
  751. if (other == null)
  752. {
  753. throw new ArgumentNullException(nameof(other));
  754. }
  755. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth, Thirteenth, other);
  756. }
  757. /// <summary>
  758. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  759. /// </summary>
  760. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  761. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  762. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  763. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  764. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult> selector)
  765. {
  766. if (selector == null)
  767. {
  768. throw new ArgumentNullException(nameof(selector));
  769. }
  770. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TResult>(this, selector);
  771. }
  772. }
  773. /// <summary>
  774. /// Represents a join pattern over fourteen observable sequences.
  775. /// </summary>
  776. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  777. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  778. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  779. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  780. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  781. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  782. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  783. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  784. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  785. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  786. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  787. /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
  788. /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
  789. /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
  790. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14> : Pattern
  791. {
  792. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh, IObservable<TSource12> twelfth, IObservable<TSource13> thirteenth, IObservable<TSource14> fourteenth)
  793. {
  794. First = first;
  795. Second = second;
  796. Third = third;
  797. Fourth = fourth;
  798. Fifth = fifth;
  799. Sixth = sixth;
  800. Seventh = seventh;
  801. Eighth = eighth;
  802. Ninth = ninth;
  803. Tenth = tenth;
  804. Eleventh = eleventh;
  805. Twelfth = twelfth;
  806. Thirteenth = thirteenth;
  807. Fourteenth = fourteenth;
  808. }
  809. internal IObservable<TSource1> First { get; }
  810. internal IObservable<TSource2> Second { get; }
  811. internal IObservable<TSource3> Third { get; }
  812. internal IObservable<TSource4> Fourth { get; }
  813. internal IObservable<TSource5> Fifth { get; }
  814. internal IObservable<TSource6> Sixth { get; }
  815. internal IObservable<TSource7> Seventh { get; }
  816. internal IObservable<TSource8> Eighth { get; }
  817. internal IObservable<TSource9> Ninth { get; }
  818. internal IObservable<TSource10> Tenth { get; }
  819. internal IObservable<TSource11> Eleventh { get; }
  820. internal IObservable<TSource12> Twelfth { get; }
  821. internal IObservable<TSource13> Thirteenth { get; }
  822. internal IObservable<TSource14> Fourteenth { get; }
  823. /// <summary>
  824. /// Creates a pattern that matches when all fifteen observable sequences have an available element.
  825. /// </summary>
  826. /// <typeparam name="TSource15">The type of the elements in the fifteenth observable sequence.</typeparam>
  827. /// <param name="other">Observable sequence to match with the fourteen previous sequences.</param>
  828. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  829. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  830. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15> And<TSource15>(IObservable<TSource15> other)
  831. {
  832. if (other == null)
  833. {
  834. throw new ArgumentNullException(nameof(other));
  835. }
  836. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth, Thirteenth, Fourteenth, other);
  837. }
  838. /// <summary>
  839. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  840. /// </summary>
  841. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  842. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  843. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  844. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  845. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult> selector)
  846. {
  847. if (selector == null)
  848. {
  849. throw new ArgumentNullException(nameof(selector));
  850. }
  851. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TResult>(this, selector);
  852. }
  853. }
  854. /// <summary>
  855. /// Represents a join pattern over fifteen observable sequences.
  856. /// </summary>
  857. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  858. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  859. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  860. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  861. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  862. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  863. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  864. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  865. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  866. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  867. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  868. /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
  869. /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
  870. /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
  871. /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
  872. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15> : Pattern
  873. {
  874. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh, IObservable<TSource12> twelfth, IObservable<TSource13> thirteenth, IObservable<TSource14> fourteenth, IObservable<TSource15> fifteenth)
  875. {
  876. First = first;
  877. Second = second;
  878. Third = third;
  879. Fourth = fourth;
  880. Fifth = fifth;
  881. Sixth = sixth;
  882. Seventh = seventh;
  883. Eighth = eighth;
  884. Ninth = ninth;
  885. Tenth = tenth;
  886. Eleventh = eleventh;
  887. Twelfth = twelfth;
  888. Thirteenth = thirteenth;
  889. Fourteenth = fourteenth;
  890. Fifteenth = fifteenth;
  891. }
  892. internal IObservable<TSource1> First { get; }
  893. internal IObservable<TSource2> Second { get; }
  894. internal IObservable<TSource3> Third { get; }
  895. internal IObservable<TSource4> Fourth { get; }
  896. internal IObservable<TSource5> Fifth { get; }
  897. internal IObservable<TSource6> Sixth { get; }
  898. internal IObservable<TSource7> Seventh { get; }
  899. internal IObservable<TSource8> Eighth { get; }
  900. internal IObservable<TSource9> Ninth { get; }
  901. internal IObservable<TSource10> Tenth { get; }
  902. internal IObservable<TSource11> Eleventh { get; }
  903. internal IObservable<TSource12> Twelfth { get; }
  904. internal IObservable<TSource13> Thirteenth { get; }
  905. internal IObservable<TSource14> Fourteenth { get; }
  906. internal IObservable<TSource15> Fifteenth { get; }
  907. /// <summary>
  908. /// Creates a pattern that matches when all sixteen observable sequences have an available element.
  909. /// </summary>
  910. /// <typeparam name="TSource16">The type of the elements in the sixteenth observable sequence.</typeparam>
  911. /// <param name="other">Observable sequence to match with the fifteen previous sequences.</param>
  912. /// <returns>Pattern object that matches when all observable sequences have an available element.</returns>
  913. /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
  914. public Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16> And<TSource16>(IObservable<TSource16> other)
  915. {
  916. if (other == null)
  917. {
  918. throw new ArgumentNullException(nameof(other));
  919. }
  920. return new Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16>(First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth, Thirteenth, Fourteenth, Fifteenth, other);
  921. }
  922. /// <summary>
  923. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  924. /// </summary>
  925. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  926. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  927. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  928. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  929. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> selector)
  930. {
  931. if (selector == null)
  932. {
  933. throw new ArgumentNullException(nameof(selector));
  934. }
  935. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this, selector);
  936. }
  937. }
  938. /// <summary>
  939. /// Represents a join pattern over sixteen observable sequences.
  940. /// </summary>
  941. /// <typeparam name="TSource1">The type of the elements in the first source sequence.</typeparam>
  942. /// <typeparam name="TSource2">The type of the elements in the second source sequence.</typeparam>
  943. /// <typeparam name="TSource3">The type of the elements in the third source sequence.</typeparam>
  944. /// <typeparam name="TSource4">The type of the elements in the fourth source sequence.</typeparam>
  945. /// <typeparam name="TSource5">The type of the elements in the fifth source sequence.</typeparam>
  946. /// <typeparam name="TSource6">The type of the elements in the sixth source sequence.</typeparam>
  947. /// <typeparam name="TSource7">The type of the elements in the seventh source sequence.</typeparam>
  948. /// <typeparam name="TSource8">The type of the elements in the eighth source sequence.</typeparam>
  949. /// <typeparam name="TSource9">The type of the elements in the ninth source sequence.</typeparam>
  950. /// <typeparam name="TSource10">The type of the elements in the tenth source sequence.</typeparam>
  951. /// <typeparam name="TSource11">The type of the elements in the eleventh source sequence.</typeparam>
  952. /// <typeparam name="TSource12">The type of the elements in the twelfth source sequence.</typeparam>
  953. /// <typeparam name="TSource13">The type of the elements in the thirteenth source sequence.</typeparam>
  954. /// <typeparam name="TSource14">The type of the elements in the fourteenth source sequence.</typeparam>
  955. /// <typeparam name="TSource15">The type of the elements in the fifteenth source sequence.</typeparam>
  956. /// <typeparam name="TSource16">The type of the elements in the sixteenth source sequence.</typeparam>
  957. public class Pattern<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16> : Pattern
  958. {
  959. internal Pattern(IObservable<TSource1> first, IObservable<TSource2> second, IObservable<TSource3> third, IObservable<TSource4> fourth, IObservable<TSource5> fifth, IObservable<TSource6> sixth, IObservable<TSource7> seventh, IObservable<TSource8> eighth, IObservable<TSource9> ninth, IObservable<TSource10> tenth, IObservable<TSource11> eleventh, IObservable<TSource12> twelfth, IObservable<TSource13> thirteenth, IObservable<TSource14> fourteenth, IObservable<TSource15> fifteenth, IObservable<TSource16> sixteenth)
  960. {
  961. First = first;
  962. Second = second;
  963. Third = third;
  964. Fourth = fourth;
  965. Fifth = fifth;
  966. Sixth = sixth;
  967. Seventh = seventh;
  968. Eighth = eighth;
  969. Ninth = ninth;
  970. Tenth = tenth;
  971. Eleventh = eleventh;
  972. Twelfth = twelfth;
  973. Thirteenth = thirteenth;
  974. Fourteenth = fourteenth;
  975. Fifteenth = fifteenth;
  976. Sixteenth = sixteenth;
  977. }
  978. internal IObservable<TSource1> First { get; }
  979. internal IObservable<TSource2> Second { get; }
  980. internal IObservable<TSource3> Third { get; }
  981. internal IObservable<TSource4> Fourth { get; }
  982. internal IObservable<TSource5> Fifth { get; }
  983. internal IObservable<TSource6> Sixth { get; }
  984. internal IObservable<TSource7> Seventh { get; }
  985. internal IObservable<TSource8> Eighth { get; }
  986. internal IObservable<TSource9> Ninth { get; }
  987. internal IObservable<TSource10> Tenth { get; }
  988. internal IObservable<TSource11> Eleventh { get; }
  989. internal IObservable<TSource12> Twelfth { get; }
  990. internal IObservable<TSource13> Thirteenth { get; }
  991. internal IObservable<TSource14> Fourteenth { get; }
  992. internal IObservable<TSource15> Fifteenth { get; }
  993. internal IObservable<TSource16> Sixteenth { get; }
  994. /// <summary>
  995. /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function.
  996. /// </summary>
  997. /// <typeparam name="TResult">The type of the elements in the result sequence, returned by the selector function.</typeparam>
  998. /// <param name="selector">Selector that will be invoked for elements in the source sequences.</param>
  999. /// <returns>Plan that produces the projected results, to be fed (with other plans) to the When operator.</returns>
  1000. /// <exception cref="ArgumentNullException"><paramref name="selector"/> is null.</exception>
  1001. public Plan<TResult> Then<TResult>(Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult> selector)
  1002. {
  1003. if (selector == null)
  1004. {
  1005. throw new ArgumentNullException(nameof(selector));
  1006. }
  1007. return new Plan<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TSource16, TResult>(this, selector);
  1008. }
  1009. }
  1010. #endregion
  1011. }