Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParallelEnumerable.cs
Go to the documentation of this file.
6
7namespace System.Linq;
8
9public static class ParallelEnumerable
10{
12 {
13 if (source == null)
14 {
15 throw new ArgumentNullException("source");
16 }
18 }
19
21 {
22 if (source == null)
23 {
24 throw new ArgumentNullException("source");
25 }
27 }
28
48
50 {
51 if (source == null)
52 {
53 throw new ArgumentNullException("source");
54 }
56 {
58 }
59 return new OrderingQueryOperator<object>(QueryOperator<object>.AsQueryOperator(source2), orderOn: true);
60 }
61
63 {
64 if (source == null)
65 {
66 throw new ArgumentNullException("source");
67 }
68 return new OrderingQueryOperator<TSource>(QueryOperator<TSource>.AsQueryOperator(source), orderOn: false);
69 }
70
72 {
73 if (source == null)
74 {
75 throw new ArgumentNullException("source");
76 }
78 }
79
81 {
82 if (source == null)
83 {
84 throw new ArgumentNullException("source");
85 }
87 {
88 return parallelEnumerableWrapper.WrappedEnumerable;
89 }
90 return source;
91 }
92
94 {
95 if (source == null)
96 {
97 throw new ArgumentNullException("source");
98 }
100 {
101 throw new ArgumentOutOfRangeException("degreeOfParallelism");
102 }
104 empty.DegreeOfParallelism = degreeOfParallelism;
106 }
107
109 {
110 if (source == null)
111 {
112 throw new ArgumentNullException("source");
113 }
115 empty.CancellationState = new CancellationState(cancellationToken);
117 }
118
133
148
149 public static ParallelQuery<int> Range(int start, int count)
150 {
151 if (count < 0 || (count > 0 && int.MaxValue - (count - 1) < start))
152 {
153 throw new ArgumentOutOfRangeException("count");
154 }
155 return new RangeEnumerable(start, count);
156 }
157
159 {
160 if (count < 0)
161 {
162 throw new ArgumentOutOfRangeException("count");
163 }
164 return new RepeatEnumerable<TResult>(element, count);
165 }
166
168 {
169 return EmptyEnumerable<TResult>.Instance;
170 }
171
173 {
174 if (source == null)
175 {
176 throw new ArgumentNullException("source");
177 }
178 if (action == null)
179 {
180 throw new ArgumentNullException("action");
181 }
182 new ForAllOperator<TSource>(source, action).RunSynchronously();
183 }
184
186 {
187 if (source == null)
188 {
189 throw new ArgumentNullException("source");
190 }
191 if (predicate == null)
192 {
193 throw new ArgumentNullException("predicate");
194 }
196 }
197
199 {
200 if (source == null)
201 {
202 throw new ArgumentNullException("source");
203 }
204 if (predicate == null)
205 {
206 throw new ArgumentNullException("predicate");
207 }
209 }
210
212 {
213 if (source == null)
214 {
215 throw new ArgumentNullException("source");
216 }
217 if (selector == null)
218 {
219 throw new ArgumentNullException("selector");
220 }
222 }
223
225 {
226 if (source == null)
227 {
228 throw new ArgumentNullException("source");
229 }
230 if (selector == null)
231 {
232 throw new ArgumentNullException("selector");
233 }
235 }
236
238 {
239 if (first == null)
240 {
241 throw new ArgumentNullException("first");
242 }
243 if (second == null)
244 {
245 throw new ArgumentNullException("second");
246 }
247 if (resultSelector == null)
248 {
249 throw new ArgumentNullException("resultSelector");
250 }
252 }
253
254 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
259
264
265 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
270
272 {
273 if (outer == null)
274 {
275 throw new ArgumentNullException("outer");
276 }
277 if (inner == null)
278 {
279 throw new ArgumentNullException("inner");
280 }
281 if (outerKeySelector == null)
282 {
283 throw new ArgumentNullException("outerKeySelector");
284 }
285 if (innerKeySelector == null)
286 {
287 throw new ArgumentNullException("innerKeySelector");
288 }
289 if (resultSelector == null)
290 {
291 throw new ArgumentNullException("resultSelector");
292 }
294 }
295
296 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
301
306
307 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
312
314 {
315 if (outer == null)
316 {
317 throw new ArgumentNullException("outer");
318 }
319 if (inner == null)
320 {
321 throw new ArgumentNullException("inner");
322 }
323 if (outerKeySelector == null)
324 {
325 throw new ArgumentNullException("outerKeySelector");
326 }
327 if (innerKeySelector == null)
328 {
329 throw new ArgumentNullException("innerKeySelector");
330 }
331 if (resultSelector == null)
332 {
333 throw new ArgumentNullException("resultSelector");
334 }
336 }
337
338 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
343
345 {
346 if (source == null)
347 {
348 throw new ArgumentNullException("source");
349 }
350 if (selector == null)
351 {
352 throw new ArgumentNullException("selector");
353 }
355 }
356
358 {
359 if (source == null)
360 {
361 throw new ArgumentNullException("source");
362 }
363 if (selector == null)
364 {
365 throw new ArgumentNullException("selector");
366 }
368 }
369
371 {
372 if (source == null)
373 {
374 throw new ArgumentNullException("source");
375 }
376 if (collectionSelector == null)
377 {
378 throw new ArgumentNullException("collectionSelector");
379 }
380 if (resultSelector == null)
381 {
382 throw new ArgumentNullException("resultSelector");
383 }
385 }
386
388 {
389 if (source == null)
390 {
391 throw new ArgumentNullException("source");
392 }
393 if (collectionSelector == null)
394 {
395 throw new ArgumentNullException("collectionSelector");
396 }
397 if (resultSelector == null)
398 {
399 throw new ArgumentNullException("resultSelector");
400 }
402 }
403
405 {
406 if (source == null)
407 {
408 throw new ArgumentNullException("source");
409 }
410 if (keySelector == null)
411 {
412 throw new ArgumentNullException("keySelector");
413 }
415 }
416
418 {
419 if (source == null)
420 {
421 throw new ArgumentNullException("source");
422 }
423 if (keySelector == null)
424 {
425 throw new ArgumentNullException("keySelector");
426 }
428 }
429
431 {
432 if (source == null)
433 {
434 throw new ArgumentNullException("source");
435 }
436 if (keySelector == null)
437 {
438 throw new ArgumentNullException("keySelector");
439 }
441 }
442
455
457 {
458 if (source == null)
459 {
460 throw new ArgumentNullException("source");
461 }
462 if (keySelector == null)
463 {
464 throw new ArgumentNullException("keySelector");
465 }
466 return new OrderedParallelQuery<TSource>((QueryOperator<TSource>)source.OrderedEnumerable.CreateOrderedEnumerable(keySelector, null, descending: false));
467 }
468
470 {
471 if (source == null)
472 {
473 throw new ArgumentNullException("source");
474 }
475 if (keySelector == null)
476 {
477 throw new ArgumentNullException("keySelector");
478 }
479 return new OrderedParallelQuery<TSource>((QueryOperator<TSource>)source.OrderedEnumerable.CreateOrderedEnumerable(keySelector, comparer, descending: false));
480 }
481
483 {
484 if (source == null)
485 {
486 throw new ArgumentNullException("source");
487 }
488 if (keySelector == null)
489 {
490 throw new ArgumentNullException("keySelector");
491 }
492 return new OrderedParallelQuery<TSource>((QueryOperator<TSource>)source.OrderedEnumerable.CreateOrderedEnumerable(keySelector, null, descending: true));
493 }
494
496 {
497 if (source == null)
498 {
499 throw new ArgumentNullException("source");
500 }
501 if (keySelector == null)
502 {
503 throw new ArgumentNullException("keySelector");
504 }
505 return new OrderedParallelQuery<TSource>((QueryOperator<TSource>)source.OrderedEnumerable.CreateOrderedEnumerable(keySelector, comparer, descending: true));
506 }
507
512
514 {
515 if (source == null)
516 {
517 throw new ArgumentNullException("source");
518 }
519 if (keySelector == null)
520 {
521 throw new ArgumentNullException("keySelector");
522 }
524 }
525
530
532 {
533 if (source == null)
534 {
535 throw new ArgumentNullException("source");
536 }
537 if (keySelector == null)
538 {
539 throw new ArgumentNullException("keySelector");
540 }
541 if (elementSelector == null)
542 {
543 throw new ArgumentNullException("elementSelector");
544 }
546 }
547
558
569
580
591
597
599 {
600 using IEnumerator<TSource> enumerator = source.GetEnumerator();
601 TAccumulate val;
602 if (seedIsSpecified)
603 {
604 val = seed;
605 }
606 else
607 {
608 if (!enumerator.MoveNext())
609 {
611 }
612 val = (TAccumulate)(object)enumerator.Current;
613 }
614 while (enumerator.MoveNext())
615 {
616 TSource current = enumerator.Current;
617 try
618 {
619 val = func(val, current);
620 }
621 catch (Exception ex)
622 {
623 throw new AggregateException(ex);
624 }
625 }
626 return val;
627 }
628
630 {
631 return source.Aggregate(func, QueryAggregationOptions.AssociativeCommutative);
632 }
633
635 {
636 if (source == null)
637 {
638 throw new ArgumentNullException("source");
639 }
640 if (func == null)
641 {
642 throw new ArgumentNullException("func");
643 }
644 if ((0xFFFFFFFCu & (uint)options) != 0)
645 {
646 throw new ArgumentOutOfRangeException("options");
647 }
648 if ((options & QueryAggregationOptions.Associative) != QueryAggregationOptions.Associative)
649 {
650 return source.PerformSequentialAggregation(default(TSource), seedIsSpecified: false, func);
651 }
652 return source.PerformAggregation(func, default(TSource), seedIsSpecified: false, throwIfEmpty: true, options);
653 }
654
659
661 {
662 if (source == null)
663 {
664 throw new ArgumentNullException("source");
665 }
666 if (func == null)
667 {
668 throw new ArgumentNullException("func");
669 }
670 if ((0xFFFFFFFCu & (uint)options) != 0)
671 {
672 throw new ArgumentOutOfRangeException("options");
673 }
674 return source.PerformSequentialAggregation(seed, seedIsSpecified: true, func);
675 }
676
678 {
679 if (source == null)
680 {
681 throw new ArgumentNullException("source");
682 }
683 if (func == null)
684 {
685 throw new ArgumentNullException("func");
686 }
687 if (resultSelector == null)
688 {
689 throw new ArgumentNullException("resultSelector");
690 }
691 TAccumulate arg = source.PerformSequentialAggregation(seed, seedIsSpecified: true, func);
692 try
693 {
694 return resultSelector(arg);
695 }
696 catch (Exception ex)
697 {
698 throw new AggregateException(ex);
699 }
700 }
701
703 {
704 if (source == null)
705 {
706 throw new ArgumentNullException("source");
707 }
708 if (updateAccumulatorFunc == null)
709 {
710 throw new ArgumentNullException("updateAccumulatorFunc");
711 }
712 if (combineAccumulatorsFunc == null)
713 {
714 throw new ArgumentNullException("combineAccumulatorsFunc");
715 }
716 if (resultSelector == null)
717 {
718 throw new ArgumentNullException("resultSelector");
719 }
721 }
722
724 {
725 if (source == null)
726 {
727 throw new ArgumentNullException("source");
728 }
729 if (seedFactory == null)
730 {
731 throw new ArgumentNullException("seedFactory");
732 }
733 if (updateAccumulatorFunc == null)
734 {
735 throw new ArgumentNullException("updateAccumulatorFunc");
736 }
737 if (combineAccumulatorsFunc == null)
738 {
739 throw new ArgumentNullException("combineAccumulatorsFunc");
740 }
741 if (resultSelector == null)
742 {
743 throw new ArgumentNullException("resultSelector");
744 }
746 }
747
749 {
750 if (source == null)
751 {
752 throw new ArgumentNullException("source");
753 }
755 {
757 }
758 return new CountAggregationOperator<TSource>(source).Aggregate();
759 }
760
762 {
763 if (source == null)
764 {
765 throw new ArgumentNullException("source");
766 }
767 if (predicate == null)
768 {
769 throw new ArgumentNullException("predicate");
770 }
771 return new CountAggregationOperator<TSource>(source.Where(predicate)).Aggregate();
772 }
773
775 {
776 if (source == null)
777 {
778 throw new ArgumentNullException("source");
779 }
781 {
783 }
784 return new LongCountAggregationOperator<TSource>(source).Aggregate();
785 }
786
788 {
789 if (source == null)
790 {
791 throw new ArgumentNullException("source");
792 }
793 if (predicate == null)
794 {
795 throw new ArgumentNullException("predicate");
796 }
797 return new LongCountAggregationOperator<TSource>(source.Where(predicate)).Aggregate();
798 }
799
800 public static int Sum(this ParallelQuery<int> source)
801 {
802 if (source == null)
803 {
804 throw new ArgumentNullException("source");
805 }
807 }
808
809 public static int? Sum(this ParallelQuery<int?> source)
810 {
811 if (source == null)
812 {
813 throw new ArgumentNullException("source");
814 }
816 }
817
818 public static long Sum(this ParallelQuery<long> source)
819 {
820 if (source == null)
821 {
822 throw new ArgumentNullException("source");
823 }
825 }
826
827 public static long? Sum(this ParallelQuery<long?> source)
828 {
829 if (source == null)
830 {
831 throw new ArgumentNullException("source");
832 }
834 }
835
836 public static float Sum(this ParallelQuery<float> source)
837 {
838 if (source == null)
839 {
840 throw new ArgumentNullException("source");
841 }
843 }
844
845 public static float? Sum(this ParallelQuery<float?> source)
846 {
847 if (source == null)
848 {
849 throw new ArgumentNullException("source");
850 }
852 }
853
854 public static double Sum(this ParallelQuery<double> source)
855 {
856 if (source == null)
857 {
858 throw new ArgumentNullException("source");
859 }
861 }
862
863 public static double? Sum(this ParallelQuery<double?> source)
864 {
865 if (source == null)
866 {
867 throw new ArgumentNullException("source");
868 }
870 }
871
872 public static decimal Sum(this ParallelQuery<decimal> source)
873 {
874 if (source == null)
875 {
876 throw new ArgumentNullException("source");
877 }
879 }
880
881 public static decimal? Sum(this ParallelQuery<decimal?> source)
882 {
883 if (source == null)
884 {
885 throw new ArgumentNullException("source");
886 }
888 }
889
891 {
892 return source.Select(selector).Sum();
893 }
894
896 {
897 return source.Select(selector).Sum();
898 }
899
901 {
902 return source.Select(selector).Sum();
903 }
904
906 {
907 return source.Select(selector).Sum();
908 }
909
911 {
912 return source.Select(selector).Sum();
913 }
914
916 {
917 return source.Select(selector).Sum();
918 }
919
921 {
922 return source.Select(selector).Sum();
923 }
924
926 {
927 return source.Select(selector).Sum();
928 }
929
931 {
932 return source.Select(selector).Sum();
933 }
934
936 {
937 return source.Select(selector).Sum();
938 }
939
940 public static int Min(this ParallelQuery<int> source)
941 {
942 if (source == null)
943 {
944 throw new ArgumentNullException("source");
945 }
947 }
948
949 public static int? Min(this ParallelQuery<int?> source)
950 {
951 if (source == null)
952 {
953 throw new ArgumentNullException("source");
954 }
956 }
957
958 public static long Min(this ParallelQuery<long> source)
959 {
960 if (source == null)
961 {
962 throw new ArgumentNullException("source");
963 }
965 }
966
967 public static long? Min(this ParallelQuery<long?> source)
968 {
969 if (source == null)
970 {
971 throw new ArgumentNullException("source");
972 }
974 }
975
976 public static float Min(this ParallelQuery<float> source)
977 {
978 if (source == null)
979 {
980 throw new ArgumentNullException("source");
981 }
983 }
984
985 public static float? Min(this ParallelQuery<float?> source)
986 {
987 if (source == null)
988 {
989 throw new ArgumentNullException("source");
990 }
992 }
993
994 public static double Min(this ParallelQuery<double> source)
995 {
996 if (source == null)
997 {
998 throw new ArgumentNullException("source");
999 }
1001 }
1002
1003 public static double? Min(this ParallelQuery<double?> source)
1004 {
1005 if (source == null)
1006 {
1007 throw new ArgumentNullException("source");
1008 }
1010 }
1011
1012 public static decimal Min(this ParallelQuery<decimal> source)
1013 {
1014 if (source == null)
1015 {
1016 throw new ArgumentNullException("source");
1017 }
1019 }
1020
1021 public static decimal? Min(this ParallelQuery<decimal?> source)
1022 {
1023 if (source == null)
1024 {
1025 throw new ArgumentNullException("source");
1026 }
1028 }
1029
1030 public static TSource? Min<TSource>(this ParallelQuery<TSource> source)
1031 {
1032 if (source == null)
1033 {
1034 throw new ArgumentNullException("source");
1035 }
1036 return AggregationMinMaxHelpers<TSource>.ReduceMin(source);
1037 }
1038
1040 {
1041 return source.Select(selector).Min<int>();
1042 }
1043
1045 {
1046 return source.Select(selector).Min<int?>();
1047 }
1048
1050 {
1051 return source.Select(selector).Min<long>();
1052 }
1053
1055 {
1056 return source.Select(selector).Min<long?>();
1057 }
1058
1060 {
1061 return source.Select(selector).Min<float>();
1062 }
1063
1065 {
1066 return source.Select(selector).Min<float?>();
1067 }
1068
1070 {
1071 return source.Select(selector).Min<double>();
1072 }
1073
1075 {
1076 return source.Select(selector).Min<double?>();
1077 }
1078
1080 {
1081 return source.Select(selector).Min<decimal>();
1082 }
1083
1085 {
1086 return source.Select(selector).Min<decimal?>();
1087 }
1088
1090 {
1091 return source.Select(selector).Min();
1092 }
1093
1094 public static int Max(this ParallelQuery<int> source)
1095 {
1096 if (source == null)
1097 {
1098 throw new ArgumentNullException("source");
1099 }
1101 }
1102
1103 public static int? Max(this ParallelQuery<int?> source)
1104 {
1105 if (source == null)
1106 {
1107 throw new ArgumentNullException("source");
1108 }
1110 }
1111
1112 public static long Max(this ParallelQuery<long> source)
1113 {
1114 if (source == null)
1115 {
1116 throw new ArgumentNullException("source");
1117 }
1119 }
1120
1121 public static long? Max(this ParallelQuery<long?> source)
1122 {
1123 if (source == null)
1124 {
1125 throw new ArgumentNullException("source");
1126 }
1128 }
1129
1130 public static float Max(this ParallelQuery<float> source)
1131 {
1132 if (source == null)
1133 {
1134 throw new ArgumentNullException("source");
1135 }
1137 }
1138
1139 public static float? Max(this ParallelQuery<float?> source)
1140 {
1141 if (source == null)
1142 {
1143 throw new ArgumentNullException("source");
1144 }
1146 }
1147
1148 public static double Max(this ParallelQuery<double> source)
1149 {
1150 if (source == null)
1151 {
1152 throw new ArgumentNullException("source");
1153 }
1155 }
1156
1157 public static double? Max(this ParallelQuery<double?> source)
1158 {
1159 if (source == null)
1160 {
1161 throw new ArgumentNullException("source");
1162 }
1164 }
1165
1166 public static decimal Max(this ParallelQuery<decimal> source)
1167 {
1168 if (source == null)
1169 {
1170 throw new ArgumentNullException("source");
1171 }
1173 }
1174
1175 public static decimal? Max(this ParallelQuery<decimal?> source)
1176 {
1177 if (source == null)
1178 {
1179 throw new ArgumentNullException("source");
1180 }
1182 }
1183
1184 public static TSource? Max<TSource>(this ParallelQuery<TSource> source)
1185 {
1186 if (source == null)
1187 {
1188 throw new ArgumentNullException("source");
1189 }
1190 return AggregationMinMaxHelpers<TSource>.ReduceMax(source);
1191 }
1192
1194 {
1195 return source.Select(selector).Max<int>();
1196 }
1197
1199 {
1200 return source.Select(selector).Max<int?>();
1201 }
1202
1204 {
1205 return source.Select(selector).Max<long>();
1206 }
1207
1209 {
1210 return source.Select(selector).Max<long?>();
1211 }
1212
1214 {
1215 return source.Select(selector).Max<float>();
1216 }
1217
1219 {
1220 return source.Select(selector).Max<float?>();
1221 }
1222
1224 {
1225 return source.Select(selector).Max<double>();
1226 }
1227
1229 {
1230 return source.Select(selector).Max<double?>();
1231 }
1232
1234 {
1235 return source.Select(selector).Max<decimal>();
1236 }
1237
1239 {
1240 return source.Select(selector).Max<decimal?>();
1241 }
1242
1244 {
1245 return source.Select(selector).Max();
1246 }
1247
1248 public static double Average(this ParallelQuery<int> source)
1249 {
1250 if (source == null)
1251 {
1252 throw new ArgumentNullException("source");
1253 }
1255 }
1256
1257 public static double? Average(this ParallelQuery<int?> source)
1258 {
1259 if (source == null)
1260 {
1261 throw new ArgumentNullException("source");
1262 }
1264 }
1265
1266 public static double Average(this ParallelQuery<long> source)
1267 {
1268 if (source == null)
1269 {
1270 throw new ArgumentNullException("source");
1271 }
1273 }
1274
1275 public static double? Average(this ParallelQuery<long?> source)
1276 {
1277 if (source == null)
1278 {
1279 throw new ArgumentNullException("source");
1280 }
1282 }
1283
1284 public static float Average(this ParallelQuery<float> source)
1285 {
1286 if (source == null)
1287 {
1288 throw new ArgumentNullException("source");
1289 }
1291 }
1292
1293 public static float? Average(this ParallelQuery<float?> source)
1294 {
1295 if (source == null)
1296 {
1297 throw new ArgumentNullException("source");
1298 }
1300 }
1301
1302 public static double Average(this ParallelQuery<double> source)
1303 {
1304 if (source == null)
1305 {
1306 throw new ArgumentNullException("source");
1307 }
1309 }
1310
1311 public static double? Average(this ParallelQuery<double?> source)
1312 {
1313 if (source == null)
1314 {
1315 throw new ArgumentNullException("source");
1316 }
1318 }
1319
1320 public static decimal Average(this ParallelQuery<decimal> source)
1321 {
1322 if (source == null)
1323 {
1324 throw new ArgumentNullException("source");
1325 }
1327 }
1328
1329 public static decimal? Average(this ParallelQuery<decimal?> source)
1330 {
1331 if (source == null)
1332 {
1333 throw new ArgumentNullException("source");
1334 }
1336 }
1337
1339 {
1340 return source.Select(selector).Average();
1341 }
1342
1344 {
1345 return source.Select(selector).Average();
1346 }
1347
1349 {
1350 return source.Select(selector).Average();
1351 }
1352
1354 {
1355 return source.Select(selector).Average();
1356 }
1357
1359 {
1360 return source.Select(selector).Average();
1361 }
1362
1364 {
1365 return source.Select(selector).Average();
1366 }
1367
1369 {
1370 return source.Select(selector).Average();
1371 }
1372
1374 {
1375 return source.Select(selector).Average();
1376 }
1377
1379 {
1380 return source.Select(selector).Average();
1381 }
1382
1384 {
1385 return source.Select(selector).Average();
1386 }
1387
1389 {
1390 if (source == null)
1391 {
1392 throw new ArgumentNullException("source");
1393 }
1394 if (predicate == null)
1395 {
1396 throw new ArgumentNullException("predicate");
1397 }
1398 return new AnyAllSearchOperator<TSource>(source, qualification: true, predicate).Aggregate();
1399 }
1400
1402 {
1403 if (source == null)
1404 {
1405 throw new ArgumentNullException("source");
1406 }
1407 return source.Any((TSource x) => true);
1408 }
1409
1411 {
1412 if (source == null)
1413 {
1414 throw new ArgumentNullException("source");
1415 }
1416 if (predicate == null)
1417 {
1418 throw new ArgumentNullException("predicate");
1419 }
1420 return new AnyAllSearchOperator<TSource>(source, qualification: false, predicate).Aggregate();
1421 }
1422
1423 public static bool Contains<TSource>(this ParallelQuery<TSource> source, TSource value)
1424 {
1425 return source.Contains(value, null);
1426 }
1427
1429 {
1430 if (source == null)
1431 {
1432 throw new ArgumentNullException("source");
1433 }
1434 return new ContainsSearchOperator<TSource>(source, value, comparer).Aggregate();
1435 }
1436
1438 {
1439 if (source == null)
1440 {
1441 throw new ArgumentNullException("source");
1442 }
1443 if (count > 0)
1444 {
1446 }
1447 return Empty<TSource>();
1448 }
1449
1451 {
1452 if (source == null)
1453 {
1454 throw new ArgumentNullException("source");
1455 }
1456 if (predicate == null)
1457 {
1458 throw new ArgumentNullException("predicate");
1459 }
1461 }
1462
1464 {
1465 if (source == null)
1466 {
1467 throw new ArgumentNullException("source");
1468 }
1469 if (predicate == null)
1470 {
1471 throw new ArgumentNullException("predicate");
1472 }
1474 }
1475
1477 {
1478 if (source == null)
1479 {
1480 throw new ArgumentNullException("source");
1481 }
1482 if (count <= 0)
1483 {
1484 return source;
1485 }
1487 }
1488
1490 {
1491 if (source == null)
1492 {
1493 throw new ArgumentNullException("source");
1494 }
1495 if (predicate == null)
1496 {
1497 throw new ArgumentNullException("predicate");
1498 }
1500 }
1501
1503 {
1504 if (source == null)
1505 {
1506 throw new ArgumentNullException("source");
1507 }
1508 if (predicate == null)
1509 {
1510 throw new ArgumentNullException("predicate");
1511 }
1513 }
1514
1516 {
1517 if (first == null)
1518 {
1519 throw new ArgumentNullException("first");
1520 }
1521 if (second == null)
1522 {
1523 throw new ArgumentNullException("second");
1524 }
1526 }
1527
1528 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1533
1535 {
1536 if (first == null)
1537 {
1538 throw new ArgumentNullException("first");
1539 }
1540 if (second == null)
1541 {
1542 throw new ArgumentNullException("second");
1543 }
1544 return first.SequenceEqual(second, null);
1545 }
1546
1547 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1552
1554 {
1555 if (first == null)
1556 {
1557 throw new ArgumentNullException("first");
1558 }
1559 if (second == null)
1560 {
1561 throw new ArgumentNullException("second");
1562 }
1566 QuerySettings querySettings = queryOperator.SpecifiedQuerySettings.Merge(queryOperator2.SpecifiedQuerySettings).WithDefaults().WithPerExecutionSettings(new CancellationTokenSource(), new Shared<bool>(value: false));
1568 try
1569 {
1571 try
1572 {
1573 while (enumerator.MoveNext())
1574 {
1575 if (!enumerator2.MoveNext() || !comparer.Equals(enumerator.Current, enumerator2.Current))
1576 {
1577 return false;
1578 }
1579 }
1580 if (enumerator2.MoveNext())
1581 {
1582 return false;
1583 }
1584 }
1585 catch (Exception ex)
1586 {
1588 }
1589 finally
1590 {
1591 DisposeEnumerator(enumerator2, querySettings.CancellationState);
1592 }
1593 }
1594 finally
1595 {
1596 DisposeEnumerator(enumerator, querySettings.CancellationState);
1597 }
1598 return true;
1599 }
1600
1602 {
1603 try
1604 {
1605 e.Dispose();
1606 }
1607 catch (Exception ex)
1608 {
1610 }
1611 }
1612
1613 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1618
1620 {
1621 return source.Distinct(null);
1622 }
1623
1625 {
1626 if (source == null)
1627 {
1628 throw new ArgumentNullException("source");
1629 }
1631 }
1632
1637
1638 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1643
1645 {
1646 if (first == null)
1647 {
1648 throw new ArgumentNullException("first");
1649 }
1650 if (second == null)
1651 {
1652 throw new ArgumentNullException("second");
1653 }
1655 }
1656
1657 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1662
1664 {
1665 return first.Intersect(second, null);
1666 }
1667
1668 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1673
1675 {
1676 if (first == null)
1677 {
1678 throw new ArgumentNullException("first");
1679 }
1680 if (second == null)
1681 {
1682 throw new ArgumentNullException("second");
1683 }
1685 }
1686
1687 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1692
1697
1698 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1703
1705 {
1706 if (first == null)
1707 {
1708 throw new ArgumentNullException("first");
1709 }
1710 if (second == null)
1711 {
1712 throw new ArgumentNullException("second");
1713 }
1715 }
1716
1717 [Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
1722
1724 {
1725 return source.AsSequential();
1726 }
1727
1728 public static TSource[] ToArray<TSource>(this ParallelQuery<TSource> source)
1729 {
1730 if (source == null)
1731 {
1732 throw new ArgumentNullException("source");
1733 }
1735 {
1736 return queryOperator.ExecuteAndGetResultsAsArray();
1737 }
1738 return Enumerable.ToArray(source.ToList());
1739 }
1740
1742 {
1743 if (source == null)
1744 {
1745 throw new ArgumentNullException("source");
1746 }
1750 {
1751 if (queryOperator.OrdinalIndexState == OrdinalIndexState.Indexable && queryOperator.OutputOrdered)
1752 {
1753 return new List<TSource>(source.ToArray());
1754 }
1756 }
1757 else
1758 {
1760 }
1761 using (enumerator)
1762 {
1763 while (enumerator.MoveNext())
1764 {
1765 list.Add(enumerator.Current);
1766 }
1767 return list;
1768 }
1769 }
1770
1775
1777 {
1778 if (source == null)
1779 {
1780 throw new ArgumentNullException("source");
1781 }
1782 if (keySelector == null)
1783 {
1784 throw new ArgumentNullException("keySelector");
1785 }
1788 using (enumerator)
1789 {
1790 while (enumerator.MoveNext())
1791 {
1792 TSource current = enumerator.Current;
1793 try
1794 {
1795 TKey key = keySelector(current);
1796 dictionary.Add(key, current);
1797 }
1798 catch (Exception ex)
1799 {
1800 throw new AggregateException(ex);
1801 }
1802 }
1803 return dictionary;
1804 }
1805 }
1806
1811
1813 {
1814 if (source == null)
1815 {
1816 throw new ArgumentNullException("source");
1817 }
1818 if (keySelector == null)
1819 {
1820 throw new ArgumentNullException("keySelector");
1821 }
1822 if (elementSelector == null)
1823 {
1824 throw new ArgumentNullException("elementSelector");
1825 }
1828 using (enumerator)
1829 {
1830 while (enumerator.MoveNext())
1831 {
1832 TSource current = enumerator.Current;
1833 try
1834 {
1835 dictionary.Add(keySelector(current), elementSelector(current));
1836 }
1837 catch (Exception ex)
1838 {
1839 throw new AggregateException(ex);
1840 }
1841 }
1842 return dictionary;
1843 }
1844 }
1845
1850
1852 {
1853 if (source == null)
1854 {
1855 throw new ArgumentNullException("source");
1856 }
1857 if (keySelector == null)
1858 {
1859 throw new ArgumentNullException("keySelector");
1860 }
1863 System.Linq.Parallel.Lookup<TKey, TSource> lookup = new System.Linq.Parallel.Lookup<TKey, TSource>(comparer);
1865 using (enumerator)
1866 {
1867 while (enumerator.MoveNext())
1868 {
1869 lookup.Add(enumerator.Current);
1870 }
1871 return lookup;
1872 }
1873 }
1874
1879
1881 {
1882 if (source == null)
1883 {
1884 throw new ArgumentNullException("source");
1885 }
1886 if (keySelector == null)
1887 {
1888 throw new ArgumentNullException("keySelector");
1889 }
1890 if (elementSelector == null)
1891 {
1892 throw new ArgumentNullException("elementSelector");
1893 }
1896 System.Linq.Parallel.Lookup<TKey, TElement> lookup = new System.Linq.Parallel.Lookup<TKey, TElement>(comparer);
1898 using (enumerator)
1899 {
1900 while (enumerator.MoveNext())
1901 {
1902 lookup.Add(enumerator.Current);
1903 }
1904 return lookup;
1905 }
1906 }
1907
1909 {
1910 if (source == null)
1911 {
1912 throw new ArgumentNullException("source");
1913 }
1915 }
1916
1918 {
1919 if (source == null)
1920 {
1921 throw new ArgumentNullException("source");
1922 }
1923 return source.OfType<TResult>();
1924 }
1925
1927 {
1928 if (source == null)
1929 {
1930 throw new ArgumentNullException("source");
1931 }
1932 return source.Cast<TResult>();
1933 }
1934
1936 {
1938 {
1939 if (enumerator.MoveNext())
1940 {
1941 TSource current = enumerator.Current;
1942 if (throwIfTwo && enumerator.MoveNext())
1943 {
1945 }
1946 return current;
1947 }
1948 }
1949 if (defaultIfEmpty)
1950 {
1951 return default(TSource);
1952 }
1954 }
1955
1957 {
1958 if (source == null)
1959 {
1960 throw new ArgumentNullException("source");
1961 }
1963 QuerySettings querySettings = firstQueryOperator.SpecifiedQuerySettings.WithDefaults();
1964 if (firstQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
1965 {
1966 IEnumerable<TSource> source2 = firstQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
1967 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
1968 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).First();
1969 }
1971 }
1972
1974 {
1975 if (source == null)
1976 {
1977 throw new ArgumentNullException("source");
1978 }
1979 if (predicate == null)
1980 {
1981 throw new ArgumentNullException("predicate");
1982 }
1984 QuerySettings querySettings = firstQueryOperator.SpecifiedQuerySettings.WithDefaults();
1985 if (firstQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
1986 {
1987 IEnumerable<TSource> source2 = firstQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
1988 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
1989 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).First(ExceptionAggregator.WrapFunc(predicate, querySettings.CancellationState));
1990 }
1992 }
1993
1995 {
1996 if (source == null)
1997 {
1998 throw new ArgumentNullException("source");
1999 }
2001 QuerySettings querySettings = firstQueryOperator.SpecifiedQuerySettings.WithDefaults();
2002 if (firstQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2003 {
2004 IEnumerable<TSource> source2 = firstQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2005 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2006 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).FirstOrDefault();
2007 }
2009 }
2010
2012 {
2013 if (source == null)
2014 {
2015 throw new ArgumentNullException("source");
2016 }
2017 if (predicate == null)
2018 {
2019 throw new ArgumentNullException("predicate");
2020 }
2022 QuerySettings querySettings = firstQueryOperator.SpecifiedQuerySettings.WithDefaults();
2023 if (firstQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2024 {
2025 IEnumerable<TSource> source2 = firstQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2026 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2027 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).FirstOrDefault(ExceptionAggregator.WrapFunc(predicate, querySettings.CancellationState));
2028 }
2030 }
2031
2032 public static TSource Last<TSource>(this ParallelQuery<TSource> source)
2033 {
2034 if (source == null)
2035 {
2036 throw new ArgumentNullException("source");
2037 }
2039 QuerySettings querySettings = lastQueryOperator.SpecifiedQuerySettings.WithDefaults();
2040 if (lastQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2041 {
2042 IEnumerable<TSource> source2 = lastQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2043 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2044 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).Last();
2045 }
2047 }
2048
2050 {
2051 if (source == null)
2052 {
2053 throw new ArgumentNullException("source");
2054 }
2055 if (predicate == null)
2056 {
2057 throw new ArgumentNullException("predicate");
2058 }
2060 QuerySettings querySettings = lastQueryOperator.SpecifiedQuerySettings.WithDefaults();
2061 if (lastQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2062 {
2063 IEnumerable<TSource> source2 = lastQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2064 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2065 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).Last(ExceptionAggregator.WrapFunc(predicate, querySettings.CancellationState));
2066 }
2068 }
2069
2071 {
2072 if (source == null)
2073 {
2074 throw new ArgumentNullException("source");
2075 }
2077 QuerySettings querySettings = lastQueryOperator.SpecifiedQuerySettings.WithDefaults();
2078 if (lastQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2079 {
2080 IEnumerable<TSource> source2 = lastQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2081 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2082 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).LastOrDefault();
2083 }
2085 }
2086
2088 {
2089 if (source == null)
2090 {
2091 throw new ArgumentNullException("source");
2092 }
2093 if (predicate == null)
2094 {
2095 throw new ArgumentNullException("predicate");
2096 }
2098 QuerySettings querySettings = lastQueryOperator.SpecifiedQuerySettings.WithDefaults();
2099 if (lastQueryOperator.LimitsParallelism && querySettings.ExecutionMode != ParallelExecutionMode.ForceParallelism)
2100 {
2101 IEnumerable<TSource> source2 = lastQueryOperator.Child.AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken);
2102 IEnumerable<TSource> source3 = CancellableEnumerable.Wrap(source2, querySettings.CancellationState.ExternalCancellationToken);
2103 return ExceptionAggregator.WrapEnumerable(source3, querySettings.CancellationState).LastOrDefault(ExceptionAggregator.WrapFunc(predicate, querySettings.CancellationState));
2104 }
2106 }
2107
2109 {
2110 if (source == null)
2111 {
2112 throw new ArgumentNullException("source");
2113 }
2115 }
2116
2118 {
2119 if (source == null)
2120 {
2121 throw new ArgumentNullException("source");
2122 }
2123 if (predicate == null)
2124 {
2125 throw new ArgumentNullException("predicate");
2126 }
2128 }
2129
2131 {
2132 if (source == null)
2133 {
2134 throw new ArgumentNullException("source");
2135 }
2137 }
2138
2140 {
2141 if (source == null)
2142 {
2143 throw new ArgumentNullException("source");
2144 }
2145 if (predicate == null)
2146 {
2147 throw new ArgumentNullException("predicate");
2148 }
2150 }
2151
2153 {
2154 return source.DefaultIfEmpty(default(TSource));
2155 }
2156
2158 {
2159 if (source == null)
2160 {
2161 throw new ArgumentNullException("source");
2162 }
2164 }
2165
2167 {
2168 if (source == null)
2169 {
2170 throw new ArgumentNullException("source");
2171 }
2172 if (index < 0)
2173 {
2174 throw new ArgumentOutOfRangeException("index");
2175 }
2177 if (elementAtQueryOperator.Aggregate(out var result, withDefaultValue: false))
2178 {
2179 return result;
2180 }
2181 throw new ArgumentOutOfRangeException("index");
2182 }
2183
2185 {
2186 if (source == null)
2187 {
2188 throw new ArgumentNullException("source");
2189 }
2190 if (index >= 0)
2191 {
2193 if (elementAtQueryOperator.Aggregate(out var result, withDefaultValue: true))
2194 {
2195 return result;
2196 }
2197 }
2198 return default(TSource);
2199 }
2200}
void Add(TKey key, TValue value)
static ? double Average(this ParallelQuery< int?> source)
static IEnumerable< TSource > AsSequential< TSource >(this ParallelQuery< TSource > source)
static double Average(this ParallelQuery< int > source)
static ? double Min(this ParallelQuery< double?> source)
static TSource ElementAt< TSource >(this ParallelQuery< TSource > source, int index)
static ParallelQuery< TResult > Cast< TResult >(this ParallelQuery source)
static TSource Single< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TResult > Select< TSource, TResult >(this ParallelQuery< TSource > source, Func< TSource, TResult > selector)
static ParallelQuery< TResult > SelectMany< TSource, TResult >(this ParallelQuery< TSource > source, Func< TSource, IEnumerable< TResult > > selector)
static ? long Sum(this ParallelQuery< long?> source)
static ? double Max(this ParallelQuery< double?> source)
static ParallelQuery< TResult > GroupJoin< TOuter, TInner, TKey, TResult >(this ParallelQuery< TOuter > outer, ParallelQuery< TInner > inner, Func< TOuter, TKey > outerKeySelector, Func< TInner, TKey > innerKeySelector, Func< TOuter, IEnumerable< TInner >, TResult > resultSelector)
static Dictionary< TKey, TSource > ToDictionary< TSource, TKey >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static Dictionary< TKey, TElement > ToDictionary< TSource, TKey, TElement >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector, Func< TSource, TElement > elementSelector)
static double Average(this ParallelQuery< long > source)
static ILookup< TKey, TElement > ToLookup< TSource, TKey, TElement >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector, Func< TSource, TElement > elementSelector)
static TSource[] ToArray< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TSource > WithDegreeOfParallelism< TSource >(this ParallelQuery< TSource > source, int degreeOfParallelism)
static TSource GetOneWithPossibleDefault< TSource >(QueryOperator< TSource > queryOp, bool throwIfTwo, bool defaultIfEmpty)
static float Average(this ParallelQuery< float > source)
static TSource First< TSource >(this ParallelQuery< TSource > source)
static ? decimal Average(this ParallelQuery< decimal?> source)
static TAccumulate PerformSequentialAggregation< TSource, TAccumulate >(this ParallelQuery< TSource > source, TAccumulate seed, bool seedIsSpecified, Func< TAccumulate, TSource, TAccumulate > func)
static decimal Average(this ParallelQuery< decimal > source)
static ParallelQuery< TSource > Except< TSource >(this ParallelQuery< TSource > first, ParallelQuery< TSource > second)
static ParallelQuery< IGrouping< TKey, TElement > > GroupBy< TSource, TKey, TElement >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector, Func< TSource, TElement > elementSelector)
static double Max(this ParallelQuery< double > source)
static ? double Average(this ParallelQuery< double?> source)
static long Sum(this ParallelQuery< long > source)
static bool Contains< TSource >(this ParallelQuery< TSource > source, TSource value)
static ? int Sum(this ParallelQuery< int?> source)
static ParallelQuery< TResult > SelectMany< TSource, TCollection, TResult >(this ParallelQuery< TSource > source, Func< TSource, IEnumerable< TCollection > > collectionSelector, Func< TSource, TCollection, TResult > resultSelector)
static decimal Sum(this ParallelQuery< decimal > source)
static int Count< TSource >(this ParallelQuery< TSource > source)
static void DisposeEnumerator< TSource >(IEnumerator< TSource > e, CancellationState cancelState)
static ParallelQuery< TSource > WithCancellation< TSource >(this ParallelQuery< TSource > source, CancellationToken cancellationToken)
static ParallelQuery< TSource > AsUnordered< TSource >(this ParallelQuery< TSource > source)
static bool All< TSource >(this ParallelQuery< TSource > source, Func< TSource, bool > predicate)
static ? TSource LastOrDefault< TSource >(this ParallelQuery< TSource > source)
static float Min(this ParallelQuery< float > source)
static void ForAll< TSource >(this ParallelQuery< TSource > source, Action< TSource > action)
static IEnumerable< TSource > AsEnumerable< TSource >(this ParallelQuery< TSource > source)
static ? float Average(this ParallelQuery< float?> source)
static ? long Max(this ParallelQuery< long?> source)
static ? TSource SingleOrDefault< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< int > Range(int start, int count)
static OrderedParallelQuery< TSource > OrderBy< TSource, TKey >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static ParallelQuery< TResult > Zip< TFirst, TSecond, TResult >(this ParallelQuery< TFirst > first, ParallelQuery< TSecond > second, Func< TFirst, TSecond, TResult > resultSelector)
static ? TSource Max< TSource >(this ParallelQuery< TSource > source)
static OrderedParallelQuery< TSource > ThenByDescending< TSource, TKey >(this OrderedParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static float Max(this ParallelQuery< float > source)
static ParallelQuery< TSource > Where< TSource >(this ParallelQuery< TSource > source, Func< TSource, bool > predicate)
static ParallelQuery< TSource > AsParallel< TSource >(this IEnumerable< TSource > source)
static long LongCount< TSource >(this ParallelQuery< TSource > source)
static ? TSource Min< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TSource?> DefaultIfEmpty< TSource >(this ParallelQuery< TSource > source)
static ? TResult Min< TSource, TResult >(this ParallelQuery< TSource > source, Func< TSource, TResult > selector)
static ParallelQuery< TResult > OfType< TResult >(this ParallelQuery source)
static ParallelQuery< TSource > AsOrdered< TSource >(this ParallelQuery< TSource > source)
static ? TResult Max< TSource, TResult >(this ParallelQuery< TSource > source, Func< TSource, TResult > selector)
static ParallelQuery< TSource > Take< TSource >(this ParallelQuery< TSource > source, int count)
static int Sum< TSource >(this ParallelQuery< TSource > source, Func< TSource, int > selector)
static ParallelQuery< TResult > GroupBy< TSource, TKey, TElement, TResult >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector, Func< TSource, TElement > elementSelector, Func< TKey, IEnumerable< TElement >, TResult > resultSelector)
static ? float Sum(this ParallelQuery< float?> source)
static TResult Aggregate< TSource, TAccumulate, TResult >(this ParallelQuery< TSource > source, TAccumulate seed, Func< TAccumulate, TSource, TAccumulate > func, Func< TAccumulate, TResult > resultSelector)
static ? long Min(this ParallelQuery< long?> source)
static int Max(this ParallelQuery< int > source)
static double Average< TSource >(this ParallelQuery< TSource > source, Func< TSource, int > selector)
static long Max(this ParallelQuery< long > source)
static ParallelQuery< TSource > Concat< TSource >(this ParallelQuery< TSource > first, ParallelQuery< TSource > second)
static decimal Min(this ParallelQuery< decimal > source)
static TAccumulate Aggregate< TSource, TAccumulate >(this ParallelQuery< TSource > source, TAccumulate seed, Func< TAccumulate, TSource, TAccumulate > func)
static ParallelQuery< TResult > Empty< TResult >()
static decimal Max(this ParallelQuery< decimal > source)
static TSource Last< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TSource > SkipWhile< TSource >(this ParallelQuery< TSource > source, Func< TSource, bool > predicate)
static ? double Sum(this ParallelQuery< double?> source)
static ? decimal Min(this ParallelQuery< decimal?> source)
static int Min(this ParallelQuery< int > source)
static ParallelQuery< TSource > WithMergeOptions< TSource >(this ParallelQuery< TSource > source, ParallelMergeOptions mergeOptions)
static ? decimal Max(this ParallelQuery< decimal?> source)
static bool Any< TSource >(this ParallelQuery< TSource > source, Func< TSource, bool > predicate)
static ParallelQuery AsParallel(this IEnumerable source)
static ? double Average(this ParallelQuery< long?> source)
static ParallelQuery< IGrouping< TKey, TSource > > GroupBy< TSource, TKey >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static double Min(this ParallelQuery< double > source)
static OrderedParallelQuery< TSource > OrderByDescending< TSource, TKey >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static OrderedParallelQuery< TSource > ThenBy< TSource, TKey >(this OrderedParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static ParallelQuery< TSource > Intersect< TSource >(this ParallelQuery< TSource > first, ParallelQuery< TSource > second)
static ParallelQuery< TSource > Union< TSource >(this ParallelQuery< TSource > first, ParallelQuery< TSource > second)
static double Average(this ParallelQuery< double > source)
static int Sum(this ParallelQuery< int > source)
static float Sum(this ParallelQuery< float > source)
static T PerformAggregation< T >(this ParallelQuery< T > source, Func< T, T, T > reduce, T seed, bool seedIsSpecified, bool throwIfEmpty, QueryAggregationOptions options)
static ? TSource ElementAtOrDefault< TSource >(this ParallelQuery< TSource > source, int index)
static List< TSource > ToList< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TResult > Repeat< TResult >(TResult element, int count)
static ParallelQuery< TSource > WithExecutionMode< TSource >(this ParallelQuery< TSource > source, ParallelExecutionMode executionMode)
static ParallelQuery AsOrdered(this ParallelQuery source)
static ? float Min(this ParallelQuery< float?> source)
static ? TSource FirstOrDefault< TSource >(this ParallelQuery< TSource > source)
static TSource Aggregate< TSource >(this ParallelQuery< TSource > source, Func< TSource, TSource, TSource > func)
static ParallelQuery< TSource > Distinct< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TResult > Join< TOuter, TInner, TKey, TResult >(this ParallelQuery< TOuter > outer, ParallelQuery< TInner > inner, Func< TOuter, TKey > outerKeySelector, Func< TInner, TKey > innerKeySelector, Func< TOuter, TInner, TResult > resultSelector)
static ParallelQuery< TSource > TakeWhile< TSource >(this ParallelQuery< TSource > source, Func< TSource, bool > predicate)
static long Min(this ParallelQuery< long > source)
static bool SequenceEqual< TSource >(this ParallelQuery< TSource > first, ParallelQuery< TSource > second)
static ? int Min(this ParallelQuery< int?> source)
static ParallelQuery< TSource > Reverse< TSource >(this ParallelQuery< TSource > source)
static ParallelQuery< TSource > Skip< TSource >(this ParallelQuery< TSource > source, int count)
static ? float Max(this ParallelQuery< float?> source)
static ? int Max(this ParallelQuery< int?> source)
static ILookup< TKey, TSource > ToLookup< TSource, TKey >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector)
static ? decimal Sum(this ParallelQuery< decimal?> source)
static double Sum(this ParallelQuery< double > source)
static ParallelQuery< TResult > GroupBy< TSource, TKey, TResult >(this ParallelQuery< TSource > source, Func< TSource, TKey > keySelector, Func< TKey, IEnumerable< TSource >, TResult > resultSelector)
static void ThrowOCEorAggregateException(Exception ex, CancellationState cancellationState)
static string NoElements
Definition SR.cs:16
static string MoreThanOneMatch
Definition SR.cs:14
static string ParallelQuery_InvalidAsOrderedCall
Definition SR.cs:50
static string ParallelEnumerable_WithMergeOptions_InvalidOptions
Definition SR.cs:58
static string ParallelQuery_InvalidNonGenericAsOrderedCall
Definition SR.cs:52
static string ParallelEnumerable_BinaryOpMustUseAsParallel
Definition SR.cs:54
static string ParallelEnumerable_WithQueryExecutionMode_InvalidMode
Definition SR.cs:56
static string ParallelQuery_PartitionerNotOrderable
Definition SR.cs:48
Definition SR.cs:7