-
Notifications
You must be signed in to change notification settings - Fork 421
/
Copy pathExtensions.g.cs
7080 lines (6364 loc) · 365 KB
/
Extensions.g.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#region License and Terms
// MoreLINQ - Extensions to LINQ to Objects
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
namespace MoreLinq.Extensions
{
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
/// <summary><c>Acquire</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AcquireExtension
{
/// <summary>
/// Ensures that a source sequence of <see cref="IDisposable"/>
/// objects are all acquired successfully. If the acquisition of any
/// one <see cref="IDisposable"/> fails then those successfully
/// acquired till that point are disposed.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">Source sequence of <see cref="IDisposable"/> objects.</param>
/// <returns>
/// Returns an array of all the acquired <see cref="IDisposable"/>
/// objects in source order.
/// </returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TSource[] Acquire<TSource>(this IEnumerable<TSource> source)
where TSource : IDisposable
=> MoreEnumerable.Acquire(source);
}
/// <summary><c>Aggregate</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AggregateExtension
{
/// <summary>
/// Applies two accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
Func<TAccumulate1, TAccumulate2, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, resultSelector);
/// <summary>
/// Applies three accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, resultSelector);
/// <summary>
/// Applies four accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TAccumulate4">The type of fourth accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="seed4">The seed value for the fourth accumulator.</param>
/// <param name="accumulator4">The fourth accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4, Func<TAccumulate4, T, TAccumulate4> accumulator4,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, seed4, accumulator4, resultSelector);
/// <summary>
/// Applies five accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TAccumulate4">The type of fourth accumulator value.</typeparam>
/// <typeparam name="TAccumulate5">The type of fifth accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="seed4">The seed value for the fourth accumulator.</param>
/// <param name="accumulator4">The fourth accumulator.</param>
/// <param name="seed5">The seed value for the fifth accumulator.</param>
/// <param name="accumulator5">The fifth accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4, Func<TAccumulate4, T, TAccumulate4> accumulator4,
TAccumulate5 seed5, Func<TAccumulate5, T, TAccumulate5> accumulator5,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, seed4, accumulator4, seed5, accumulator5, resultSelector);
/// <summary>
/// Applies six accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TAccumulate4">The type of fourth accumulator value.</typeparam>
/// <typeparam name="TAccumulate5">The type of fifth accumulator value.</typeparam>
/// <typeparam name="TAccumulate6">The type of sixth accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="seed4">The seed value for the fourth accumulator.</param>
/// <param name="accumulator4">The fourth accumulator.</param>
/// <param name="seed5">The seed value for the fifth accumulator.</param>
/// <param name="accumulator5">The fifth accumulator.</param>
/// <param name="seed6">The seed value for the sixth accumulator.</param>
/// <param name="accumulator6">The sixth accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4, Func<TAccumulate4, T, TAccumulate4> accumulator4,
TAccumulate5 seed5, Func<TAccumulate5, T, TAccumulate5> accumulator5,
TAccumulate6 seed6, Func<TAccumulate6, T, TAccumulate6> accumulator6,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, seed4, accumulator4, seed5, accumulator5, seed6, accumulator6, resultSelector);
/// <summary>
/// Applies seven accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TAccumulate4">The type of fourth accumulator value.</typeparam>
/// <typeparam name="TAccumulate5">The type of fifth accumulator value.</typeparam>
/// <typeparam name="TAccumulate6">The type of sixth accumulator value.</typeparam>
/// <typeparam name="TAccumulate7">The type of seventh accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="seed4">The seed value for the fourth accumulator.</param>
/// <param name="accumulator4">The fourth accumulator.</param>
/// <param name="seed5">The seed value for the fifth accumulator.</param>
/// <param name="accumulator5">The fifth accumulator.</param>
/// <param name="seed6">The seed value for the sixth accumulator.</param>
/// <param name="accumulator6">The sixth accumulator.</param>
/// <param name="seed7">The seed value for the seventh accumulator.</param>
/// <param name="accumulator7">The seventh accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4, Func<TAccumulate4, T, TAccumulate4> accumulator4,
TAccumulate5 seed5, Func<TAccumulate5, T, TAccumulate5> accumulator5,
TAccumulate6 seed6, Func<TAccumulate6, T, TAccumulate6> accumulator6,
TAccumulate7 seed7, Func<TAccumulate7, T, TAccumulate7> accumulator7,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, seed4, accumulator4, seed5, accumulator5, seed6, accumulator6, seed7, accumulator7, resultSelector);
/// <summary>
/// Applies eight accumulators sequentially in a single pass over a
/// sequence.
/// </summary>
/// <typeparam name="T">The type of elements in <paramref name="source"/>.</typeparam>
/// <typeparam name="TAccumulate1">The type of first accumulator value.</typeparam>
/// <typeparam name="TAccumulate2">The type of second accumulator value.</typeparam>
/// <typeparam name="TAccumulate3">The type of third accumulator value.</typeparam>
/// <typeparam name="TAccumulate4">The type of fourth accumulator value.</typeparam>
/// <typeparam name="TAccumulate5">The type of fifth accumulator value.</typeparam>
/// <typeparam name="TAccumulate6">The type of sixth accumulator value.</typeparam>
/// <typeparam name="TAccumulate7">The type of seventh accumulator value.</typeparam>
/// <typeparam name="TAccumulate8">The type of eighth accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the accumulated result.</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="seed1">The seed value for the first accumulator.</param>
/// <param name="accumulator1">The first accumulator.</param>
/// <param name="seed2">The seed value for the second accumulator.</param>
/// <param name="accumulator2">The second accumulator.</param>
/// <param name="seed3">The seed value for the third accumulator.</param>
/// <param name="accumulator3">The third accumulator.</param>
/// <param name="seed4">The seed value for the fourth accumulator.</param>
/// <param name="accumulator4">The fourth accumulator.</param>
/// <param name="seed5">The seed value for the fifth accumulator.</param>
/// <param name="accumulator5">The fifth accumulator.</param>
/// <param name="seed6">The seed value for the sixth accumulator.</param>
/// <param name="accumulator6">The sixth accumulator.</param>
/// <param name="seed7">The seed value for the seventh accumulator.</param>
/// <param name="accumulator7">The seventh accumulator.</param>
/// <param name="seed8">The seed value for the eighth accumulator.</param>
/// <param name="accumulator8">The eighth accumulator.</param>
/// <param name="resultSelector">
/// A function that projects a single result given the result of each
/// accumulator.</param>
/// <returns>The value returned by <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1, Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2, Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3, Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4, Func<TAccumulate4, T, TAccumulate4> accumulator4,
TAccumulate5 seed5, Func<TAccumulate5, T, TAccumulate5> accumulator5,
TAccumulate6 seed6, Func<TAccumulate6, T, TAccumulate6> accumulator6,
TAccumulate7 seed7, Func<TAccumulate7, T, TAccumulate7> accumulator7,
TAccumulate8 seed8, Func<TAccumulate8, T, TAccumulate8> accumulator8,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult> resultSelector)
=> MoreEnumerable.Aggregate(source, seed1, accumulator1, seed2, accumulator2, seed3, accumulator3, seed4, accumulator4, seed5, accumulator5, seed6, accumulator6, seed7, accumulator7, seed8, accumulator8, resultSelector);
}
/// <summary><c>AggregateRight</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AggregateRightExtension
{
/// <summary>
/// Applies a right-associative accumulator function over a sequence.
/// This operator is the right-associative version of the
/// <see cref="Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> LINQ operator.
/// </summary>
/// <typeparam name="TSource">The type of the elements of source.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="func">A right-associative accumulator function to be invoked on each element.</param>
/// <returns>The final accumulator value.</returns>
/// <example>
/// <code><![CDATA[
/// string result = Enumerable.Range(1, 5).Select(i => i.ToString()).AggregateRight((a, b) => string.Format("({0}/{1})", a, b));
/// ]]></code>
/// The <c>result</c> variable will contain <c>"(1/(2/(3/(4/5))))"</c>.
/// </example>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TSource AggregateRight<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, TSource> func)
=> MoreEnumerable.AggregateRight(source, func);
/// <summary>
/// Applies a right-associative accumulator function over a sequence.
/// The specified seed value is used as the initial accumulator value.
/// This operator is the right-associative version of the
/// <see cref="Enumerable.Aggregate{TSource, TAccumulate}(IEnumerable{TSource}, TAccumulate, Func{TAccumulate, TSource, TAccumulate})"/> LINQ operator.
/// </summary>
/// <typeparam name="TSource">The type of the elements of source.</typeparam>
/// <typeparam name="TAccumulate">The type of the accumulator value.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="seed">The initial accumulator value.</param>
/// <param name="func">A right-associative accumulator function to be invoked on each element.</param>
/// <returns>The final accumulator value.</returns>
/// <example>
/// <code><![CDATA[
/// var numbers = Enumerable.Range(1, 5);
/// string result = numbers.AggregateRight("6", (a, b) => string.Format("({0}/{1})", a, b));
/// ]]></code>
/// The <c>result</c> variable will contain <c>"(1/(2/(3/(4/(5/6)))))"</c>.
/// </example>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TAccumulate AggregateRight<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TSource, TAccumulate, TAccumulate> func)
=> MoreEnumerable.AggregateRight(source, seed, func);
/// <summary>
/// Applies a right-associative accumulator function over a sequence.
/// The specified seed value is used as the initial accumulator value,
/// and the specified function is used to select the result value.
/// This operator is the right-associative version of the
/// <see cref="Enumerable.Aggregate{TSource, TAccumulate, TResult}(IEnumerable{TSource}, TAccumulate, Func{TAccumulate, TSource, TAccumulate}, Func{TAccumulate, TResult})"/> LINQ operator.
/// </summary>
/// <typeparam name="TSource">The type of the elements of source.</typeparam>
/// <typeparam name="TAccumulate">The type of the accumulator value.</typeparam>
/// <typeparam name="TResult">The type of the resulting value.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="seed">The initial accumulator value.</param>
/// <param name="func">A right-associative accumulator function to be invoked on each element.</param>
/// <param name="resultSelector">A function to transform the final accumulator value into the result value.</param>
/// <returns>The transformed final accumulator value.</returns>
/// <example>
/// <code><![CDATA[
/// var numbers = Enumerable.Range(1, 5);
/// int result = numbers.AggregateRight("6", (a, b) => string.Format("({0}/{1})", a, b), str => str.Length);
/// ]]></code>
/// The <c>result</c> variable will contain <c>21</c>.
/// </example>
/// <remarks>
/// This operator executes immediately.
/// </remarks>
public static TResult AggregateRight<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TSource, TAccumulate, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
=> MoreEnumerable.AggregateRight(source, seed, func, resultSelector);
}
/// <summary><c>Append</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AppendExtension
{
/// <summary>
/// Returns a sequence consisting of the head elements and the given tail element.
/// </summary>
/// <typeparam name="T">Type of sequence</typeparam>
/// <param name="head">All elements of the head. Must not be null.</param>
/// <param name="tail">Tail element of the new sequence.</param>
/// <returns>A sequence consisting of the head elements and the given tail element.</returns>
/// <remarks>This operator uses deferred execution and streams its results.</remarks>
public static IEnumerable<T> Append<T>(this IEnumerable<T> head, T tail)
=> MoreEnumerable.Append(head, tail);
}
/// <summary><c>Assert</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AssertExtension
{
/// <summary>
/// Asserts that all elements of a sequence meet a given condition
/// otherwise throws an <see cref="Exception"/> object.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="predicate">Function that asserts an element of the <paramref name="source"/> sequence for a condition.</param>
/// <returns>
/// Returns the original sequence.
/// </returns>
/// <exception cref="InvalidOperationException">The input sequence
/// contains an element that does not meet the condition being
/// asserted.</exception>
/// <remarks>
/// This operator uses deferred execution and streams its results.
/// </remarks>
public static IEnumerable<TSource> Assert<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
=> MoreEnumerable.Assert(source, predicate);
/// <summary>
/// Asserts that all elements of a sequence meet a given condition
/// otherwise throws an <see cref="Exception"/> object.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="predicate">Function that asserts an element of the input sequence for a condition.</param>
/// <param name="errorSelector">Function that returns the <see cref="Exception"/> object to throw.</param>
/// <returns>
/// Returns the original sequence.
/// </returns>
/// <remarks>
/// This operator uses deferred execution and streams its results.
/// </remarks>
public static IEnumerable<TSource> Assert<TSource>(this IEnumerable<TSource> source,
Func<TSource, bool> predicate, Func<TSource, Exception> errorSelector)
=> MoreEnumerable.Assert(source, predicate, errorSelector);
}
/// <summary><c>AssertCount</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AssertCountExtension
{
/// <summary>
/// Asserts that a source sequence contains a given count of elements.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="count">Count to assert.</param>
/// <returns>
/// Returns the original sequence as long it is contains the
/// number of elements specified by <paramref name="count"/>.
/// Otherwise it throws <see cref="Exception" />.
/// </returns>
/// <remarks>
/// This operator uses deferred execution and streams its results.
/// </remarks>
public static IEnumerable<TSource> AssertCount<TSource>(this IEnumerable<TSource> source, int count) => MoreEnumerable.AssertCount(source, count);
/// <summary>
/// Asserts that a source sequence contains a given count of elements.
/// A parameter specifies the exception to be thrown.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">Source sequence.</param>
/// <param name="count">Count to assert.</param>
/// <param name="errorSelector">
/// Function that receives a comparison (a negative integer if actual
/// count is less than <paramref name="count"/> and a positive integer
/// if actual count is greater than <paramref name="count"/>) and
/// <paramref name="count"/> as arguments and which returns the
/// <see cref="Exception"/> object to throw.</param>
/// <returns>
/// Returns the original sequence as long it is contains the
/// number of elements specified by <paramref name="count"/>.
/// Otherwise it throws the <see cref="Exception" /> object
/// returned by calling <paramref name="errorSelector"/>.
/// </returns>
/// <remarks>
/// This operator uses deferred execution and streams its results.
/// </remarks>
public static IEnumerable<TSource> AssertCount<TSource>(this IEnumerable<TSource> source,
int count, Func<int, int, Exception> errorSelector) => MoreEnumerable.AssertCount(source, count, errorSelector);
}
/// <summary><c>AtLeast</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AtLeastExtension
{
/// <summary>
/// Determines whether or not the number of elements in the sequence is greater than
/// or equal to the given integer.
/// </summary>
/// <typeparam name="T">Element type of sequence</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="count">The minimum number of items a sequence must have for this
/// function to return true</param>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is negative</exception>
/// <returns><c>true</c> if the number of elements in the sequence is greater than
/// or equal to the given integer or <c>false</c> otherwise.</returns>
/// <example>
/// <code><![CDATA[
/// var numbers = new[] { 123, 456, 789 };
/// var result = numbers.AtLeast(2);
/// ]]></code>
/// The <c>result</c> variable will contain <c>true</c>.
/// </example>
public static bool AtLeast<T>(this IEnumerable<T> source, int count)
=> MoreEnumerable.AtLeast(source, count);
}
/// <summary><c>AtMost</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class AtMostExtension
{
/// <summary>
/// Determines whether or not the number of elements in the sequence is lesser than
/// or equal to the given integer.
/// </summary>
/// <typeparam name="T">Element type of sequence</typeparam>
/// <param name="source">The source sequence</param>
/// <param name="count">The maximun number of items a sequence must have for this
/// function to return true</param>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is null</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is negative</exception>
/// <returns><c>true</c> if the number of elements in the sequence is lesser than
/// or equal to the given integer or <c>false</c> otherwise.</returns>
/// <example>
/// <code><![CDATA[
/// var numbers = new[] { 123, 456, 789 };
/// var result = numbers.AtMost(2);
/// ]]></code>
/// The <c>result</c> variable will contain <c>false</c>.
/// </example>
public static bool AtMost<T>(this IEnumerable<T> source, int count)
=> MoreEnumerable.AtMost(source, count);
}
/// <summary><c>Backsert</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class BacksertExtension
{
/// <summary>
/// Inserts the elements of a sequence into another sequence at a
/// specified index from the tail of the sequence, where zero always
/// represents the last position, one represents the second-last
/// element, two represents the third-last element and so on.
/// </summary>
/// <typeparam name="T">
/// Type of elements in all sequences.</typeparam>
/// <param name="first">The source sequence.</param>
/// <param name="second">The sequence that will be inserted.</param>
/// <param name="index">
/// The zero-based index from the end of <paramref name="first"/> where
/// elements from <paramref name="second"/> should be inserted.
/// <paramref name="second"/>.</param>
/// <returns>
/// A sequence that contains the elements of <paramref name="first"/>
/// plus the elements of <paramref name="second"/> inserted at
/// the given index from the end of <paramref name="first"/>.
/// </returns>
/// <exception cref="ArgumentNullException"><paramref name="first"/> is null.</exception>
/// <exception cref="ArgumentNullException"><paramref name="second"/> is null.</exception>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown if <paramref name="index"/> is negative.
/// </exception>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown lazily if <paramref name="index"/> is greater than the
/// length of <paramref name="first"/>. The validation occurs when
/// the resulting sequence is iterated.
/// </exception>
/// <remarks>
/// This method uses deferred execution and streams its results.
/// </remarks>
public static IEnumerable<T> Backsert<T>(this IEnumerable<T> first, IEnumerable<T> second, int index)
=> MoreEnumerable.Backsert(first, second, index);
}
/// <summary><c>Batch</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class BatchExtension
{
/// <summary>
/// Batches the source sequence into sized buckets.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="size">Size of buckets.</param>
/// <returns>A sequence of equally sized buckets containing elements of the source collection.</returns>
/// <remarks>
/// <para>
/// This operator uses deferred execution and streams its results
/// (buckets are streamed but their content buffered).</para>
/// <para>
/// When more than one bucket is streamed, all buckets except the last
/// is guaranteed to have <paramref name="size"/> elements. The last
/// bucket may be smaller depending on the remaining elements in the
/// <paramref name="source"/> sequence.</para>
/// <para>
/// Each bucket is pre-allocated to <paramref name="size"/> elements.
/// If <paramref name="size"/> is set to a very large value, e.g.
/// <see cref="int.MaxValue"/> to effectively disable batching by just
/// hoping for a single bucket, then it can lead to memory exhaustion
/// (<see cref="OutOfMemoryException"/>).
/// </para>
/// </remarks>
public static IEnumerable<IEnumerable<TSource>> Batch<TSource>(this IEnumerable<TSource> source, int size)
=> MoreEnumerable.Batch(source, size);
/// <summary>
/// Batches the source sequence into sized buckets and applies a projection to each bucket.
/// </summary>
/// <typeparam name="TSource">Type of elements in <paramref name="source"/> sequence.</typeparam>
/// <typeparam name="TResult">Type of result returned by <paramref name="resultSelector"/>.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="size">Size of buckets.</param>
/// <param name="resultSelector">The projection to apply to each bucket.</param>
/// <returns>A sequence of projections on equally sized buckets containing elements of the source collection.</returns>
/// <para>
/// This operator uses deferred execution and streams its results
/// (buckets are streamed but their content buffered).</para>
/// <para>
/// <para>
/// When more than one bucket is streamed, all buckets except the last
/// is guaranteed to have <paramref name="size"/> elements. The last
/// bucket may be smaller depending on the remaining elements in the
/// <paramref name="source"/> sequence.</para>
/// Each bucket is pre-allocated to <paramref name="size"/> elements.
/// If <paramref name="size"/> is set to a very large value, e.g.
/// <see cref="int.MaxValue"/> to effectively disable batching by just
/// hoping for a single bucket, then it can lead to memory exhaustion
/// (<see cref="OutOfMemoryException"/>).
/// </para>
public static IEnumerable<TResult> Batch<TSource, TResult>(this IEnumerable<TSource> source, int size,
Func<IEnumerable<TSource>, TResult> resultSelector)
=> MoreEnumerable.Batch(source, size, resultSelector);
}
/// <summary><c>Cartesian</c> extension.</summary>
[GeneratedCode("MoreLinq.ExtensionsGenerator", "1.0.0.0")]
public static partial class CartesianExtension
{
/// <summary>
/// Returns the Cartesian product of two sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
Func<T1, T2, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, resultSelector);
/// <summary>
/// Returns the Cartesian product of three sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, T3, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
IEnumerable<T3> third,
Func<T1, T2, T3, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, third, resultSelector);
/// <summary>
/// Returns the Cartesian product of four sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="T4">
/// The type of the elements of <paramref name="fourth"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="fourth">The fourth sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, T3, T4, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
IEnumerable<T3> third,
IEnumerable<T4> fourth,
Func<T1, T2, T3, T4, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, third, fourth, resultSelector);
/// <summary>
/// Returns the Cartesian product of five sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="T4">
/// The type of the elements of <paramref name="fourth"/>.</typeparam>
/// <typeparam name="T5">
/// The type of the elements of <paramref name="fifth"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="fourth">The fourth sequence of elements.</param>
/// <param name="fifth">The fifth sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, T3, T4, T5, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
IEnumerable<T3> third,
IEnumerable<T4> fourth,
IEnumerable<T5> fifth,
Func<T1, T2, T3, T4, T5, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, third, fourth, fifth, resultSelector);
/// <summary>
/// Returns the Cartesian product of six sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="T4">
/// The type of the elements of <paramref name="fourth"/>.</typeparam>
/// <typeparam name="T5">
/// The type of the elements of <paramref name="fifth"/>.</typeparam>
/// <typeparam name="T6">
/// The type of the elements of <paramref name="sixth"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="fourth">The fourth sequence of elements.</param>
/// <param name="fifth">The fifth sequence of elements.</param>
/// <param name="sixth">The sixth sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, T3, T4, T5, T6, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
IEnumerable<T3> third,
IEnumerable<T4> fourth,
IEnumerable<T5> fifth,
IEnumerable<T6> sixth,
Func<T1, T2, T3, T4, T5, T6, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, third, fourth, fifth, sixth, resultSelector);
/// <summary>
/// Returns the Cartesian product of seven sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="T4">
/// The type of the elements of <paramref name="fourth"/>.</typeparam>
/// <typeparam name="T5">
/// The type of the elements of <paramref name="fifth"/>.</typeparam>
/// <typeparam name="T6">
/// The type of the elements of <paramref name="sixth"/>.</typeparam>
/// <typeparam name="T7">
/// The type of the elements of <paramref name="seventh"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="fourth">The fourth sequence of elements.</param>
/// <param name="fifth">The fifth sequence of elements.</param>
/// <param name="sixth">The sixth sequence of elements.</param>
/// <param name="seventh">The seventh sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by
/// <paramref name="resultSelector"/>.</returns>
/// <remarks>
/// <para>
/// The method returns items in the same order as a nested foreach
/// loop, but all sequences except for <paramref name="first"/> are
/// cached when iterated over. The cache is then re-used for any
/// subsequent iterations.</para>
/// <para>
/// This method uses deferred execution and stream its results.</para>
/// </remarks>
public static IEnumerable<TResult> Cartesian<T1, T2, T3, T4, T5, T6, T7, TResult>(
this IEnumerable<T1> first,
IEnumerable<T2> second,
IEnumerable<T3> third,
IEnumerable<T4> fourth,
IEnumerable<T5> fifth,
IEnumerable<T6> sixth,
IEnumerable<T7> seventh,
Func<T1, T2, T3, T4, T5, T6, T7, TResult> resultSelector)
=> MoreEnumerable.Cartesian(first, second, third, fourth, fifth, sixth, seventh, resultSelector);
/// <summary>
/// Returns the Cartesian product of eight sequences by enumerating all
/// possible combinations of one item from each sequence, and applying
/// a user-defined projection to the items in a given combination.
/// </summary>
/// <typeparam name="T1">
/// The type of the elements of <paramref name="first"/>.</typeparam>
/// <typeparam name="T2">
/// The type of the elements of <paramref name="second"/>.</typeparam>
/// <typeparam name="T3">
/// The type of the elements of <paramref name="third"/>.</typeparam>
/// <typeparam name="T4">
/// The type of the elements of <paramref name="fourth"/>.</typeparam>
/// <typeparam name="T5">
/// The type of the elements of <paramref name="fifth"/>.</typeparam>
/// <typeparam name="T6">
/// The type of the elements of <paramref name="sixth"/>.</typeparam>
/// <typeparam name="T7">
/// The type of the elements of <paramref name="seventh"/>.</typeparam>
/// <typeparam name="T8">
/// The type of the elements of <paramref name="eighth"/>.</typeparam>
/// <typeparam name="TResult">
/// The type of the elements of the result sequence.</typeparam>
/// <param name="first">The first sequence of elements.</param>
/// <param name="second">The second sequence of elements.</param>
/// <param name="third">The third sequence of elements.</param>
/// <param name="fourth">The fourth sequence of elements.</param>
/// <param name="fifth">The fifth sequence of elements.</param>
/// <param name="sixth">The sixth sequence of elements.</param>
/// <param name="seventh">The seventh sequence of elements.</param>
/// <param name="eighth">The eighth sequence of elements.</param>
/// <param name="resultSelector">A projection function that combines
/// elements from all of the sequences.</param>
/// <returns>A sequence of elements returned by