mscorlib(4.0.0.0) API with additions
ValueTuple.cs
1 using System.Collections;
6 
7 namespace System
8 {
10  [Serializable]
11  [StructLayout(LayoutKind.Sequential, Size = 1)]
12  public struct ValueTuple : IEquatable<ValueTuple>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple>, IValueTupleInternal, ITuple
13  {
16  int ITuple.Length
17  {
18  get
19  {
20  return 0;
21  }
22  }
23 
28  object ITuple.this[int index]
29  {
30  get
31  {
32  throw new IndexOutOfRangeException();
33  }
34  }
35 
40  public override bool Equals(object obj)
41  {
42  return obj is ValueTuple;
43  }
44 
48  public bool Equals(ValueTuple other)
49  {
50  return true;
51  }
52 
58  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
59  {
60  return other is ValueTuple;
61  }
62 
68  int IComparable.CompareTo(object other)
69  {
70  if (other == null)
71  {
72  return 1;
73  }
74  if (!(other is ValueTuple))
75  {
76  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
77  }
78  return 0;
79  }
80 
86  public int CompareTo(ValueTuple other)
87  {
88  return 0;
89  }
90 
97  int IStructuralComparable.CompareTo(object other, IComparer comparer)
98  {
99  if (other == null)
100  {
101  return 1;
102  }
103  if (!(other is ValueTuple))
104  {
105  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
106  }
107  return 0;
108  }
109 
112  public override int GetHashCode()
113  {
114  return 0;
115  }
116 
121  {
122  return 0;
123  }
124 
125  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
126  {
127  return 0;
128  }
129 
132  public override string ToString()
133  {
134  return "()";
135  }
136 
137  string IValueTupleInternal.ToStringEnd()
138  {
139  return ")";
140  }
141 
144  public static ValueTuple Create()
145  {
146  return default(ValueTuple);
147  }
148 
153  public static ValueTuple<T1> Create<T1>(T1 item1)
154  {
155  return new ValueTuple<T1>(item1);
156  }
157 
166  public static (T1, T2) Create<T1, T2>(T1 item1, T2 item2)
167  {
168  return (item1, item2);
169  }
170 
179  public static (T1, T2, T3) Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)
180  {
181  return (item1, item2, item3);
182  }
183 
194  public static (T1, T2, T3, T4) Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)
195  {
196  return (item1, item2, item3, item4);
197  }
198 
211  public static (T1, T2, T3, T4, T5) Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
212  {
213  return (item1, item2, item3, item4, item5);
214  }
215 
230  public static (T1, T2, T3, T4, T5, T6) Create<T1, T2, T3, T4, T5, T6>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
231  {
232  return (item1, item2, item3, item4, item5, item6);
233  }
234 
251  public static (T1, T2, T3, T4, T5, T6, T7) Create<T1, T2, T3, T4, T5, T6, T7>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
252  {
253  return (item1, item2, item3, item4, item5, item6, item7);
254  }
255 
274  public static (T1, T2, T3, T4, T5, T6, T7, T8) Create<T1, T2, T3, T4, T5, T6, T7, T8>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8)
275  {
276  return new ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>>(item1, item2, item3, item4, item5, item6, item7, Create(item8));
277  }
278 
279  internal static int CombineHashCodes(int h1, int h2)
280  {
281  return System.Numerics.Hashing.HashHelpers.Combine(h1, h2);
282  }
283 
284  internal static int CombineHashCodes(int h1, int h2, int h3)
285  {
286  return CombineHashCodes(CombineHashCodes(h1, h2), h3);
287  }
288 
289  internal static int CombineHashCodes(int h1, int h2, int h3, int h4)
290  {
291  return CombineHashCodes(CombineHashCodes(h1, h2, h3), h4);
292  }
293 
294  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5)
295  {
296  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4), h5);
297  }
298 
299  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6)
300  {
301  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4, h5), h6);
302  }
303 
304  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7)
305  {
306  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4, h5, h6), h7);
307  }
308 
309  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7, int h8)
310  {
311  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4, h5, h6, h7), h8);
312  }
313  }
316  [Serializable]
317  public struct ValueTuple<T1> : IEquatable<ValueTuple<T1>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1>>, IValueTupleInternal, ITuple
318  {
321  public T1 Item1;
322 
325  int ITuple.Length
326  {
327  get
328  {
329  return 1;
330  }
331  }
332 
338  object ITuple.this[int index]
339  {
340  get
341  {
342  if (index != 0)
343  {
344  throw new IndexOutOfRangeException();
345  }
346  return Item1;
347  }
348  }
349 
352  public ValueTuple(T1 item1)
353  {
354  Item1 = item1;
355  }
356 
361  public override bool Equals(object obj)
362  {
363  if (obj is ValueTuple<T1>)
364  {
365  return Equals((ValueTuple<T1>)obj);
366  }
367  return false;
368  }
369 
374  public bool Equals(ValueTuple<T1> other)
375  {
376  return EqualityComparer<T1>.Default.Equals(Item1, other.Item1);
377  }
378 
384  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
385  {
386  if (other == null || !(other is ValueTuple<T1>))
387  {
388  return false;
389  }
390  ValueTuple<T1> valueTuple = (ValueTuple<T1>)other;
391  return comparer.Equals(Item1, valueTuple.Item1);
392  }
393 
397  int IComparable.CompareTo(object other)
398  {
399  if (other == null)
400  {
401  return 1;
402  }
403  if (!(other is ValueTuple<T1>))
404  {
405  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
406  }
407  ValueTuple<T1> valueTuple = (ValueTuple<T1>)other;
408  return Comparer<T1>.Default.Compare(Item1, valueTuple.Item1);
409  }
410 
422  public int CompareTo(ValueTuple<T1> other)
423  {
424  return Comparer<T1>.Default.Compare(Item1, other.Item1);
425  }
426 
431  int IStructuralComparable.CompareTo(object other, IComparer comparer)
432  {
433  if (other == null)
434  {
435  return 1;
436  }
437  if (!(other is ValueTuple<T1>))
438  {
439  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
440  }
441  ValueTuple<T1> valueTuple = (ValueTuple<T1>)other;
442  return comparer.Compare(Item1, valueTuple.Item1);
443  }
444 
447  public override int GetHashCode()
448  {
449  return EqualityComparer<T1>.Default.GetHashCode(Item1);
450  }
451 
456  {
457  return comparer.GetHashCode(Item1);
458  }
459 
460  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
461  {
462  return comparer.GetHashCode(Item1);
463  }
464 
467  public override string ToString()
468  {
469  ref T1 reference = ref Item1;
470  T1 val = default(T1);
471  object str;
472  if (val == null)
473  {
474  val = reference;
475  reference = ref val;
476  if (val == null)
477  {
478  str = null;
479  goto IL_003a;
480  }
481  }
482  str = reference.ToString();
483  goto IL_003a;
484  IL_003a:
485  return "(" + (string)str + ")";
486  }
487 
488  string IValueTupleInternal.ToStringEnd()
489  {
490  ref T1 reference = ref Item1;
491  T1 val = default(T1);
492  object str;
493  if (val == null)
494  {
495  val = reference;
496  reference = ref val;
497  if (val == null)
498  {
499  str = null;
500  goto IL_0035;
501  }
502  }
503  str = reference.ToString();
504  goto IL_0035;
505  IL_0035:
506  return (string)str + ")";
507  }
508  }
512  [Serializable]
513  [StructLayout(LayoutKind.Auto)]
514  public struct ValueTuple<T1, T2> : IEquatable<(T1, T2)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2)>, IValueTupleInternal, ITuple
515  {
518  public T1 Item1;
519 
522  public T2 Item2;
523 
526  int ITuple.Length
527  {
528  get
529  {
530  return 2;
531  }
532  }
533 
539  object ITuple.this[int index]
540  {
541  get
542  {
543  switch (index)
544  {
545  case 0:
546  return Item1;
547  case 1:
548  return Item2;
549  default:
550  throw new IndexOutOfRangeException();
551  }
552  }
553  }
554 
558  public ValueTuple(T1 item1, T2 item2)
559  {
560  Item1 = item1;
561  Item2 = item2;
562  }
563 
568  public override bool Equals(object obj)
569  {
570  if (obj is(T1, T2))
571  {
572  return Equals(((T1, T2))obj);
573  }
574  return false;
575  }
576 
577  public bool Equals((T1, T2) other)
578  {
579  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1))
580  {
581  return EqualityComparer<T2>.Default.Equals(Item2, other.Item2);
582  }
583  return false;
584  }
585 
591  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
592  {
593  if (other == null || !(other is(T1, T2)))
594  {
595  return false;
596  }
597  (T1, T2) valueTuple = ((T1, T2))other;
598  if (comparer.Equals(Item1, valueTuple.Item1))
599  {
600  return comparer.Equals(Item2, valueTuple.Item2);
601  }
602  return false;
603  }
604 
608  int IComparable.CompareTo(object other)
609  {
610  if (other == null)
611  {
612  return 1;
613  }
614  if (!(other is(T1, T2)))
615  {
616  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2))this).GetType().ToString()), "other");
617  }
618  return CompareTo(((T1, T2))other);
619  }
620 
621  public int CompareTo((T1, T2) other)
622  {
623  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
624  if (num != 0)
625  {
626  return num;
627  }
628  return Comparer<T2>.Default.Compare(Item2, other.Item2);
629  }
630 
635  int IStructuralComparable.CompareTo(object other, IComparer comparer)
636  {
637  if (other == null)
638  {
639  return 1;
640  }
641  if (!(other is(T1, T2)))
642  {
643  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2))this).GetType().ToString()), "other");
644  }
645  (T1, T2) valueTuple = ((T1, T2))other;
646  int num = comparer.Compare(Item1, valueTuple.Item1);
647  if (num != 0)
648  {
649  return num;
650  }
651  return comparer.Compare(Item2, valueTuple.Item2);
652  }
653 
656  public override int GetHashCode()
657  {
658  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2));
659  }
660 
665  {
666  return GetHashCodeCore(comparer);
667  }
668 
669  private int GetHashCodeCore(IEqualityComparer comparer)
670  {
671  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2));
672  }
673 
674  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
675  {
676  return GetHashCodeCore(comparer);
677  }
678 
681  public override string ToString()
682  {
683  string[] obj = new string[5]
684  {
685  "(",
686  null,
687  null,
688  null,
689  null
690  };
691  ref T1 reference = ref Item1;
692  T1 val = default(T1);
693  object obj2;
694  if (val == null)
695  {
696  val = reference;
697  reference = ref val;
698  if (val == null)
699  {
700  obj2 = null;
701  goto IL_0045;
702  }
703  }
704  obj2 = reference.ToString();
705  goto IL_0045;
706  IL_0045:
707  obj[1] = (string)obj2;
708  obj[2] = ", ";
709  ref T2 reference2 = ref Item2;
710  T2 val2 = default(T2);
711  object obj3;
712  if (val2 == null)
713  {
714  val2 = reference2;
715  reference2 = ref val2;
716  if (val2 == null)
717  {
718  obj3 = null;
719  goto IL_0085;
720  }
721  }
722  obj3 = reference2.ToString();
723  goto IL_0085;
724  IL_0085:
725  obj[3] = (string)obj3;
726  obj[4] = ")";
727  return string.Concat(obj);
728  }
729 
730  string IValueTupleInternal.ToStringEnd()
731  {
732  ref T1 reference = ref Item1;
733  T1 val = default(T1);
734  object str;
735  if (val == null)
736  {
737  val = reference;
738  reference = ref val;
739  if (val == null)
740  {
741  str = null;
742  goto IL_0035;
743  }
744  }
745  str = reference.ToString();
746  goto IL_0035;
747  IL_0035:
748  ref T2 reference2 = ref Item2;
749  T2 val2 = default(T2);
750  object str2;
751  if (val2 == null)
752  {
753  val2 = reference2;
754  reference2 = ref val2;
755  if (val2 == null)
756  {
757  str2 = null;
758  goto IL_006f;
759  }
760  }
761  str2 = reference2.ToString();
762  goto IL_006f;
763  IL_006f:
764  return (string)str + ", " + (string)str2 + ")";
765  }
766  }
771  [Serializable]
772  [StructLayout(LayoutKind.Auto)]
773  public struct ValueTuple<T1, T2, T3> : IEquatable<(T1, T2, T3)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3)>, IValueTupleInternal, ITuple
774  {
777  public T1 Item1;
778 
781  public T2 Item2;
782 
785  public T3 Item3;
786 
789  int ITuple.Length
790  {
791  get
792  {
793  return 3;
794  }
795  }
796 
802  object ITuple.this[int index]
803  {
804  get
805  {
806  switch (index)
807  {
808  case 0:
809  return Item1;
810  case 1:
811  return Item2;
812  case 2:
813  return Item3;
814  default:
815  throw new IndexOutOfRangeException();
816  }
817  }
818  }
819 
824  public ValueTuple(T1 item1, T2 item2, T3 item3)
825  {
826  Item1 = item1;
827  Item2 = item2;
828  Item3 = item3;
829  }
830 
835  public override bool Equals(object obj)
836  {
837  if (obj is(T1, T2, T3))
838  {
839  return Equals(((T1, T2, T3))obj);
840  }
841  return false;
842  }
843 
844  public bool Equals((T1, T2, T3) other)
845  {
846  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2))
847  {
848  return EqualityComparer<T3>.Default.Equals(Item3, other.Item3);
849  }
850  return false;
851  }
852 
858  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
859  {
860  if (other == null || !(other is(T1, T2, T3)))
861  {
862  return false;
863  }
864  (T1, T2, T3) valueTuple = ((T1, T2, T3))other;
865  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2))
866  {
867  return comparer.Equals(Item3, valueTuple.Item3);
868  }
869  return false;
870  }
871 
875  int IComparable.CompareTo(object other)
876  {
877  if (other == null)
878  {
879  return 1;
880  }
881  if (!(other is(T1, T2, T3)))
882  {
883  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3))this).GetType().ToString()), "other");
884  }
885  return CompareTo(((T1, T2, T3))other);
886  }
887 
888  public int CompareTo((T1, T2, T3) other)
889  {
890  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
891  if (num != 0)
892  {
893  return num;
894  }
895  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
896  if (num != 0)
897  {
898  return num;
899  }
900  return Comparer<T3>.Default.Compare(Item3, other.Item3);
901  }
902 
907  int IStructuralComparable.CompareTo(object other, IComparer comparer)
908  {
909  if (other == null)
910  {
911  return 1;
912  }
913  if (!(other is(T1, T2, T3)))
914  {
915  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3))this).GetType().ToString()), "other");
916  }
917  (T1, T2, T3) valueTuple = ((T1, T2, T3))other;
918  int num = comparer.Compare(Item1, valueTuple.Item1);
919  if (num != 0)
920  {
921  return num;
922  }
923  num = comparer.Compare(Item2, valueTuple.Item2);
924  if (num != 0)
925  {
926  return num;
927  }
928  return comparer.Compare(Item3, valueTuple.Item3);
929  }
930 
933  public override int GetHashCode()
934  {
935  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3));
936  }
937 
942  {
943  return GetHashCodeCore(comparer);
944  }
945 
946  private int GetHashCodeCore(IEqualityComparer comparer)
947  {
948  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3));
949  }
950 
951  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
952  {
953  return GetHashCodeCore(comparer);
954  }
955 
958  public override string ToString()
959  {
960  string[] obj = new string[7]
961  {
962  "(",
963  null,
964  null,
965  null,
966  null,
967  null,
968  null
969  };
970  ref T1 reference = ref Item1;
971  T1 val = default(T1);
972  object obj2;
973  if (val == null)
974  {
975  val = reference;
976  reference = ref val;
977  if (val == null)
978  {
979  obj2 = null;
980  goto IL_0045;
981  }
982  }
983  obj2 = reference.ToString();
984  goto IL_0045;
985  IL_0085:
986  object obj3;
987  obj[3] = (string)obj3;
988  obj[4] = ", ";
989  ref T3 reference2 = ref Item3;
990  T3 val2 = default(T3);
991  object obj4;
992  if (val2 == null)
993  {
994  val2 = reference2;
995  reference2 = ref val2;
996  if (val2 == null)
997  {
998  obj4 = null;
999  goto IL_00c5;
1000  }
1001  }
1002  obj4 = reference2.ToString();
1003  goto IL_00c5;
1004  IL_00c5:
1005  obj[5] = (string)obj4;
1006  obj[6] = ")";
1007  return string.Concat(obj);
1008  IL_0045:
1009  obj[1] = (string)obj2;
1010  obj[2] = ", ";
1011  ref T2 reference3 = ref Item2;
1012  T2 val3 = default(T2);
1013  if (val3 == null)
1014  {
1015  val3 = reference3;
1016  reference3 = ref val3;
1017  if (val3 == null)
1018  {
1019  obj3 = null;
1020  goto IL_0085;
1021  }
1022  }
1023  obj3 = reference3.ToString();
1024  goto IL_0085;
1025  }
1026 
1027  string IValueTupleInternal.ToStringEnd()
1028  {
1029  string[] obj = new string[6];
1030  ref T1 reference = ref Item1;
1031  T1 val = default(T1);
1032  object obj2;
1033  if (val == null)
1034  {
1035  val = reference;
1036  reference = ref val;
1037  if (val == null)
1038  {
1039  obj2 = null;
1040  goto IL_003d;
1041  }
1042  }
1043  obj2 = reference.ToString();
1044  goto IL_003d;
1045  IL_007d:
1046  object obj3;
1047  obj[2] = (string)obj3;
1048  obj[3] = ", ";
1049  ref T3 reference2 = ref Item3;
1050  T3 val2 = default(T3);
1051  object obj4;
1052  if (val2 == null)
1053  {
1054  val2 = reference2;
1055  reference2 = ref val2;
1056  if (val2 == null)
1057  {
1058  obj4 = null;
1059  goto IL_00bd;
1060  }
1061  }
1062  obj4 = reference2.ToString();
1063  goto IL_00bd;
1064  IL_00bd:
1065  obj[4] = (string)obj4;
1066  obj[5] = ")";
1067  return string.Concat(obj);
1068  IL_003d:
1069  obj[0] = (string)obj2;
1070  obj[1] = ", ";
1071  ref T2 reference3 = ref Item2;
1072  T2 val3 = default(T2);
1073  if (val3 == null)
1074  {
1075  val3 = reference3;
1076  reference3 = ref val3;
1077  if (val3 == null)
1078  {
1079  obj3 = null;
1080  goto IL_007d;
1081  }
1082  }
1083  obj3 = reference3.ToString();
1084  goto IL_007d;
1085  }
1086  }
1092  [Serializable]
1093  [StructLayout(LayoutKind.Auto)]
1094  public struct ValueTuple<T1, T2, T3, T4> : IEquatable<(T1, T2, T3, T4)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4)>, IValueTupleInternal, ITuple
1095  {
1098  public T1 Item1;
1099 
1102  public T2 Item2;
1103 
1106  public T3 Item3;
1107 
1110  public T4 Item4;
1111 
1114  int ITuple.Length
1115  {
1116  get
1117  {
1118  return 4;
1119  }
1120  }
1121 
1127  object ITuple.this[int index]
1128  {
1129  get
1130  {
1131  switch (index)
1132  {
1133  case 0:
1134  return Item1;
1135  case 1:
1136  return Item2;
1137  case 2:
1138  return Item3;
1139  case 3:
1140  return Item4;
1141  default:
1142  throw new IndexOutOfRangeException();
1143  }
1144  }
1145  }
1146 
1152  public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4)
1153  {
1154  Item1 = item1;
1155  Item2 = item2;
1156  Item3 = item3;
1157  Item4 = item4;
1158  }
1159 
1164  public override bool Equals(object obj)
1165  {
1166  if (obj is(T1, T2, T3, T4))
1167  {
1168  return Equals(((T1, T2, T3, T4))obj);
1169  }
1170  return false;
1171  }
1172 
1173  public bool Equals((T1, T2, T3, T4) other)
1174  {
1175  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2) && EqualityComparer<T3>.Default.Equals(Item3, other.Item3))
1176  {
1177  return EqualityComparer<T4>.Default.Equals(Item4, other.Item4);
1178  }
1179  return false;
1180  }
1181 
1187  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
1188  {
1189  if (other == null || !(other is(T1, T2, T3, T4)))
1190  {
1191  return false;
1192  }
1193  (T1, T2, T3, T4) valueTuple = ((T1, T2, T3, T4))other;
1194  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3))
1195  {
1196  return comparer.Equals(Item4, valueTuple.Item4);
1197  }
1198  return false;
1199  }
1200 
1204  int IComparable.CompareTo(object other)
1205  {
1206  if (other == null)
1207  {
1208  return 1;
1209  }
1210  if (!(other is(T1, T2, T3, T4)))
1211  {
1212  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4))this).GetType().ToString()), "other");
1213  }
1214  return CompareTo(((T1, T2, T3, T4))other);
1215  }
1216 
1217  public int CompareTo((T1, T2, T3, T4) other)
1218  {
1219  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
1220  if (num != 0)
1221  {
1222  return num;
1223  }
1224  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
1225  if (num != 0)
1226  {
1227  return num;
1228  }
1229  num = Comparer<T3>.Default.Compare(Item3, other.Item3);
1230  if (num != 0)
1231  {
1232  return num;
1233  }
1234  return Comparer<T4>.Default.Compare(Item4, other.Item4);
1235  }
1236 
1241  int IStructuralComparable.CompareTo(object other, IComparer comparer)
1242  {
1243  if (other == null)
1244  {
1245  return 1;
1246  }
1247  if (!(other is(T1, T2, T3, T4)))
1248  {
1249  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4))this).GetType().ToString()), "other");
1250  }
1251  (T1, T2, T3, T4) valueTuple = ((T1, T2, T3, T4))other;
1252  int num = comparer.Compare(Item1, valueTuple.Item1);
1253  if (num != 0)
1254  {
1255  return num;
1256  }
1257  num = comparer.Compare(Item2, valueTuple.Item2);
1258  if (num != 0)
1259  {
1260  return num;
1261  }
1262  num = comparer.Compare(Item3, valueTuple.Item3);
1263  if (num != 0)
1264  {
1265  return num;
1266  }
1267  return comparer.Compare(Item4, valueTuple.Item4);
1268  }
1269 
1272  public override int GetHashCode()
1273  {
1274  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4));
1275  }
1276 
1281  {
1282  return GetHashCodeCore(comparer);
1283  }
1284 
1285  private int GetHashCodeCore(IEqualityComparer comparer)
1286  {
1287  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4));
1288  }
1289 
1290  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
1291  {
1292  return GetHashCodeCore(comparer);
1293  }
1294 
1297  public override string ToString()
1298  {
1299  string[] obj = new string[9]
1300  {
1301  "(",
1302  null,
1303  null,
1304  null,
1305  null,
1306  null,
1307  null,
1308  null,
1309  null
1310  };
1311  ref T1 reference = ref Item1;
1312  T1 val = default(T1);
1313  object obj2;
1314  if (val == null)
1315  {
1316  val = reference;
1317  reference = ref val;
1318  if (val == null)
1319  {
1320  obj2 = null;
1321  goto IL_0046;
1322  }
1323  }
1324  obj2 = reference.ToString();
1325  goto IL_0046;
1326  IL_0106:
1327  object obj3;
1328  obj[7] = (string)obj3;
1329  obj[8] = ")";
1330  return string.Concat(obj);
1331  IL_0086:
1332  object obj4;
1333  obj[3] = (string)obj4;
1334  obj[4] = ", ";
1335  ref T3 reference2 = ref Item3;
1336  T3 val2 = default(T3);
1337  object obj5;
1338  if (val2 == null)
1339  {
1340  val2 = reference2;
1341  reference2 = ref val2;
1342  if (val2 == null)
1343  {
1344  obj5 = null;
1345  goto IL_00c6;
1346  }
1347  }
1348  obj5 = reference2.ToString();
1349  goto IL_00c6;
1350  IL_00c6:
1351  obj[5] = (string)obj5;
1352  obj[6] = ", ";
1353  ref T4 reference3 = ref Item4;
1354  T4 val3 = default(T4);
1355  if (val3 == null)
1356  {
1357  val3 = reference3;
1358  reference3 = ref val3;
1359  if (val3 == null)
1360  {
1361  obj3 = null;
1362  goto IL_0106;
1363  }
1364  }
1365  obj3 = reference3.ToString();
1366  goto IL_0106;
1367  IL_0046:
1368  obj[1] = (string)obj2;
1369  obj[2] = ", ";
1370  ref T2 reference4 = ref Item2;
1371  T2 val4 = default(T2);
1372  if (val4 == null)
1373  {
1374  val4 = reference4;
1375  reference4 = ref val4;
1376  if (val4 == null)
1377  {
1378  obj4 = null;
1379  goto IL_0086;
1380  }
1381  }
1382  obj4 = reference4.ToString();
1383  goto IL_0086;
1384  }
1385 
1386  string IValueTupleInternal.ToStringEnd()
1387  {
1388  string[] obj = new string[8];
1389  ref T1 reference = ref Item1;
1390  T1 val = default(T1);
1391  object obj2;
1392  if (val == null)
1393  {
1394  val = reference;
1395  reference = ref val;
1396  if (val == null)
1397  {
1398  obj2 = null;
1399  goto IL_003d;
1400  }
1401  }
1402  obj2 = reference.ToString();
1403  goto IL_003d;
1404  IL_00fd:
1405  object obj3;
1406  obj[6] = (string)obj3;
1407  obj[7] = ")";
1408  return string.Concat(obj);
1409  IL_007d:
1410  object obj4;
1411  obj[2] = (string)obj4;
1412  obj[3] = ", ";
1413  ref T3 reference2 = ref Item3;
1414  T3 val2 = default(T3);
1415  object obj5;
1416  if (val2 == null)
1417  {
1418  val2 = reference2;
1419  reference2 = ref val2;
1420  if (val2 == null)
1421  {
1422  obj5 = null;
1423  goto IL_00bd;
1424  }
1425  }
1426  obj5 = reference2.ToString();
1427  goto IL_00bd;
1428  IL_00bd:
1429  obj[4] = (string)obj5;
1430  obj[5] = ", ";
1431  ref T4 reference3 = ref Item4;
1432  T4 val3 = default(T4);
1433  if (val3 == null)
1434  {
1435  val3 = reference3;
1436  reference3 = ref val3;
1437  if (val3 == null)
1438  {
1439  obj3 = null;
1440  goto IL_00fd;
1441  }
1442  }
1443  obj3 = reference3.ToString();
1444  goto IL_00fd;
1445  IL_003d:
1446  obj[0] = (string)obj2;
1447  obj[1] = ", ";
1448  ref T2 reference4 = ref Item2;
1449  T2 val4 = default(T2);
1450  if (val4 == null)
1451  {
1452  val4 = reference4;
1453  reference4 = ref val4;
1454  if (val4 == null)
1455  {
1456  obj4 = null;
1457  goto IL_007d;
1458  }
1459  }
1460  obj4 = reference4.ToString();
1461  goto IL_007d;
1462  }
1463  }
1470  [Serializable]
1471  [StructLayout(LayoutKind.Auto)]
1472  public struct ValueTuple<T1, T2, T3, T4, T5> : IEquatable<(T1, T2, T3, T4, T5)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5)>, IValueTupleInternal, ITuple
1473  {
1476  public T1 Item1;
1477 
1480  public T2 Item2;
1481 
1484  public T3 Item3;
1485 
1488  public T4 Item4;
1489 
1492  public T5 Item5;
1493 
1496  int ITuple.Length
1497  {
1498  get
1499  {
1500  return 5;
1501  }
1502  }
1503 
1509  object ITuple.this[int index]
1510  {
1511  get
1512  {
1513  switch (index)
1514  {
1515  case 0:
1516  return Item1;
1517  case 1:
1518  return Item2;
1519  case 2:
1520  return Item3;
1521  case 3:
1522  return Item4;
1523  case 4:
1524  return Item5;
1525  default:
1526  throw new IndexOutOfRangeException();
1527  }
1528  }
1529  }
1530 
1537  public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
1538  {
1539  Item1 = item1;
1540  Item2 = item2;
1541  Item3 = item3;
1542  Item4 = item4;
1543  Item5 = item5;
1544  }
1545 
1550  public override bool Equals(object obj)
1551  {
1552  if (obj is(T1, T2, T3, T4, T5))
1553  {
1554  return Equals(((T1, T2, T3, T4, T5))obj);
1555  }
1556  return false;
1557  }
1558 
1559  public bool Equals((T1, T2, T3, T4, T5) other)
1560  {
1561  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2) && EqualityComparer<T3>.Default.Equals(Item3, other.Item3) && EqualityComparer<T4>.Default.Equals(Item4, other.Item4))
1562  {
1563  return EqualityComparer<T5>.Default.Equals(Item5, other.Item5);
1564  }
1565  return false;
1566  }
1567 
1573  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
1574  {
1575  if (other == null || !(other is(T1, T2, T3, T4, T5)))
1576  {
1577  return false;
1578  }
1579  (T1, T2, T3, T4, T5) valueTuple = ((T1, T2, T3, T4, T5))other;
1580  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3) && comparer.Equals(Item4, valueTuple.Item4))
1581  {
1582  return comparer.Equals(Item5, valueTuple.Item5);
1583  }
1584  return false;
1585  }
1586 
1590  int IComparable.CompareTo(object other)
1591  {
1592  if (other == null)
1593  {
1594  return 1;
1595  }
1596  if (!(other is(T1, T2, T3, T4, T5)))
1597  {
1598  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5))this).GetType().ToString()), "other");
1599  }
1600  return CompareTo(((T1, T2, T3, T4, T5))other);
1601  }
1602 
1603  public int CompareTo((T1, T2, T3, T4, T5) other)
1604  {
1605  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
1606  if (num != 0)
1607  {
1608  return num;
1609  }
1610  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
1611  if (num != 0)
1612  {
1613  return num;
1614  }
1615  num = Comparer<T3>.Default.Compare(Item3, other.Item3);
1616  if (num != 0)
1617  {
1618  return num;
1619  }
1620  num = Comparer<T4>.Default.Compare(Item4, other.Item4);
1621  if (num != 0)
1622  {
1623  return num;
1624  }
1625  return Comparer<T5>.Default.Compare(Item5, other.Item5);
1626  }
1627 
1632  int IStructuralComparable.CompareTo(object other, IComparer comparer)
1633  {
1634  if (other == null)
1635  {
1636  return 1;
1637  }
1638  if (!(other is(T1, T2, T3, T4, T5)))
1639  {
1640  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5))this).GetType().ToString()), "other");
1641  }
1642  (T1, T2, T3, T4, T5) valueTuple = ((T1, T2, T3, T4, T5))other;
1643  int num = comparer.Compare(Item1, valueTuple.Item1);
1644  if (num != 0)
1645  {
1646  return num;
1647  }
1648  num = comparer.Compare(Item2, valueTuple.Item2);
1649  if (num != 0)
1650  {
1651  return num;
1652  }
1653  num = comparer.Compare(Item3, valueTuple.Item3);
1654  if (num != 0)
1655  {
1656  return num;
1657  }
1658  num = comparer.Compare(Item4, valueTuple.Item4);
1659  if (num != 0)
1660  {
1661  return num;
1662  }
1663  return comparer.Compare(Item5, valueTuple.Item5);
1664  }
1665 
1668  public override int GetHashCode()
1669  {
1670  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5));
1671  }
1672 
1677  {
1678  return GetHashCodeCore(comparer);
1679  }
1680 
1681  private int GetHashCodeCore(IEqualityComparer comparer)
1682  {
1683  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5));
1684  }
1685 
1686  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
1687  {
1688  return GetHashCodeCore(comparer);
1689  }
1690 
1693  public override string ToString()
1694  {
1695  string[] obj = new string[11]
1696  {
1697  "(",
1698  null,
1699  null,
1700  null,
1701  null,
1702  null,
1703  null,
1704  null,
1705  null,
1706  null,
1707  null
1708  };
1709  ref T1 reference = ref Item1;
1710  T1 val = default(T1);
1711  object obj2;
1712  if (val == null)
1713  {
1714  val = reference;
1715  reference = ref val;
1716  if (val == null)
1717  {
1718  obj2 = null;
1719  goto IL_0046;
1720  }
1721  }
1722  obj2 = reference.ToString();
1723  goto IL_0046;
1724  IL_0106:
1725  object obj3;
1726  obj[7] = (string)obj3;
1727  obj[8] = ", ";
1728  ref T5 reference2 = ref Item5;
1729  T5 val2 = default(T5);
1730  object obj4;
1731  if (val2 == null)
1732  {
1733  val2 = reference2;
1734  reference2 = ref val2;
1735  if (val2 == null)
1736  {
1737  obj4 = null;
1738  goto IL_014a;
1739  }
1740  }
1741  obj4 = reference2.ToString();
1742  goto IL_014a;
1743  IL_0086:
1744  object obj5;
1745  obj[3] = (string)obj5;
1746  obj[4] = ", ";
1747  ref T3 reference3 = ref Item3;
1748  T3 val3 = default(T3);
1749  object obj6;
1750  if (val3 == null)
1751  {
1752  val3 = reference3;
1753  reference3 = ref val3;
1754  if (val3 == null)
1755  {
1756  obj6 = null;
1757  goto IL_00c6;
1758  }
1759  }
1760  obj6 = reference3.ToString();
1761  goto IL_00c6;
1762  IL_00c6:
1763  obj[5] = (string)obj6;
1764  obj[6] = ", ";
1765  ref T4 reference4 = ref Item4;
1766  T4 val4 = default(T4);
1767  if (val4 == null)
1768  {
1769  val4 = reference4;
1770  reference4 = ref val4;
1771  if (val4 == null)
1772  {
1773  obj3 = null;
1774  goto IL_0106;
1775  }
1776  }
1777  obj3 = reference4.ToString();
1778  goto IL_0106;
1779  IL_0046:
1780  obj[1] = (string)obj2;
1781  obj[2] = ", ";
1782  ref T2 reference5 = ref Item2;
1783  T2 val5 = default(T2);
1784  if (val5 == null)
1785  {
1786  val5 = reference5;
1787  reference5 = ref val5;
1788  if (val5 == null)
1789  {
1790  obj5 = null;
1791  goto IL_0086;
1792  }
1793  }
1794  obj5 = reference5.ToString();
1795  goto IL_0086;
1796  IL_014a:
1797  obj[9] = (string)obj4;
1798  obj[10] = ")";
1799  return string.Concat(obj);
1800  }
1801 
1802  string IValueTupleInternal.ToStringEnd()
1803  {
1804  string[] obj = new string[10];
1805  ref T1 reference = ref Item1;
1806  T1 val = default(T1);
1807  object obj2;
1808  if (val == null)
1809  {
1810  val = reference;
1811  reference = ref val;
1812  if (val == null)
1813  {
1814  obj2 = null;
1815  goto IL_003e;
1816  }
1817  }
1818  obj2 = reference.ToString();
1819  goto IL_003e;
1820  IL_00fe:
1821  object obj3;
1822  obj[6] = (string)obj3;
1823  obj[7] = ", ";
1824  ref T5 reference2 = ref Item5;
1825  T5 val2 = default(T5);
1826  object obj4;
1827  if (val2 == null)
1828  {
1829  val2 = reference2;
1830  reference2 = ref val2;
1831  if (val2 == null)
1832  {
1833  obj4 = null;
1834  goto IL_0141;
1835  }
1836  }
1837  obj4 = reference2.ToString();
1838  goto IL_0141;
1839  IL_007e:
1840  object obj5;
1841  obj[2] = (string)obj5;
1842  obj[3] = ", ";
1843  ref T3 reference3 = ref Item3;
1844  T3 val3 = default(T3);
1845  object obj6;
1846  if (val3 == null)
1847  {
1848  val3 = reference3;
1849  reference3 = ref val3;
1850  if (val3 == null)
1851  {
1852  obj6 = null;
1853  goto IL_00be;
1854  }
1855  }
1856  obj6 = reference3.ToString();
1857  goto IL_00be;
1858  IL_00be:
1859  obj[4] = (string)obj6;
1860  obj[5] = ", ";
1861  ref T4 reference4 = ref Item4;
1862  T4 val4 = default(T4);
1863  if (val4 == null)
1864  {
1865  val4 = reference4;
1866  reference4 = ref val4;
1867  if (val4 == null)
1868  {
1869  obj3 = null;
1870  goto IL_00fe;
1871  }
1872  }
1873  obj3 = reference4.ToString();
1874  goto IL_00fe;
1875  IL_003e:
1876  obj[0] = (string)obj2;
1877  obj[1] = ", ";
1878  ref T2 reference5 = ref Item2;
1879  T2 val5 = default(T2);
1880  if (val5 == null)
1881  {
1882  val5 = reference5;
1883  reference5 = ref val5;
1884  if (val5 == null)
1885  {
1886  obj5 = null;
1887  goto IL_007e;
1888  }
1889  }
1890  obj5 = reference5.ToString();
1891  goto IL_007e;
1892  IL_0141:
1893  obj[8] = (string)obj4;
1894  obj[9] = ")";
1895  return string.Concat(obj);
1896  }
1897  }
1905  [Serializable]
1906  [StructLayout(LayoutKind.Auto)]
1907  public struct ValueTuple<T1, T2, T3, T4, T5, T6> : IEquatable<(T1, T2, T3, T4, T5, T6)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5, T6)>, IValueTupleInternal, ITuple
1908  {
1911  public T1 Item1;
1912 
1915  public T2 Item2;
1916 
1919  public T3 Item3;
1920 
1923  public T4 Item4;
1924 
1927  public T5 Item5;
1928 
1931  public T6 Item6;
1932 
1935  int ITuple.Length
1936  {
1937  get
1938  {
1939  return 6;
1940  }
1941  }
1942 
1948  object ITuple.this[int index]
1949  {
1950  get
1951  {
1952  switch (index)
1953  {
1954  case 0:
1955  return Item1;
1956  case 1:
1957  return Item2;
1958  case 2:
1959  return Item3;
1960  case 3:
1961  return Item4;
1962  case 4:
1963  return Item5;
1964  case 5:
1965  return Item6;
1966  default:
1967  throw new IndexOutOfRangeException();
1968  }
1969  }
1970  }
1971 
1979  public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
1980  {
1981  Item1 = item1;
1982  Item2 = item2;
1983  Item3 = item3;
1984  Item4 = item4;
1985  Item5 = item5;
1986  Item6 = item6;
1987  }
1988 
1993  public override bool Equals(object obj)
1994  {
1995  if (obj is(T1, T2, T3, T4, T5, T6))
1996  {
1997  return Equals(((T1, T2, T3, T4, T5, T6))obj);
1998  }
1999  return false;
2000  }
2001 
2002  public bool Equals((T1, T2, T3, T4, T5, T6) other)
2003  {
2004  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2) && EqualityComparer<T3>.Default.Equals(Item3, other.Item3) && EqualityComparer<T4>.Default.Equals(Item4, other.Item4) && EqualityComparer<T5>.Default.Equals(Item5, other.Item5))
2005  {
2006  return EqualityComparer<T6>.Default.Equals(Item6, other.Item6);
2007  }
2008  return false;
2009  }
2010 
2016  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
2017  {
2018  if (other == null || !(other is(T1, T2, T3, T4, T5, T6)))
2019  {
2020  return false;
2021  }
2022  (T1, T2, T3, T4, T5, T6) valueTuple = ((T1, T2, T3, T4, T5, T6))other;
2023  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3) && comparer.Equals(Item4, valueTuple.Item4) && comparer.Equals(Item5, valueTuple.Item5))
2024  {
2025  return comparer.Equals(Item6, valueTuple.Item6);
2026  }
2027  return false;
2028  }
2029 
2033  int IComparable.CompareTo(object other)
2034  {
2035  if (other == null)
2036  {
2037  return 1;
2038  }
2039  if (!(other is(T1, T2, T3, T4, T5, T6)))
2040  {
2041  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5, T6))this).GetType().ToString()), "other");
2042  }
2043  return CompareTo(((T1, T2, T3, T4, T5, T6))other);
2044  }
2045 
2046  public int CompareTo((T1, T2, T3, T4, T5, T6) other)
2047  {
2048  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
2049  if (num != 0)
2050  {
2051  return num;
2052  }
2053  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
2054  if (num != 0)
2055  {
2056  return num;
2057  }
2058  num = Comparer<T3>.Default.Compare(Item3, other.Item3);
2059  if (num != 0)
2060  {
2061  return num;
2062  }
2063  num = Comparer<T4>.Default.Compare(Item4, other.Item4);
2064  if (num != 0)
2065  {
2066  return num;
2067  }
2068  num = Comparer<T5>.Default.Compare(Item5, other.Item5);
2069  if (num != 0)
2070  {
2071  return num;
2072  }
2073  return Comparer<T6>.Default.Compare(Item6, other.Item6);
2074  }
2075 
2080  int IStructuralComparable.CompareTo(object other, IComparer comparer)
2081  {
2082  if (other == null)
2083  {
2084  return 1;
2085  }
2086  if (!(other is(T1, T2, T3, T4, T5, T6)))
2087  {
2088  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5, T6))this).GetType().ToString()), "other");
2089  }
2090  (T1, T2, T3, T4, T5, T6) valueTuple = ((T1, T2, T3, T4, T5, T6))other;
2091  int num = comparer.Compare(Item1, valueTuple.Item1);
2092  if (num != 0)
2093  {
2094  return num;
2095  }
2096  num = comparer.Compare(Item2, valueTuple.Item2);
2097  if (num != 0)
2098  {
2099  return num;
2100  }
2101  num = comparer.Compare(Item3, valueTuple.Item3);
2102  if (num != 0)
2103  {
2104  return num;
2105  }
2106  num = comparer.Compare(Item4, valueTuple.Item4);
2107  if (num != 0)
2108  {
2109  return num;
2110  }
2111  num = comparer.Compare(Item5, valueTuple.Item5);
2112  if (num != 0)
2113  {
2114  return num;
2115  }
2116  return comparer.Compare(Item6, valueTuple.Item6);
2117  }
2118 
2121  public override int GetHashCode()
2122  {
2123  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6));
2124  }
2125 
2130  {
2131  return GetHashCodeCore(comparer);
2132  }
2133 
2134  private int GetHashCodeCore(IEqualityComparer comparer)
2135  {
2136  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6));
2137  }
2138 
2139  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
2140  {
2141  return GetHashCodeCore(comparer);
2142  }
2143 
2146  public override string ToString()
2147  {
2148  string[] obj = new string[13]
2149  {
2150  "(",
2151  null,
2152  null,
2153  null,
2154  null,
2155  null,
2156  null,
2157  null,
2158  null,
2159  null,
2160  null,
2161  null,
2162  null
2163  };
2164  ref T1 reference = ref Item1;
2165  T1 val = default(T1);
2166  object obj2;
2167  if (val == null)
2168  {
2169  val = reference;
2170  reference = ref val;
2171  if (val == null)
2172  {
2173  obj2 = null;
2174  goto IL_0046;
2175  }
2176  }
2177  obj2 = reference.ToString();
2178  goto IL_0046;
2179  IL_0086:
2180  object obj3;
2181  obj[3] = (string)obj3;
2182  obj[4] = ", ";
2183  ref T3 reference2 = ref Item3;
2184  T3 val2 = default(T3);
2185  object obj4;
2186  if (val2 == null)
2187  {
2188  val2 = reference2;
2189  reference2 = ref val2;
2190  if (val2 == null)
2191  {
2192  obj4 = null;
2193  goto IL_00c6;
2194  }
2195  }
2196  obj4 = reference2.ToString();
2197  goto IL_00c6;
2198  IL_018f:
2199  object obj5;
2200  obj[11] = (string)obj5;
2201  obj[12] = ")";
2202  return string.Concat(obj);
2203  IL_0106:
2204  object obj6;
2205  obj[7] = (string)obj6;
2206  obj[8] = ", ";
2207  ref T5 reference3 = ref Item5;
2208  T5 val3 = default(T5);
2209  object obj7;
2210  if (val3 == null)
2211  {
2212  val3 = reference3;
2213  reference3 = ref val3;
2214  if (val3 == null)
2215  {
2216  obj7 = null;
2217  goto IL_014a;
2218  }
2219  }
2220  obj7 = reference3.ToString();
2221  goto IL_014a;
2222  IL_0046:
2223  obj[1] = (string)obj2;
2224  obj[2] = ", ";
2225  ref T2 reference4 = ref Item2;
2226  T2 val4 = default(T2);
2227  if (val4 == null)
2228  {
2229  val4 = reference4;
2230  reference4 = ref val4;
2231  if (val4 == null)
2232  {
2233  obj3 = null;
2234  goto IL_0086;
2235  }
2236  }
2237  obj3 = reference4.ToString();
2238  goto IL_0086;
2239  IL_014a:
2240  obj[9] = (string)obj7;
2241  obj[10] = ", ";
2242  ref T6 reference5 = ref Item6;
2243  T6 val5 = default(T6);
2244  if (val5 == null)
2245  {
2246  val5 = reference5;
2247  reference5 = ref val5;
2248  if (val5 == null)
2249  {
2250  obj5 = null;
2251  goto IL_018f;
2252  }
2253  }
2254  obj5 = reference5.ToString();
2255  goto IL_018f;
2256  IL_00c6:
2257  obj[5] = (string)obj4;
2258  obj[6] = ", ";
2259  ref T4 reference6 = ref Item4;
2260  T4 val6 = default(T4);
2261  if (val6 == null)
2262  {
2263  val6 = reference6;
2264  reference6 = ref val6;
2265  if (val6 == null)
2266  {
2267  obj6 = null;
2268  goto IL_0106;
2269  }
2270  }
2271  obj6 = reference6.ToString();
2272  goto IL_0106;
2273  }
2274 
2275  string IValueTupleInternal.ToStringEnd()
2276  {
2277  string[] obj = new string[12];
2278  ref T1 reference = ref Item1;
2279  T1 val = default(T1);
2280  object obj2;
2281  if (val == null)
2282  {
2283  val = reference;
2284  reference = ref val;
2285  if (val == null)
2286  {
2287  obj2 = null;
2288  goto IL_003e;
2289  }
2290  }
2291  obj2 = reference.ToString();
2292  goto IL_003e;
2293  IL_007e:
2294  object obj3;
2295  obj[2] = (string)obj3;
2296  obj[3] = ", ";
2297  ref T3 reference2 = ref Item3;
2298  T3 val2 = default(T3);
2299  object obj4;
2300  if (val2 == null)
2301  {
2302  val2 = reference2;
2303  reference2 = ref val2;
2304  if (val2 == null)
2305  {
2306  obj4 = null;
2307  goto IL_00be;
2308  }
2309  }
2310  obj4 = reference2.ToString();
2311  goto IL_00be;
2312  IL_0186:
2313  object obj5;
2314  obj[10] = (string)obj5;
2315  obj[11] = ")";
2316  return string.Concat(obj);
2317  IL_00fe:
2318  object obj6;
2319  obj[6] = (string)obj6;
2320  obj[7] = ", ";
2321  ref T5 reference3 = ref Item5;
2322  T5 val3 = default(T5);
2323  object obj7;
2324  if (val3 == null)
2325  {
2326  val3 = reference3;
2327  reference3 = ref val3;
2328  if (val3 == null)
2329  {
2330  obj7 = null;
2331  goto IL_0141;
2332  }
2333  }
2334  obj7 = reference3.ToString();
2335  goto IL_0141;
2336  IL_003e:
2337  obj[0] = (string)obj2;
2338  obj[1] = ", ";
2339  ref T2 reference4 = ref Item2;
2340  T2 val4 = default(T2);
2341  if (val4 == null)
2342  {
2343  val4 = reference4;
2344  reference4 = ref val4;
2345  if (val4 == null)
2346  {
2347  obj3 = null;
2348  goto IL_007e;
2349  }
2350  }
2351  obj3 = reference4.ToString();
2352  goto IL_007e;
2353  IL_0141:
2354  obj[8] = (string)obj7;
2355  obj[9] = ", ";
2356  ref T6 reference5 = ref Item6;
2357  T6 val5 = default(T6);
2358  if (val5 == null)
2359  {
2360  val5 = reference5;
2361  reference5 = ref val5;
2362  if (val5 == null)
2363  {
2364  obj5 = null;
2365  goto IL_0186;
2366  }
2367  }
2368  obj5 = reference5.ToString();
2369  goto IL_0186;
2370  IL_00be:
2371  obj[4] = (string)obj4;
2372  obj[5] = ", ";
2373  ref T4 reference6 = ref Item4;
2374  T4 val6 = default(T4);
2375  if (val6 == null)
2376  {
2377  val6 = reference6;
2378  reference6 = ref val6;
2379  if (val6 == null)
2380  {
2381  obj6 = null;
2382  goto IL_00fe;
2383  }
2384  }
2385  obj6 = reference6.ToString();
2386  goto IL_00fe;
2387  }
2388  }
2397  [Serializable]
2398  [StructLayout(LayoutKind.Auto)]
2399  public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7> : IEquatable<(T1, T2, T3, T4, T5, T6, T7)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5, T6, T7)>, IValueTupleInternal, ITuple
2400  {
2403  public T1 Item1;
2404 
2407  public T2 Item2;
2408 
2411  public T3 Item3;
2412 
2415  public T4 Item4;
2416 
2419  public T5 Item5;
2420 
2425  public T6 Item6;
2426 
2429  public T7 Item7;
2430 
2433  int ITuple.Length
2434  {
2435  get
2436  {
2437  return 7;
2438  }
2439  }
2440 
2446  object ITuple.this[int index]
2447  {
2448  get
2449  {
2450  switch (index)
2451  {
2452  case 0:
2453  return Item1;
2454  case 1:
2455  return Item2;
2456  case 2:
2457  return Item3;
2458  case 3:
2459  return Item4;
2460  case 4:
2461  return Item5;
2462  case 5:
2463  return Item6;
2464  case 6:
2465  return Item7;
2466  default:
2467  throw new IndexOutOfRangeException();
2468  }
2469  }
2470  }
2471 
2480  public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
2481  {
2482  Item1 = item1;
2483  Item2 = item2;
2484  Item3 = item3;
2485  Item4 = item4;
2486  Item5 = item5;
2487  Item6 = item6;
2488  Item7 = item7;
2489  }
2490 
2495  public override bool Equals(object obj)
2496  {
2497  if (obj is(T1, T2, T3, T4, T5, T6, T7))
2498  {
2499  return Equals(((T1, T2, T3, T4, T5, T6, T7))obj);
2500  }
2501  return false;
2502  }
2503 
2504  public bool Equals((T1, T2, T3, T4, T5, T6, T7) other)
2505  {
2506  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2) && EqualityComparer<T3>.Default.Equals(Item3, other.Item3) && EqualityComparer<T4>.Default.Equals(Item4, other.Item4) && EqualityComparer<T5>.Default.Equals(Item5, other.Item5) && EqualityComparer<T6>.Default.Equals(Item6, other.Item6))
2507  {
2508  return EqualityComparer<T7>.Default.Equals(Item7, other.Item7);
2509  }
2510  return false;
2511  }
2512 
2518  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
2519  {
2520  if (other == null || !(other is(T1, T2, T3, T4, T5, T6, T7)))
2521  {
2522  return false;
2523  }
2524  (T1, T2, T3, T4, T5, T6, T7) valueTuple = ((T1, T2, T3, T4, T5, T6, T7))other;
2525  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3) && comparer.Equals(Item4, valueTuple.Item4) && comparer.Equals(Item5, valueTuple.Item5) && comparer.Equals(Item6, valueTuple.Item6))
2526  {
2527  return comparer.Equals(Item7, valueTuple.Item7);
2528  }
2529  return false;
2530  }
2531 
2535  int IComparable.CompareTo(object other)
2536  {
2537  if (other == null)
2538  {
2539  return 1;
2540  }
2541  if (!(other is(T1, T2, T3, T4, T5, T6, T7)))
2542  {
2543  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5, T6, T7))this).GetType().ToString()), "other");
2544  }
2545  return CompareTo(((T1, T2, T3, T4, T5, T6, T7))other);
2546  }
2547 
2548  public int CompareTo((T1, T2, T3, T4, T5, T6, T7) other)
2549  {
2550  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
2551  if (num != 0)
2552  {
2553  return num;
2554  }
2555  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
2556  if (num != 0)
2557  {
2558  return num;
2559  }
2560  num = Comparer<T3>.Default.Compare(Item3, other.Item3);
2561  if (num != 0)
2562  {
2563  return num;
2564  }
2565  num = Comparer<T4>.Default.Compare(Item4, other.Item4);
2566  if (num != 0)
2567  {
2568  return num;
2569  }
2570  num = Comparer<T5>.Default.Compare(Item5, other.Item5);
2571  if (num != 0)
2572  {
2573  return num;
2574  }
2575  num = Comparer<T6>.Default.Compare(Item6, other.Item6);
2576  if (num != 0)
2577  {
2578  return num;
2579  }
2580  return Comparer<T7>.Default.Compare(Item7, other.Item7);
2581  }
2582 
2587  int IStructuralComparable.CompareTo(object other, IComparer comparer)
2588  {
2589  if (other == null)
2590  {
2591  return 1;
2592  }
2593  if (!(other is(T1, T2, T3, T4, T5, T6, T7)))
2594  {
2595  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", (((T1, T2, T3, T4, T5, T6, T7))this).GetType().ToString()), "other");
2596  }
2597  (T1, T2, T3, T4, T5, T6, T7) valueTuple = ((T1, T2, T3, T4, T5, T6, T7))other;
2598  int num = comparer.Compare(Item1, valueTuple.Item1);
2599  if (num != 0)
2600  {
2601  return num;
2602  }
2603  num = comparer.Compare(Item2, valueTuple.Item2);
2604  if (num != 0)
2605  {
2606  return num;
2607  }
2608  num = comparer.Compare(Item3, valueTuple.Item3);
2609  if (num != 0)
2610  {
2611  return num;
2612  }
2613  num = comparer.Compare(Item4, valueTuple.Item4);
2614  if (num != 0)
2615  {
2616  return num;
2617  }
2618  num = comparer.Compare(Item5, valueTuple.Item5);
2619  if (num != 0)
2620  {
2621  return num;
2622  }
2623  num = comparer.Compare(Item6, valueTuple.Item6);
2624  if (num != 0)
2625  {
2626  return num;
2627  }
2628  return comparer.Compare(Item7, valueTuple.Item7);
2629  }
2630 
2633  public override int GetHashCode()
2634  {
2635  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7));
2636  }
2637 
2642  {
2643  return GetHashCodeCore(comparer);
2644  }
2645 
2646  private int GetHashCodeCore(IEqualityComparer comparer)
2647  {
2648  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7));
2649  }
2650 
2651  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
2652  {
2653  return GetHashCodeCore(comparer);
2654  }
2655 
2658  public override string ToString()
2659  {
2660  string[] obj = new string[15]
2661  {
2662  "(",
2663  null,
2664  null,
2665  null,
2666  null,
2667  null,
2668  null,
2669  null,
2670  null,
2671  null,
2672  null,
2673  null,
2674  null,
2675  null,
2676  null
2677  };
2678  ref T1 reference = ref Item1;
2679  T1 val = default(T1);
2680  object obj2;
2681  if (val == null)
2682  {
2683  val = reference;
2684  reference = ref val;
2685  if (val == null)
2686  {
2687  obj2 = null;
2688  goto IL_0046;
2689  }
2690  }
2691  obj2 = reference.ToString();
2692  goto IL_0046;
2693  IL_018f:
2694  object obj3;
2695  obj[11] = (string)obj3;
2696  obj[12] = ", ";
2697  ref T7 reference2 = ref Item7;
2698  T7 val2 = default(T7);
2699  object obj4;
2700  if (val2 == null)
2701  {
2702  val2 = reference2;
2703  reference2 = ref val2;
2704  if (val2 == null)
2705  {
2706  obj4 = null;
2707  goto IL_01d4;
2708  }
2709  }
2710  obj4 = reference2.ToString();
2711  goto IL_01d4;
2712  IL_0106:
2713  object obj5;
2714  obj[7] = (string)obj5;
2715  obj[8] = ", ";
2716  ref T5 reference3 = ref Item5;
2717  T5 val3 = default(T5);
2718  object obj6;
2719  if (val3 == null)
2720  {
2721  val3 = reference3;
2722  reference3 = ref val3;
2723  if (val3 == null)
2724  {
2725  obj6 = null;
2726  goto IL_014a;
2727  }
2728  }
2729  obj6 = reference3.ToString();
2730  goto IL_014a;
2731  IL_0086:
2732  object obj7;
2733  obj[3] = (string)obj7;
2734  obj[4] = ", ";
2735  ref T3 reference4 = ref Item3;
2736  T3 val4 = default(T3);
2737  object obj8;
2738  if (val4 == null)
2739  {
2740  val4 = reference4;
2741  reference4 = ref val4;
2742  if (val4 == null)
2743  {
2744  obj8 = null;
2745  goto IL_00c6;
2746  }
2747  }
2748  obj8 = reference4.ToString();
2749  goto IL_00c6;
2750  IL_0046:
2751  obj[1] = (string)obj2;
2752  obj[2] = ", ";
2753  ref T2 reference5 = ref Item2;
2754  T2 val5 = default(T2);
2755  if (val5 == null)
2756  {
2757  val5 = reference5;
2758  reference5 = ref val5;
2759  if (val5 == null)
2760  {
2761  obj7 = null;
2762  goto IL_0086;
2763  }
2764  }
2765  obj7 = reference5.ToString();
2766  goto IL_0086;
2767  IL_00c6:
2768  obj[5] = (string)obj8;
2769  obj[6] = ", ";
2770  ref T4 reference6 = ref Item4;
2771  T4 val6 = default(T4);
2772  if (val6 == null)
2773  {
2774  val6 = reference6;
2775  reference6 = ref val6;
2776  if (val6 == null)
2777  {
2778  obj5 = null;
2779  goto IL_0106;
2780  }
2781  }
2782  obj5 = reference6.ToString();
2783  goto IL_0106;
2784  IL_01d4:
2785  obj[13] = (string)obj4;
2786  obj[14] = ")";
2787  return string.Concat(obj);
2788  IL_014a:
2789  obj[9] = (string)obj6;
2790  obj[10] = ", ";
2791  ref T6 reference7 = ref Item6;
2792  T6 val7 = default(T6);
2793  if (val7 == null)
2794  {
2795  val7 = reference7;
2796  reference7 = ref val7;
2797  if (val7 == null)
2798  {
2799  obj3 = null;
2800  goto IL_018f;
2801  }
2802  }
2803  obj3 = reference7.ToString();
2804  goto IL_018f;
2805  }
2806 
2807  string IValueTupleInternal.ToStringEnd()
2808  {
2809  string[] obj = new string[14];
2810  ref T1 reference = ref Item1;
2811  T1 val = default(T1);
2812  object obj2;
2813  if (val == null)
2814  {
2815  val = reference;
2816  reference = ref val;
2817  if (val == null)
2818  {
2819  obj2 = null;
2820  goto IL_003e;
2821  }
2822  }
2823  obj2 = reference.ToString();
2824  goto IL_003e;
2825  IL_0186:
2826  object obj3;
2827  obj[10] = (string)obj3;
2828  obj[11] = ", ";
2829  ref T7 reference2 = ref Item7;
2830  T7 val2 = default(T7);
2831  object obj4;
2832  if (val2 == null)
2833  {
2834  val2 = reference2;
2835  reference2 = ref val2;
2836  if (val2 == null)
2837  {
2838  obj4 = null;
2839  goto IL_01cb;
2840  }
2841  }
2842  obj4 = reference2.ToString();
2843  goto IL_01cb;
2844  IL_00fe:
2845  object obj5;
2846  obj[6] = (string)obj5;
2847  obj[7] = ", ";
2848  ref T5 reference3 = ref Item5;
2849  T5 val3 = default(T5);
2850  object obj6;
2851  if (val3 == null)
2852  {
2853  val3 = reference3;
2854  reference3 = ref val3;
2855  if (val3 == null)
2856  {
2857  obj6 = null;
2858  goto IL_0141;
2859  }
2860  }
2861  obj6 = reference3.ToString();
2862  goto IL_0141;
2863  IL_007e:
2864  object obj7;
2865  obj[2] = (string)obj7;
2866  obj[3] = ", ";
2867  ref T3 reference4 = ref Item3;
2868  T3 val4 = default(T3);
2869  object obj8;
2870  if (val4 == null)
2871  {
2872  val4 = reference4;
2873  reference4 = ref val4;
2874  if (val4 == null)
2875  {
2876  obj8 = null;
2877  goto IL_00be;
2878  }
2879  }
2880  obj8 = reference4.ToString();
2881  goto IL_00be;
2882  IL_003e:
2883  obj[0] = (string)obj2;
2884  obj[1] = ", ";
2885  ref T2 reference5 = ref Item2;
2886  T2 val5 = default(T2);
2887  if (val5 == null)
2888  {
2889  val5 = reference5;
2890  reference5 = ref val5;
2891  if (val5 == null)
2892  {
2893  obj7 = null;
2894  goto IL_007e;
2895  }
2896  }
2897  obj7 = reference5.ToString();
2898  goto IL_007e;
2899  IL_00be:
2900  obj[4] = (string)obj8;
2901  obj[5] = ", ";
2902  ref T4 reference6 = ref Item4;
2903  T4 val6 = default(T4);
2904  if (val6 == null)
2905  {
2906  val6 = reference6;
2907  reference6 = ref val6;
2908  if (val6 == null)
2909  {
2910  obj5 = null;
2911  goto IL_00fe;
2912  }
2913  }
2914  obj5 = reference6.ToString();
2915  goto IL_00fe;
2916  IL_01cb:
2917  obj[12] = (string)obj4;
2918  obj[13] = ")";
2919  return string.Concat(obj);
2920  IL_0141:
2921  obj[8] = (string)obj6;
2922  obj[9] = ", ";
2923  ref T6 reference7 = ref Item6;
2924  T6 val7 = default(T6);
2925  if (val7 == null)
2926  {
2927  val7 = reference7;
2928  reference7 = ref val7;
2929  if (val7 == null)
2930  {
2931  obj3 = null;
2932  goto IL_0186;
2933  }
2934  }
2935  obj3 = reference7.ToString();
2936  goto IL_0186;
2937  }
2938  }
2948  [Serializable]
2949  [StructLayout(LayoutKind.Auto)]
2950  public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IValueTupleInternal, ITuple where TRest : struct
2951  {
2954  public T1 Item1;
2955 
2958  public T2 Item2;
2959 
2962  public T3 Item3;
2963 
2966  public T4 Item4;
2967 
2970  public T5 Item5;
2971 
2974  public T6 Item6;
2975 
2978  public T7 Item7;
2979 
2982  public TRest Rest;
2983 
2986  int ITuple.Length
2987  {
2988  get
2989  {
2990  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
2991  if (valueTupleInternal != null)
2992  {
2993  return 7 + valueTupleInternal.Length;
2994  }
2995  return 8;
2996  }
2997  }
2998 
3004  object ITuple.this[int index]
3005  {
3006  get
3007  {
3008  switch (index)
3009  {
3010  case 0:
3011  return Item1;
3012  case 1:
3013  return Item2;
3014  case 2:
3015  return Item3;
3016  case 3:
3017  return Item4;
3018  case 4:
3019  return Item5;
3020  case 5:
3021  return Item6;
3022  case 6:
3023  return Item7;
3024  default:
3025  {
3026  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
3027  if (valueTupleInternal == null)
3028  {
3029  if (index == 7)
3030  {
3031  return Rest;
3032  }
3033  throw new IndexOutOfRangeException();
3034  }
3035  return valueTupleInternal[index - 7];
3036  }
3037  }
3038  }
3039  }
3040 
3052  public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
3053  {
3054  if (!(((object)rest) is IValueTupleInternal))
3055  {
3056  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleLastArgumentNotAValueTuple"));
3057  }
3058  Item1 = item1;
3059  Item2 = item2;
3060  Item3 = item3;
3061  Item4 = item4;
3062  Item5 = item5;
3063  Item6 = item6;
3064  Item7 = item7;
3065  Rest = rest;
3066  }
3067 
3072  public override bool Equals(object obj)
3073  {
3075  {
3077  }
3078  return false;
3079  }
3080 
3086  {
3087  if (EqualityComparer<T1>.Default.Equals(Item1, other.Item1) && EqualityComparer<T2>.Default.Equals(Item2, other.Item2) && EqualityComparer<T3>.Default.Equals(Item3, other.Item3) && EqualityComparer<T4>.Default.Equals(Item4, other.Item4) && EqualityComparer<T5>.Default.Equals(Item5, other.Item5) && EqualityComparer<T6>.Default.Equals(Item6, other.Item6) && EqualityComparer<T7>.Default.Equals(Item7, other.Item7))
3088  {
3089  return EqualityComparer<TRest>.Default.Equals(Rest, other.Rest);
3090  }
3091  return false;
3092  }
3093 
3099  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
3100  {
3101  if (other == null || !(other is ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>))
3102  {
3103  return false;
3104  }
3106  if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3) && comparer.Equals(Item4, valueTuple.Item4) && comparer.Equals(Item5, valueTuple.Item5) && comparer.Equals(Item6, valueTuple.Item6) && comparer.Equals(Item7, valueTuple.Item7))
3107  {
3108  return comparer.Equals(Rest, valueTuple.Rest);
3109  }
3110  return false;
3111  }
3112 
3118  int IComparable.CompareTo(object other)
3119  {
3120  if (other == null)
3121  {
3122  return 1;
3123  }
3125  {
3126  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
3127  }
3129  }
3130 
3135  {
3136  int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
3137  if (num != 0)
3138  {
3139  return num;
3140  }
3141  num = Comparer<T2>.Default.Compare(Item2, other.Item2);
3142  if (num != 0)
3143  {
3144  return num;
3145  }
3146  num = Comparer<T3>.Default.Compare(Item3, other.Item3);
3147  if (num != 0)
3148  {
3149  return num;
3150  }
3151  num = Comparer<T4>.Default.Compare(Item4, other.Item4);
3152  if (num != 0)
3153  {
3154  return num;
3155  }
3156  num = Comparer<T5>.Default.Compare(Item5, other.Item5);
3157  if (num != 0)
3158  {
3159  return num;
3160  }
3161  num = Comparer<T6>.Default.Compare(Item6, other.Item6);
3162  if (num != 0)
3163  {
3164  return num;
3165  }
3166  num = Comparer<T7>.Default.Compare(Item7, other.Item7);
3167  if (num != 0)
3168  {
3169  return num;
3170  }
3171  return Comparer<TRest>.Default.Compare(Rest, other.Rest);
3172  }
3173 
3180  int IStructuralComparable.CompareTo(object other, IComparer comparer)
3181  {
3182  if (other == null)
3183  {
3184  return 1;
3185  }
3187  {
3188  throw new ArgumentException(Environment.GetResourceString("ArgumentException_ValueTupleIncorrectType", GetType().ToString()), "other");
3189  }
3191  int num = comparer.Compare(Item1, valueTuple.Item1);
3192  if (num != 0)
3193  {
3194  return num;
3195  }
3196  num = comparer.Compare(Item2, valueTuple.Item2);
3197  if (num != 0)
3198  {
3199  return num;
3200  }
3201  num = comparer.Compare(Item3, valueTuple.Item3);
3202  if (num != 0)
3203  {
3204  return num;
3205  }
3206  num = comparer.Compare(Item4, valueTuple.Item4);
3207  if (num != 0)
3208  {
3209  return num;
3210  }
3211  num = comparer.Compare(Item5, valueTuple.Item5);
3212  if (num != 0)
3213  {
3214  return num;
3215  }
3216  num = comparer.Compare(Item6, valueTuple.Item6);
3217  if (num != 0)
3218  {
3219  return num;
3220  }
3221  num = comparer.Compare(Item7, valueTuple.Item7);
3222  if (num != 0)
3223  {
3224  return num;
3225  }
3226  return comparer.Compare(Rest, valueTuple.Rest);
3227  }
3228 
3231  public override int GetHashCode()
3232  {
3233  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
3234  if (valueTupleInternal == null)
3235  {
3236  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7));
3237  }
3238  int length = valueTupleInternal.Length;
3239  if (length >= 8)
3240  {
3241  return valueTupleInternal.GetHashCode();
3242  }
3243  switch (8 - length)
3244  {
3245  case 1:
3246  return ValueTuple.CombineHashCodes(EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3247  case 2:
3248  return ValueTuple.CombineHashCodes(EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3249  case 3:
3250  return ValueTuple.CombineHashCodes(EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3251  case 4:
3252  return ValueTuple.CombineHashCodes(EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3253  case 5:
3254  return ValueTuple.CombineHashCodes(EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3255  case 6:
3256  return ValueTuple.CombineHashCodes(EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3257  case 7:
3258  case 8:
3259  return ValueTuple.CombineHashCodes(EqualityComparer<T1>.Default.GetHashCode(Item1), EqualityComparer<T2>.Default.GetHashCode(Item2), EqualityComparer<T3>.Default.GetHashCode(Item3), EqualityComparer<T4>.Default.GetHashCode(Item4), EqualityComparer<T5>.Default.GetHashCode(Item5), EqualityComparer<T6>.Default.GetHashCode(Item6), EqualityComparer<T7>.Default.GetHashCode(Item7), valueTupleInternal.GetHashCode());
3260  default:
3261  return -1;
3262  }
3263  }
3264 
3269  {
3270  return GetHashCodeCore(comparer);
3271  }
3272 
3273  private int GetHashCodeCore(IEqualityComparer comparer)
3274  {
3275  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
3276  if (valueTupleInternal == null)
3277  {
3278  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7));
3279  }
3280  int length = valueTupleInternal.Length;
3281  if (length >= 8)
3282  {
3283  return valueTupleInternal.GetHashCode(comparer);
3284  }
3285  switch (8 - length)
3286  {
3287  case 1:
3288  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3289  case 2:
3290  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3291  case 3:
3292  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3293  case 4:
3294  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3295  case 5:
3296  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3297  case 6:
3298  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3299  case 7:
3300  case 8:
3301  return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), valueTupleInternal.GetHashCode(comparer));
3302  default:
3303  return -1;
3304  }
3305  }
3306 
3307  int IValueTupleInternal.GetHashCode(IEqualityComparer comparer)
3308  {
3309  return GetHashCodeCore(comparer);
3310  }
3311 
3314  public override string ToString()
3315  {
3316  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
3317  string[] obj;
3318  T1 val;
3319  object obj2;
3320  if (valueTupleInternal == null)
3321  {
3322  obj = new string[17]
3323  {
3324  "(",
3325  null,
3326  null,
3327  null,
3328  null,
3329  null,
3330  null,
3331  null,
3332  null,
3333  null,
3334  null,
3335  null,
3336  null,
3337  null,
3338  null,
3339  null,
3340  null
3341  };
3342  ref T1 reference = ref Item1;
3343  val = default(T1);
3344  if (val == null)
3345  {
3346  val = reference;
3347  reference = ref val;
3348  if (val == null)
3349  {
3350  obj2 = null;
3351  goto IL_005d;
3352  }
3353  }
3354  obj2 = reference.ToString();
3355  goto IL_005d;
3356  }
3357  string[] obj3 = new string[16]
3358  {
3359  "(",
3360  null,
3361  null,
3362  null,
3363  null,
3364  null,
3365  null,
3366  null,
3367  null,
3368  null,
3369  null,
3370  null,
3371  null,
3372  null,
3373  null,
3374  null
3375  };
3376  ref T1 reference2 = ref Item1;
3377  val = default(T1);
3378  object obj4;
3379  if (val == null)
3380  {
3381  val = reference2;
3382  reference2 = ref val;
3383  if (val == null)
3384  {
3385  obj4 = null;
3386  goto IL_0262;
3387  }
3388  }
3389  obj4 = reference2.ToString();
3390  goto IL_0262;
3391  IL_02e2:
3392  object obj5;
3393  obj3[5] = (string)obj5;
3394  obj3[6] = ", ";
3395  ref T4 reference3 = ref Item4;
3396  T4 val2 = default(T4);
3397  object obj6;
3398  if (val2 == null)
3399  {
3400  val2 = reference3;
3401  reference3 = ref val2;
3402  if (val2 == null)
3403  {
3404  obj6 = null;
3405  goto IL_0325;
3406  }
3407  }
3408  obj6 = reference3.ToString();
3409  goto IL_0325;
3410  IL_03f3:
3411  object obj7;
3412  obj3[13] = (string)obj7;
3413  obj3[14] = ", ";
3414  obj3[15] = valueTupleInternal.ToStringEnd();
3415  return string.Concat(obj3);
3416  IL_03ae:
3417  object obj8;
3418  obj3[11] = (string)obj8;
3419  obj3[12] = ", ";
3420  ref T7 reference4 = ref Item7;
3421  T7 val3 = default(T7);
3422  if (val3 == null)
3423  {
3424  val3 = reference4;
3425  reference4 = ref val3;
3426  if (val3 == null)
3427  {
3428  obj7 = null;
3429  goto IL_03f3;
3430  }
3431  }
3432  obj7 = reference4.ToString();
3433  goto IL_03f3;
3434  IL_0120:
3435  object obj9;
3436  obj[7] = (string)obj9;
3437  obj[8] = ", ";
3438  ref T5 reference5 = ref Item5;
3439  T5 val4 = default(T5);
3440  object obj10;
3441  if (val4 == null)
3442  {
3443  val4 = reference5;
3444  reference5 = ref val4;
3445  if (val4 == null)
3446  {
3447  obj10 = null;
3448  goto IL_0164;
3449  }
3450  }
3451  obj10 = reference5.ToString();
3452  goto IL_0164;
3453  IL_005d:
3454  obj[1] = (string)obj2;
3455  obj[2] = ", ";
3456  ref T2 reference6 = ref Item2;
3457  T2 val5 = default(T2);
3458  object obj11;
3459  if (val5 == null)
3460  {
3461  val5 = reference6;
3462  reference6 = ref val5;
3463  if (val5 == null)
3464  {
3465  obj11 = null;
3466  goto IL_009d;
3467  }
3468  }
3469  obj11 = reference6.ToString();
3470  goto IL_009d;
3471  IL_0164:
3472  obj[9] = (string)obj10;
3473  obj[10] = ", ";
3474  ref T6 reference7 = ref Item6;
3475  T6 val6 = default(T6);
3476  object obj12;
3477  if (val6 == null)
3478  {
3479  val6 = reference7;
3480  reference7 = ref val6;
3481  if (val6 == null)
3482  {
3483  obj12 = null;
3484  goto IL_01a9;
3485  }
3486  }
3487  obj12 = reference7.ToString();
3488  goto IL_01a9;
3489  IL_02a2:
3490  object obj13;
3491  obj3[3] = (string)obj13;
3492  obj3[4] = ", ";
3493  ref T3 reference8 = ref Item3;
3494  T3 val7 = default(T3);
3495  if (val7 == null)
3496  {
3497  val7 = reference8;
3498  reference8 = ref val7;
3499  if (val7 == null)
3500  {
3501  obj5 = null;
3502  goto IL_02e2;
3503  }
3504  }
3505  obj5 = reference8.ToString();
3506  goto IL_02e2;
3507  IL_01ee:
3508  object obj14;
3509  obj[13] = (string)obj14;
3510  obj[14] = ", ";
3511  obj[15] = Rest.ToString();
3512  obj[16] = ")";
3513  return string.Concat(obj);
3514  IL_009d:
3515  obj[3] = (string)obj11;
3516  obj[4] = ", ";
3517  ref T3 reference9 = ref Item3;
3518  val7 = default(T3);
3519  object obj15;
3520  if (val7 == null)
3521  {
3522  val7 = reference9;
3523  reference9 = ref val7;
3524  if (val7 == null)
3525  {
3526  obj15 = null;
3527  goto IL_00dd;
3528  }
3529  }
3530  obj15 = reference9.ToString();
3531  goto IL_00dd;
3532  IL_0325:
3533  obj3[7] = (string)obj6;
3534  obj3[8] = ", ";
3535  ref T5 reference10 = ref Item5;
3536  val4 = default(T5);
3537  object obj16;
3538  if (val4 == null)
3539  {
3540  val4 = reference10;
3541  reference10 = ref val4;
3542  if (val4 == null)
3543  {
3544  obj16 = null;
3545  goto IL_0369;
3546  }
3547  }
3548  obj16 = reference10.ToString();
3549  goto IL_0369;
3550  IL_01a9:
3551  obj[11] = (string)obj12;
3552  obj[12] = ", ";
3553  ref T7 reference11 = ref Item7;
3554  val3 = default(T7);
3555  if (val3 == null)
3556  {
3557  val3 = reference11;
3558  reference11 = ref val3;
3559  if (val3 == null)
3560  {
3561  obj14 = null;
3562  goto IL_01ee;
3563  }
3564  }
3565  obj14 = reference11.ToString();
3566  goto IL_01ee;
3567  IL_0262:
3568  obj3[1] = (string)obj4;
3569  obj3[2] = ", ";
3570  ref T2 reference12 = ref Item2;
3571  val5 = default(T2);
3572  if (val5 == null)
3573  {
3574  val5 = reference12;
3575  reference12 = ref val5;
3576  if (val5 == null)
3577  {
3578  obj13 = null;
3579  goto IL_02a2;
3580  }
3581  }
3582  obj13 = reference12.ToString();
3583  goto IL_02a2;
3584  IL_00dd:
3585  obj[5] = (string)obj15;
3586  obj[6] = ", ";
3587  ref T4 reference13 = ref Item4;
3588  val2 = default(T4);
3589  if (val2 == null)
3590  {
3591  val2 = reference13;
3592  reference13 = ref val2;
3593  if (val2 == null)
3594  {
3595  obj9 = null;
3596  goto IL_0120;
3597  }
3598  }
3599  obj9 = reference13.ToString();
3600  goto IL_0120;
3601  IL_0369:
3602  obj3[9] = (string)obj16;
3603  obj3[10] = ", ";
3604  ref T6 reference14 = ref Item6;
3605  val6 = default(T6);
3606  if (val6 == null)
3607  {
3608  val6 = reference14;
3609  reference14 = ref val6;
3610  if (val6 == null)
3611  {
3612  obj8 = null;
3613  goto IL_03ae;
3614  }
3615  }
3616  obj8 = reference14.ToString();
3617  goto IL_03ae;
3618  }
3619 
3620  string IValueTupleInternal.ToStringEnd()
3621  {
3622  IValueTupleInternal valueTupleInternal = Rest as IValueTupleInternal;
3623  string[] obj;
3624  T1 val;
3625  object obj2;
3626  if (valueTupleInternal == null)
3627  {
3628  obj = new string[16];
3629  ref T1 reference = ref Item1;
3630  val = default(T1);
3631  if (val == null)
3632  {
3633  val = reference;
3634  reference = ref val;
3635  if (val == null)
3636  {
3637  obj2 = null;
3638  goto IL_0055;
3639  }
3640  }
3641  obj2 = reference.ToString();
3642  goto IL_0055;
3643  }
3644  string[] obj3 = new string[15];
3645  ref T1 reference2 = ref Item1;
3646  val = default(T1);
3647  object obj4;
3648  if (val == null)
3649  {
3650  val = reference2;
3651  reference2 = ref val;
3652  if (val == null)
3653  {
3654  obj4 = null;
3655  goto IL_0251;
3656  }
3657  }
3658  obj4 = reference2.ToString();
3659  goto IL_0251;
3660  IL_02d1:
3661  object obj5;
3662  obj3[4] = (string)obj5;
3663  obj3[5] = ", ";
3664  ref T4 reference3 = ref Item4;
3665  T4 val2 = default(T4);
3666  object obj6;
3667  if (val2 == null)
3668  {
3669  val2 = reference3;
3670  reference3 = ref val2;
3671  if (val2 == null)
3672  {
3673  obj6 = null;
3674  goto IL_0314;
3675  }
3676  }
3677  obj6 = reference3.ToString();
3678  goto IL_0314;
3679  IL_03e1:
3680  object obj7;
3681  obj3[12] = (string)obj7;
3682  obj3[13] = ", ";
3683  obj3[14] = valueTupleInternal.ToStringEnd();
3684  return string.Concat(obj3);
3685  IL_039c:
3686  object obj8;
3687  obj3[10] = (string)obj8;
3688  obj3[11] = ", ";
3689  ref T7 reference4 = ref Item7;
3690  T7 val3 = default(T7);
3691  if (val3 == null)
3692  {
3693  val3 = reference4;
3694  reference4 = ref val3;
3695  if (val3 == null)
3696  {
3697  obj7 = null;
3698  goto IL_03e1;
3699  }
3700  }
3701  obj7 = reference4.ToString();
3702  goto IL_03e1;
3703  IL_0118:
3704  object obj9;
3705  obj[6] = (string)obj9;
3706  obj[7] = ", ";
3707  ref T5 reference5 = ref Item5;
3708  T5 val4 = default(T5);
3709  object obj10;
3710  if (val4 == null)
3711  {
3712  val4 = reference5;
3713  reference5 = ref val4;
3714  if (val4 == null)
3715  {
3716  obj10 = null;
3717  goto IL_015b;
3718  }
3719  }
3720  obj10 = reference5.ToString();
3721  goto IL_015b;
3722  IL_0055:
3723  obj[0] = (string)obj2;
3724  obj[1] = ", ";
3725  ref T2 reference6 = ref Item2;
3726  T2 val5 = default(T2);
3727  object obj11;
3728  if (val5 == null)
3729  {
3730  val5 = reference6;
3731  reference6 = ref val5;
3732  if (val5 == null)
3733  {
3734  obj11 = null;
3735  goto IL_0095;
3736  }
3737  }
3738  obj11 = reference6.ToString();
3739  goto IL_0095;
3740  IL_015b:
3741  obj[8] = (string)obj10;
3742  obj[9] = ", ";
3743  ref T6 reference7 = ref Item6;
3744  T6 val6 = default(T6);
3745  object obj12;
3746  if (val6 == null)
3747  {
3748  val6 = reference7;
3749  reference7 = ref val6;
3750  if (val6 == null)
3751  {
3752  obj12 = null;
3753  goto IL_01a0;
3754  }
3755  }
3756  obj12 = reference7.ToString();
3757  goto IL_01a0;
3758  IL_0291:
3759  object obj13;
3760  obj3[2] = (string)obj13;
3761  obj3[3] = ", ";
3762  ref T3 reference8 = ref Item3;
3763  T3 val7 = default(T3);
3764  if (val7 == null)
3765  {
3766  val7 = reference8;
3767  reference8 = ref val7;
3768  if (val7 == null)
3769  {
3770  obj5 = null;
3771  goto IL_02d1;
3772  }
3773  }
3774  obj5 = reference8.ToString();
3775  goto IL_02d1;
3776  IL_01e5:
3777  object obj14;
3778  obj[12] = (string)obj14;
3779  obj[13] = ", ";
3780  obj[14] = Rest.ToString();
3781  obj[15] = ")";
3782  return string.Concat(obj);
3783  IL_0095:
3784  obj[2] = (string)obj11;
3785  obj[3] = ", ";
3786  ref T3 reference9 = ref Item3;
3787  val7 = default(T3);
3788  object obj15;
3789  if (val7 == null)
3790  {
3791  val7 = reference9;
3792  reference9 = ref val7;
3793  if (val7 == null)
3794  {
3795  obj15 = null;
3796  goto IL_00d5;
3797  }
3798  }
3799  obj15 = reference9.ToString();
3800  goto IL_00d5;
3801  IL_0314:
3802  obj3[6] = (string)obj6;
3803  obj3[7] = ", ";
3804  ref T5 reference10 = ref Item5;
3805  val4 = default(T5);
3806  object obj16;
3807  if (val4 == null)
3808  {
3809  val4 = reference10;
3810  reference10 = ref val4;
3811  if (val4 == null)
3812  {
3813  obj16 = null;
3814  goto IL_0357;
3815  }
3816  }
3817  obj16 = reference10.ToString();
3818  goto IL_0357;
3819  IL_01a0:
3820  obj[10] = (string)obj12;
3821  obj[11] = ", ";
3822  ref T7 reference11 = ref Item7;
3823  val3 = default(T7);
3824  if (val3 == null)
3825  {
3826  val3 = reference11;
3827  reference11 = ref val3;
3828  if (val3 == null)
3829  {
3830  obj14 = null;
3831  goto IL_01e5;
3832  }
3833  }
3834  obj14 = reference11.ToString();
3835  goto IL_01e5;
3836  IL_0251:
3837  obj3[0] = (string)obj4;
3838  obj3[1] = ", ";
3839  ref T2 reference12 = ref Item2;
3840  val5 = default(T2);
3841  if (val5 == null)
3842  {
3843  val5 = reference12;
3844  reference12 = ref val5;
3845  if (val5 == null)
3846  {
3847  obj13 = null;
3848  goto IL_0291;
3849  }
3850  }
3851  obj13 = reference12.ToString();
3852  goto IL_0291;
3853  IL_00d5:
3854  obj[4] = (string)obj15;
3855  obj[5] = ", ";
3856  ref T4 reference13 = ref Item4;
3857  val2 = default(T4);
3858  if (val2 == null)
3859  {
3860  val2 = reference13;
3861  reference13 = ref val2;
3862  if (val2 == null)
3863  {
3864  obj9 = null;
3865  goto IL_0118;
3866  }
3867  }
3868  obj9 = reference13.ToString();
3869  goto IL_0118;
3870  IL_0357:
3871  obj3[8] = (string)obj16;
3872  obj3[9] = ", ";
3873  ref T6 reference14 = ref Item6;
3874  val6 = default(T6);
3875  if (val6 == null)
3876  {
3877  val6 = reference14;
3878  reference14 = ref val6;
3879  if (val6 == null)
3880  {
3881  obj8 = null;
3882  goto IL_039c;
3883  }
3884  }
3885  obj8 = reference14.ToString();
3886  goto IL_039c;
3887  }
3888  }
3889 }
bool Equals(object other, IEqualityComparer comparer)
Determines whether an object is structurally equal to the current instance.
Compares two objects for equivalence, where string comparisons are case-sensitive.
Definition: Comparer.cs:11
Provides a base class for implementations of the T:System.Collections.Generic.IEqualityComparer`1 gen...
int CompareTo(ValueTuple< T1, T2, T3, T4, T5, T6, T7, TRest > other)
Compares the current T:System.ValueTuple`8 instance to a specified T:System.ValueTuple`8 instance
Definition: ValueTuple.cs:3134
ValueTuple(T1 item1, T2 item2)
Initializes a new T:System.ValueTuple`2 instance.
Definition: ValueTuple.cs:558
ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
Initializes a new T:System.ValueTuple`6 instance.
Definition: ValueTuple.cs:1979
ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
Initializes a new T:System.ValueTuple`5 instance.
Definition: ValueTuple.cs:1537
int IComparable. CompareTo(object other)
Compares this T:System.ValueTuple instance with a specified object and returns an indication of their...
Definition: ValueTuple.cs:68
bool Equals(ValueTuple other)
Determines whether two T:System.ValueTuple instances are equal. This method always returns true.
Definition: ValueTuple.cs:48
int Compare(object a, object b)
Performs a case-sensitive comparison of two objects of the same type and returns a value indicating w...
Definition: Comparer.cs:64
LayoutKind
Controls the layout of an object when exported to unmanaged code.
Definition: LayoutKind.cs:7
Definition: __Canon.cs:3
Provides static methods for creating value tuples.
Definition: ValueTuple.cs:12
static EqualityComparer< T > Default
Returns a default equality comparer for the type specified by the generic argument.
Defines a generalized type-specific comparison method that a value type or class implements to order ...
Definition: IComparable.cs:8
ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
Initializes a new M:System.ValueTuple`7.::ctor(`0,`1,`2,`3,`4,`5,`6) instance.
Definition: ValueTuple.cs:2480
int GetHashCode(IEqualityComparer comparer)
Returns a hash code for the current instance.
int Length
Gets the number of elements in this Tuple instance.
Definition: ITuple.cs:9
T6 Item6
Gets the value of the current T:System.ValueTuple`6 instance's sixth element.
Definition: ValueTuple.cs:1931
int Compare(object x, object y)
Compares two objects and returns a value indicating whether one is less than, equal to,...
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
new bool Equals(object x, object y)
Determines whether the specified objects are equal.
ValueTuple(T1 item1, T2 item2, T3 item3)
Initializes a new T:System.ValueTuple`3 instance.
Definition: ValueTuple.cs:824
The exception that is thrown when an attempt is made to access an element of an array or collection w...
Defines methods to support the comparison of objects for equality.
TRest Rest
Gets the current T:System.ValueTuple`8 instance's remaining elements.
Definition: ValueTuple.cs:2982
static readonly Comparer Default
Represents an instance of T:System.Collections.Comparer that is associated with the P:System....
Definition: Comparer.cs:16
bool Equals(ValueTuple< T1, T2, T3, T4, T5, T6, T7, TRest > other)
Returns a value that indicates whether the current T:System.ValueTuple`8 instance is equal to a speci...
Definition: ValueTuple.cs:3085
Exposes a method that compares two objects.
Definition: IComparer.cs:8
T5 Item5
Gets the value of the current T:System.ValueTuple`5 instance's fifth element.
Definition: ValueTuple.cs:1492
ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
Initializes a new T:System.ValueTuple`8 instance.
Definition: ValueTuple.cs:3052
ValueTuple(T1 item1)
Initializes a new T:System.ValueTuple`1 instance.
Definition: ValueTuple.cs:352
bool Equals(ValueTuple< T1 > other)
Returns a value that indicates whether the current T:System.ValueTuple`1 instance is equal to a speci...
Definition: ValueTuple.cs:374
T7 Item7
Gets the value of the current T:System.ValueTuple`7 instance's seventh element.
Definition: ValueTuple.cs:2429
static ValueTuple Create()
Creates a new value tuple with zero components.
Definition: ValueTuple.cs:144
T3 Item3
Gets the value of the current T:System.ValueTuple`3 instance's third element.
Definition: ValueTuple.cs:785
int GetHashCode(object obj)
Returns a hash code for the specified object.
The exception that is thrown when one of the arguments provided to a method is not valid.
int CompareTo(ValueTuple< T1 > other)
Compares the current T:System.ValueTuple`1 instance to a specified T:System.ValueTuple`1 instance.
Definition: ValueTuple.cs:422
override bool Equals(object obj)
Returns a value that indicates whether the current T:System.ValueTuple instance is equal to a specifi...
Definition: ValueTuple.cs:40
override string ToString()
Returns the string representation of this T:System.ValueTuple instance.
Definition: ValueTuple.cs:132
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: IEquatable.cs:6
static T1
Creates a new value tuple with 2 components (a pair).
Definition: ValueTuple.cs:166
int CompareTo(object other, IComparer comparer)
Determines whether the current collection object precedes, occurs in the same position as,...
Specifies that the class can be serialized.
ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4)
Initializes a new T:System.ValueTuple`4 instance.
Definition: ValueTuple.cs:1152
T1 Item1
Gets the value of the current T:System.ValueTuple`1 instance's first element.
Definition: ValueTuple.cs:321
override int GetHashCode()
Returns the hash code for the current T:System.ValueTuple instance.
Definition: ValueTuple.cs:112
int CompareTo(ValueTuple other)
Compares the current T:System.ValueTuple instance with a specified object.
Definition: ValueTuple.cs:86
T2 Item2
Gets the value of the current T:System.ValueTuple`2 instance's second element.
Definition: ValueTuple.cs:522
T4 Item4
Gets the value of the current T:System.ValueTuple`4 instance's fourth element.
Definition: ValueTuple.cs:1110
The default setting for this enumeration, which is currently F:System.GCCollectionMode....
Defines methods to support the comparison of objects for structural equality.
Supports the structural comparison of collection objects.
Defines a general-purpose Tuple implementation that allows acccess to Tuple instance members without ...
Definition: ITuple.cs:4