mscorlib(4.0.0.0) API with additions
Tuple.cs
1 using System.Collections;
4 using System.Text;
5 
6 namespace System
7 {
9  [__DynamicallyInvokable]
10  public static class Tuple
11  {
16  [__DynamicallyInvokable]
17  public static Tuple<T1> Create<T1>(T1 item1)
18  {
19  return new Tuple<T1>(item1);
20  }
21 
28  [__DynamicallyInvokable]
29  public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2)
30  {
31  return new Tuple<T1, T2>(item1, item2);
32  }
33 
42  [__DynamicallyInvokable]
43  public static Tuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)
44  {
45  return new Tuple<T1, T2, T3>(item1, item2, item3);
46  }
47 
58  [__DynamicallyInvokable]
59  public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)
60  {
61  return new Tuple<T1, T2, T3, T4>(item1, item2, item3, item4);
62  }
63 
76  [__DynamicallyInvokable]
77  public static Tuple<T1, T2, T3, T4, T5> Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
78  {
79  return new Tuple<T1, T2, T3, T4, T5>(item1, item2, item3, item4, item5);
80  }
81 
96  [__DynamicallyInvokable]
97  public static Tuple<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)
98  {
99  return new Tuple<T1, T2, T3, T4, T5, T6>(item1, item2, item3, item4, item5, item6);
100  }
101 
118  [__DynamicallyInvokable]
119  public static Tuple<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)
120  {
121  return new Tuple<T1, T2, T3, T4, T5, T6, T7>(item1, item2, item3, item4, item5, item6, item7);
122  }
123 
142  [__DynamicallyInvokable]
143  public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<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)
144  {
145  return new Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8>>(item1, item2, item3, item4, item5, item6, item7, new Tuple<T8>(item8));
146  }
147 
148  internal static int CombineHashCodes(int h1, int h2)
149  {
150  return ((h1 << 5) + h1) ^ h2;
151  }
152 
153  internal static int CombineHashCodes(int h1, int h2, int h3)
154  {
155  return CombineHashCodes(CombineHashCodes(h1, h2), h3);
156  }
157 
158  internal static int CombineHashCodes(int h1, int h2, int h3, int h4)
159  {
160  return CombineHashCodes(CombineHashCodes(h1, h2), CombineHashCodes(h3, h4));
161  }
162 
163  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5)
164  {
165  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4), h5);
166  }
167 
168  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6)
169  {
170  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4), CombineHashCodes(h5, h6));
171  }
172 
173  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7)
174  {
175  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4), CombineHashCodes(h5, h6, h7));
176  }
177 
178  internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7, int h8)
179  {
180  return CombineHashCodes(CombineHashCodes(h1, h2, h3, h4), CombineHashCodes(h5, h6, h7, h8));
181  }
182  }
185  [Serializable]
186  [__DynamicallyInvokable]
187  public class Tuple<T1> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
188  {
189  private readonly T1 m_Item1;
190 
193  [__DynamicallyInvokable]
194  public T1 Item1
195  {
196  [__DynamicallyInvokable]
197  get
198  {
199  return m_Item1;
200  }
201  }
202 
205  int ITuple.Length
206  {
207  get
208  {
209  return 1;
210  }
211  }
212 
218  object ITuple.this[int index]
219  {
220  get
221  {
222  if (index != 0)
223  {
224  throw new IndexOutOfRangeException();
225  }
226  return Item1;
227  }
228  }
229 
232  [__DynamicallyInvokable]
233  public Tuple(T1 item1)
234  {
235  m_Item1 = item1;
236  }
237 
242  [__DynamicallyInvokable]
243  public override bool Equals(object obj)
244  {
246  }
247 
253  [__DynamicallyInvokable]
254  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
255  {
256  if (other == null)
257  {
258  return false;
259  }
260  Tuple<T1> tuple = other as Tuple<T1>;
261  if (tuple == null)
262  {
263  return false;
264  }
265  return comparer.Equals(m_Item1, tuple.m_Item1);
266  }
267 
273  [__DynamicallyInvokable]
274  int IComparable.CompareTo(object obj)
275  {
276  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
277  }
278 
285  [__DynamicallyInvokable]
286  int IStructuralComparable.CompareTo(object other, IComparer comparer)
287  {
288  if (other == null)
289  {
290  return 1;
291  }
292  Tuple<T1> tuple = other as Tuple<T1>;
293  if (tuple == null)
294  {
295  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
296  }
297  return comparer.Compare(m_Item1, tuple.m_Item1);
298  }
299 
302  [__DynamicallyInvokable]
303  public override int GetHashCode()
304  {
306  }
307 
311  [__DynamicallyInvokable]
313  {
314  return comparer.GetHashCode(m_Item1);
315  }
316 
317  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
318  {
319  return ((IStructuralEquatable)this).GetHashCode(comparer);
320  }
321 
324  [__DynamicallyInvokable]
325  public override string ToString()
326  {
327  StringBuilder stringBuilder = new StringBuilder();
328  stringBuilder.Append("(");
329  return ((ITupleInternal)this).ToString(stringBuilder);
330  }
331 
332  string ITupleInternal.ToString(StringBuilder sb)
333  {
334  sb.Append(m_Item1);
335  sb.Append(")");
336  return sb.ToString();
337  }
338  }
342  [Serializable]
343  [__DynamicallyInvokable]
344  public class Tuple<T1, T2> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
345  {
346  private readonly T1 m_Item1;
347 
348  private readonly T2 m_Item2;
349 
352  [__DynamicallyInvokable]
353  public T1 Item1
354  {
355  [__DynamicallyInvokable]
356  get
357  {
358  return m_Item1;
359  }
360  }
361 
364  [__DynamicallyInvokable]
365  public T2 Item2
366  {
367  [__DynamicallyInvokable]
368  get
369  {
370  return m_Item2;
371  }
372  }
373 
376  int ITuple.Length
377  {
378  get
379  {
380  return 2;
381  }
382  }
383 
389  object ITuple.this[int index]
390  {
391  get
392  {
393  switch (index)
394  {
395  case 0:
396  return Item1;
397  case 1:
398  return Item2;
399  default:
400  throw new IndexOutOfRangeException();
401  }
402  }
403  }
404 
408  [__DynamicallyInvokable]
409  public Tuple(T1 item1, T2 item2)
410  {
411  m_Item1 = item1;
412  m_Item2 = item2;
413  }
414 
419  [__DynamicallyInvokable]
420  public override bool Equals(object obj)
421  {
423  }
424 
430  [__DynamicallyInvokable]
431  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
432  {
433  if (other == null)
434  {
435  return false;
436  }
437  Tuple<T1, T2> tuple = other as Tuple<T1, T2>;
438  if (tuple == null)
439  {
440  return false;
441  }
442  if (comparer.Equals(m_Item1, tuple.m_Item1))
443  {
444  return comparer.Equals(m_Item2, tuple.m_Item2);
445  }
446  return false;
447  }
448 
454  [__DynamicallyInvokable]
455  int IComparable.CompareTo(object obj)
456  {
457  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
458  }
459 
466  [__DynamicallyInvokable]
467  int IStructuralComparable.CompareTo(object other, IComparer comparer)
468  {
469  if (other == null)
470  {
471  return 1;
472  }
473  Tuple<T1, T2> tuple = other as Tuple<T1, T2>;
474  if (tuple == null)
475  {
476  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
477  }
478  int num = 0;
479  num = comparer.Compare(m_Item1, tuple.m_Item1);
480  if (num != 0)
481  {
482  return num;
483  }
484  return comparer.Compare(m_Item2, tuple.m_Item2);
485  }
486 
489  [__DynamicallyInvokable]
490  public override int GetHashCode()
491  {
493  }
494 
498  [__DynamicallyInvokable]
500  {
501  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2));
502  }
503 
504  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
505  {
506  return ((IStructuralEquatable)this).GetHashCode(comparer);
507  }
508 
511  [__DynamicallyInvokable]
512  public override string ToString()
513  {
514  StringBuilder stringBuilder = new StringBuilder();
515  stringBuilder.Append("(");
516  return ((ITupleInternal)this).ToString(stringBuilder);
517  }
518 
519  string ITupleInternal.ToString(StringBuilder sb)
520  {
521  sb.Append(m_Item1);
522  sb.Append(", ");
523  sb.Append(m_Item2);
524  sb.Append(")");
525  return sb.ToString();
526  }
527  }
532  [Serializable]
533  [__DynamicallyInvokable]
534  public class Tuple<T1, T2, T3> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
535  {
536  private readonly T1 m_Item1;
537 
538  private readonly T2 m_Item2;
539 
540  private readonly T3 m_Item3;
541 
544  [__DynamicallyInvokable]
545  public T1 Item1
546  {
547  [__DynamicallyInvokable]
548  get
549  {
550  return m_Item1;
551  }
552  }
553 
556  [__DynamicallyInvokable]
557  public T2 Item2
558  {
559  [__DynamicallyInvokable]
560  get
561  {
562  return m_Item2;
563  }
564  }
565 
568  [__DynamicallyInvokable]
569  public T3 Item3
570  {
571  [__DynamicallyInvokable]
572  get
573  {
574  return m_Item3;
575  }
576  }
577 
580  int ITuple.Length
581  {
582  get
583  {
584  return 3;
585  }
586  }
587 
593  object ITuple.this[int index]
594  {
595  get
596  {
597  switch (index)
598  {
599  case 0:
600  return Item1;
601  case 1:
602  return Item2;
603  case 2:
604  return Item3;
605  default:
606  throw new IndexOutOfRangeException();
607  }
608  }
609  }
610 
615  [__DynamicallyInvokable]
616  public Tuple(T1 item1, T2 item2, T3 item3)
617  {
618  m_Item1 = item1;
619  m_Item2 = item2;
620  m_Item3 = item3;
621  }
622 
627  [__DynamicallyInvokable]
628  public override bool Equals(object obj)
629  {
631  }
632 
638  [__DynamicallyInvokable]
639  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
640  {
641  if (other == null)
642  {
643  return false;
644  }
645  Tuple<T1, T2, T3> tuple = other as Tuple<T1, T2, T3>;
646  if (tuple == null)
647  {
648  return false;
649  }
650  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2))
651  {
652  return comparer.Equals(m_Item3, tuple.m_Item3);
653  }
654  return false;
655  }
656 
662  [__DynamicallyInvokable]
663  int IComparable.CompareTo(object obj)
664  {
665  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
666  }
667 
674  [__DynamicallyInvokable]
675  int IStructuralComparable.CompareTo(object other, IComparer comparer)
676  {
677  if (other == null)
678  {
679  return 1;
680  }
681  Tuple<T1, T2, T3> tuple = other as Tuple<T1, T2, T3>;
682  if (tuple == null)
683  {
684  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
685  }
686  int num = 0;
687  num = comparer.Compare(m_Item1, tuple.m_Item1);
688  if (num != 0)
689  {
690  return num;
691  }
692  num = comparer.Compare(m_Item2, tuple.m_Item2);
693  if (num != 0)
694  {
695  return num;
696  }
697  return comparer.Compare(m_Item3, tuple.m_Item3);
698  }
699 
702  [__DynamicallyInvokable]
703  public override int GetHashCode()
704  {
706  }
707 
711  [__DynamicallyInvokable]
713  {
714  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3));
715  }
716 
717  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
718  {
719  return ((IStructuralEquatable)this).GetHashCode(comparer);
720  }
721 
724  [__DynamicallyInvokable]
725  public override string ToString()
726  {
727  StringBuilder stringBuilder = new StringBuilder();
728  stringBuilder.Append("(");
729  return ((ITupleInternal)this).ToString(stringBuilder);
730  }
731 
732  string ITupleInternal.ToString(StringBuilder sb)
733  {
734  sb.Append(m_Item1);
735  sb.Append(", ");
736  sb.Append(m_Item2);
737  sb.Append(", ");
738  sb.Append(m_Item3);
739  sb.Append(")");
740  return sb.ToString();
741  }
742  }
748  [Serializable]
749  [__DynamicallyInvokable]
750  public class Tuple<T1, T2, T3, T4> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
751  {
752  private readonly T1 m_Item1;
753 
754  private readonly T2 m_Item2;
755 
756  private readonly T3 m_Item3;
757 
758  private readonly T4 m_Item4;
759 
762  [__DynamicallyInvokable]
763  public T1 Item1
764  {
765  [__DynamicallyInvokable]
766  get
767  {
768  return m_Item1;
769  }
770  }
771 
774  [__DynamicallyInvokable]
775  public T2 Item2
776  {
777  [__DynamicallyInvokable]
778  get
779  {
780  return m_Item2;
781  }
782  }
783 
786  [__DynamicallyInvokable]
787  public T3 Item3
788  {
789  [__DynamicallyInvokable]
790  get
791  {
792  return m_Item3;
793  }
794  }
795 
798  [__DynamicallyInvokable]
799  public T4 Item4
800  {
801  [__DynamicallyInvokable]
802  get
803  {
804  return m_Item4;
805  }
806  }
807 
810  int ITuple.Length
811  {
812  get
813  {
814  return 4;
815  }
816  }
817 
823  object ITuple.this[int index]
824  {
825  get
826  {
827  switch (index)
828  {
829  case 0:
830  return Item1;
831  case 1:
832  return Item2;
833  case 2:
834  return Item3;
835  case 3:
836  return Item4;
837  default:
838  throw new IndexOutOfRangeException();
839  }
840  }
841  }
842 
848  [__DynamicallyInvokable]
849  public Tuple(T1 item1, T2 item2, T3 item3, T4 item4)
850  {
851  m_Item1 = item1;
852  m_Item2 = item2;
853  m_Item3 = item3;
854  m_Item4 = item4;
855  }
856 
861  [__DynamicallyInvokable]
862  public override bool Equals(object obj)
863  {
865  }
866 
872  [__DynamicallyInvokable]
873  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
874  {
875  if (other == null)
876  {
877  return false;
878  }
879  Tuple<T1, T2, T3, T4> tuple = other as Tuple<T1, T2, T3, T4>;
880  if (tuple == null)
881  {
882  return false;
883  }
884  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2) && comparer.Equals(m_Item3, tuple.m_Item3))
885  {
886  return comparer.Equals(m_Item4, tuple.m_Item4);
887  }
888  return false;
889  }
890 
896  [__DynamicallyInvokable]
897  int IComparable.CompareTo(object obj)
898  {
899  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
900  }
901 
908  [__DynamicallyInvokable]
909  int IStructuralComparable.CompareTo(object other, IComparer comparer)
910  {
911  if (other == null)
912  {
913  return 1;
914  }
915  Tuple<T1, T2, T3, T4> tuple = other as Tuple<T1, T2, T3, T4>;
916  if (tuple == null)
917  {
918  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
919  }
920  int num = 0;
921  num = comparer.Compare(m_Item1, tuple.m_Item1);
922  if (num != 0)
923  {
924  return num;
925  }
926  num = comparer.Compare(m_Item2, tuple.m_Item2);
927  if (num != 0)
928  {
929  return num;
930  }
931  num = comparer.Compare(m_Item3, tuple.m_Item3);
932  if (num != 0)
933  {
934  return num;
935  }
936  return comparer.Compare(m_Item4, tuple.m_Item4);
937  }
938 
941  [__DynamicallyInvokable]
942  public override int GetHashCode()
943  {
945  }
946 
950  [__DynamicallyInvokable]
952  {
953  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4));
954  }
955 
956  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
957  {
958  return ((IStructuralEquatable)this).GetHashCode(comparer);
959  }
960 
963  [__DynamicallyInvokable]
964  public override string ToString()
965  {
966  StringBuilder stringBuilder = new StringBuilder();
967  stringBuilder.Append("(");
968  return ((ITupleInternal)this).ToString(stringBuilder);
969  }
970 
971  string ITupleInternal.ToString(StringBuilder sb)
972  {
973  sb.Append(m_Item1);
974  sb.Append(", ");
975  sb.Append(m_Item2);
976  sb.Append(", ");
977  sb.Append(m_Item3);
978  sb.Append(", ");
979  sb.Append(m_Item4);
980  sb.Append(")");
981  return sb.ToString();
982  }
983  }
990  [Serializable]
991  [__DynamicallyInvokable]
992  public class Tuple<T1, T2, T3, T4, T5> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
993  {
994  private readonly T1 m_Item1;
995 
996  private readonly T2 m_Item2;
997 
998  private readonly T3 m_Item3;
999 
1000  private readonly T4 m_Item4;
1001 
1002  private readonly T5 m_Item5;
1003 
1006  [__DynamicallyInvokable]
1007  public T1 Item1
1008  {
1009  [__DynamicallyInvokable]
1010  get
1011  {
1012  return m_Item1;
1013  }
1014  }
1015 
1018  [__DynamicallyInvokable]
1019  public T2 Item2
1020  {
1021  [__DynamicallyInvokable]
1022  get
1023  {
1024  return m_Item2;
1025  }
1026  }
1027 
1030  [__DynamicallyInvokable]
1031  public T3 Item3
1032  {
1033  [__DynamicallyInvokable]
1034  get
1035  {
1036  return m_Item3;
1037  }
1038  }
1039 
1042  [__DynamicallyInvokable]
1043  public T4 Item4
1044  {
1045  [__DynamicallyInvokable]
1046  get
1047  {
1048  return m_Item4;
1049  }
1050  }
1051 
1054  [__DynamicallyInvokable]
1055  public T5 Item5
1056  {
1057  [__DynamicallyInvokable]
1058  get
1059  {
1060  return m_Item5;
1061  }
1062  }
1063 
1066  int ITuple.Length
1067  {
1068  get
1069  {
1070  return 5;
1071  }
1072  }
1073 
1079  object ITuple.this[int index]
1080  {
1081  get
1082  {
1083  switch (index)
1084  {
1085  case 0:
1086  return Item1;
1087  case 1:
1088  return Item2;
1089  case 2:
1090  return Item3;
1091  case 3:
1092  return Item4;
1093  case 4:
1094  return Item5;
1095  default:
1096  throw new IndexOutOfRangeException();
1097  }
1098  }
1099  }
1100 
1107  [__DynamicallyInvokable]
1108  public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
1109  {
1110  m_Item1 = item1;
1111  m_Item2 = item2;
1112  m_Item3 = item3;
1113  m_Item4 = item4;
1114  m_Item5 = item5;
1115  }
1116 
1121  [__DynamicallyInvokable]
1122  public override bool Equals(object obj)
1123  {
1125  }
1126 
1132  [__DynamicallyInvokable]
1133  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
1134  {
1135  if (other == null)
1136  {
1137  return false;
1138  }
1139  Tuple<T1, T2, T3, T4, T5> tuple = other as Tuple<T1, T2, T3, T4, T5>;
1140  if (tuple == null)
1141  {
1142  return false;
1143  }
1144  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2) && comparer.Equals(m_Item3, tuple.m_Item3) && comparer.Equals(m_Item4, tuple.m_Item4))
1145  {
1146  return comparer.Equals(m_Item5, tuple.m_Item5);
1147  }
1148  return false;
1149  }
1150 
1156  [__DynamicallyInvokable]
1157  int IComparable.CompareTo(object obj)
1158  {
1159  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
1160  }
1161 
1168  [__DynamicallyInvokable]
1169  int IStructuralComparable.CompareTo(object other, IComparer comparer)
1170  {
1171  if (other == null)
1172  {
1173  return 1;
1174  }
1175  Tuple<T1, T2, T3, T4, T5> tuple = other as Tuple<T1, T2, T3, T4, T5>;
1176  if (tuple == null)
1177  {
1178  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
1179  }
1180  int num = 0;
1181  num = comparer.Compare(m_Item1, tuple.m_Item1);
1182  if (num != 0)
1183  {
1184  return num;
1185  }
1186  num = comparer.Compare(m_Item2, tuple.m_Item2);
1187  if (num != 0)
1188  {
1189  return num;
1190  }
1191  num = comparer.Compare(m_Item3, tuple.m_Item3);
1192  if (num != 0)
1193  {
1194  return num;
1195  }
1196  num = comparer.Compare(m_Item4, tuple.m_Item4);
1197  if (num != 0)
1198  {
1199  return num;
1200  }
1201  return comparer.Compare(m_Item5, tuple.m_Item5);
1202  }
1203 
1206  [__DynamicallyInvokable]
1207  public override int GetHashCode()
1208  {
1210  }
1211 
1215  [__DynamicallyInvokable]
1217  {
1218  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5));
1219  }
1220 
1221  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
1222  {
1223  return ((IStructuralEquatable)this).GetHashCode(comparer);
1224  }
1225 
1228  [__DynamicallyInvokable]
1229  public override string ToString()
1230  {
1231  StringBuilder stringBuilder = new StringBuilder();
1232  stringBuilder.Append("(");
1233  return ((ITupleInternal)this).ToString(stringBuilder);
1234  }
1235 
1236  string ITupleInternal.ToString(StringBuilder sb)
1237  {
1238  sb.Append(m_Item1);
1239  sb.Append(", ");
1240  sb.Append(m_Item2);
1241  sb.Append(", ");
1242  sb.Append(m_Item3);
1243  sb.Append(", ");
1244  sb.Append(m_Item4);
1245  sb.Append(", ");
1246  sb.Append(m_Item5);
1247  sb.Append(")");
1248  return sb.ToString();
1249  }
1250  }
1258  [Serializable]
1259  [__DynamicallyInvokable]
1260  public class Tuple<T1, T2, T3, T4, T5, T6> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
1261  {
1262  private readonly T1 m_Item1;
1263 
1264  private readonly T2 m_Item2;
1265 
1266  private readonly T3 m_Item3;
1267 
1268  private readonly T4 m_Item4;
1269 
1270  private readonly T5 m_Item5;
1271 
1272  private readonly T6 m_Item6;
1273 
1276  [__DynamicallyInvokable]
1277  public T1 Item1
1278  {
1279  [__DynamicallyInvokable]
1280  get
1281  {
1282  return m_Item1;
1283  }
1284  }
1285 
1288  [__DynamicallyInvokable]
1289  public T2 Item2
1290  {
1291  [__DynamicallyInvokable]
1292  get
1293  {
1294  return m_Item2;
1295  }
1296  }
1297 
1300  [__DynamicallyInvokable]
1301  public T3 Item3
1302  {
1303  [__DynamicallyInvokable]
1304  get
1305  {
1306  return m_Item3;
1307  }
1308  }
1309 
1312  [__DynamicallyInvokable]
1313  public T4 Item4
1314  {
1315  [__DynamicallyInvokable]
1316  get
1317  {
1318  return m_Item4;
1319  }
1320  }
1321 
1324  [__DynamicallyInvokable]
1325  public T5 Item5
1326  {
1327  [__DynamicallyInvokable]
1328  get
1329  {
1330  return m_Item5;
1331  }
1332  }
1333 
1336  [__DynamicallyInvokable]
1337  public T6 Item6
1338  {
1339  [__DynamicallyInvokable]
1340  get
1341  {
1342  return m_Item6;
1343  }
1344  }
1345 
1348  int ITuple.Length
1349  {
1350  get
1351  {
1352  return 6;
1353  }
1354  }
1355 
1361  object ITuple.this[int index]
1362  {
1363  get
1364  {
1365  switch (index)
1366  {
1367  case 0:
1368  return Item1;
1369  case 1:
1370  return Item2;
1371  case 2:
1372  return Item3;
1373  case 3:
1374  return Item4;
1375  case 4:
1376  return Item5;
1377  case 5:
1378  return Item6;
1379  default:
1380  throw new IndexOutOfRangeException();
1381  }
1382  }
1383  }
1384 
1392  [__DynamicallyInvokable]
1393  public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
1394  {
1395  m_Item1 = item1;
1396  m_Item2 = item2;
1397  m_Item3 = item3;
1398  m_Item4 = item4;
1399  m_Item5 = item5;
1400  m_Item6 = item6;
1401  }
1402 
1407  [__DynamicallyInvokable]
1408  public override bool Equals(object obj)
1409  {
1411  }
1412 
1418  [__DynamicallyInvokable]
1419  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
1420  {
1421  if (other == null)
1422  {
1423  return false;
1424  }
1425  Tuple<T1, T2, T3, T4, T5, T6> tuple = other as Tuple<T1, T2, T3, T4, T5, T6>;
1426  if (tuple == null)
1427  {
1428  return false;
1429  }
1430  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2) && comparer.Equals(m_Item3, tuple.m_Item3) && comparer.Equals(m_Item4, tuple.m_Item4) && comparer.Equals(m_Item5, tuple.m_Item5))
1431  {
1432  return comparer.Equals(m_Item6, tuple.m_Item6);
1433  }
1434  return false;
1435  }
1436 
1442  [__DynamicallyInvokable]
1443  int IComparable.CompareTo(object obj)
1444  {
1445  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
1446  }
1447 
1454  [__DynamicallyInvokable]
1455  int IStructuralComparable.CompareTo(object other, IComparer comparer)
1456  {
1457  if (other == null)
1458  {
1459  return 1;
1460  }
1461  Tuple<T1, T2, T3, T4, T5, T6> tuple = other as Tuple<T1, T2, T3, T4, T5, T6>;
1462  if (tuple == null)
1463  {
1464  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
1465  }
1466  int num = 0;
1467  num = comparer.Compare(m_Item1, tuple.m_Item1);
1468  if (num != 0)
1469  {
1470  return num;
1471  }
1472  num = comparer.Compare(m_Item2, tuple.m_Item2);
1473  if (num != 0)
1474  {
1475  return num;
1476  }
1477  num = comparer.Compare(m_Item3, tuple.m_Item3);
1478  if (num != 0)
1479  {
1480  return num;
1481  }
1482  num = comparer.Compare(m_Item4, tuple.m_Item4);
1483  if (num != 0)
1484  {
1485  return num;
1486  }
1487  num = comparer.Compare(m_Item5, tuple.m_Item5);
1488  if (num != 0)
1489  {
1490  return num;
1491  }
1492  return comparer.Compare(m_Item6, tuple.m_Item6);
1493  }
1494 
1497  [__DynamicallyInvokable]
1498  public override int GetHashCode()
1499  {
1501  }
1502 
1506  [__DynamicallyInvokable]
1508  {
1509  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6));
1510  }
1511 
1512  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
1513  {
1514  return ((IStructuralEquatable)this).GetHashCode(comparer);
1515  }
1516 
1519  [__DynamicallyInvokable]
1520  public override string ToString()
1521  {
1522  StringBuilder stringBuilder = new StringBuilder();
1523  stringBuilder.Append("(");
1524  return ((ITupleInternal)this).ToString(stringBuilder);
1525  }
1526 
1527  string ITupleInternal.ToString(StringBuilder sb)
1528  {
1529  sb.Append(m_Item1);
1530  sb.Append(", ");
1531  sb.Append(m_Item2);
1532  sb.Append(", ");
1533  sb.Append(m_Item3);
1534  sb.Append(", ");
1535  sb.Append(m_Item4);
1536  sb.Append(", ");
1537  sb.Append(m_Item5);
1538  sb.Append(", ");
1539  sb.Append(m_Item6);
1540  sb.Append(")");
1541  return sb.ToString();
1542  }
1543  }
1552  [Serializable]
1553  [__DynamicallyInvokable]
1554  public class Tuple<T1, T2, T3, T4, T5, T6, T7> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
1555  {
1556  private readonly T1 m_Item1;
1557 
1558  private readonly T2 m_Item2;
1559 
1560  private readonly T3 m_Item3;
1561 
1562  private readonly T4 m_Item4;
1563 
1564  private readonly T5 m_Item5;
1565 
1566  private readonly T6 m_Item6;
1567 
1568  private readonly T7 m_Item7;
1569 
1572  [__DynamicallyInvokable]
1573  public T1 Item1
1574  {
1575  [__DynamicallyInvokable]
1576  get
1577  {
1578  return m_Item1;
1579  }
1580  }
1581 
1584  [__DynamicallyInvokable]
1585  public T2 Item2
1586  {
1587  [__DynamicallyInvokable]
1588  get
1589  {
1590  return m_Item2;
1591  }
1592  }
1593 
1596  [__DynamicallyInvokable]
1597  public T3 Item3
1598  {
1599  [__DynamicallyInvokable]
1600  get
1601  {
1602  return m_Item3;
1603  }
1604  }
1605 
1608  [__DynamicallyInvokable]
1609  public T4 Item4
1610  {
1611  [__DynamicallyInvokable]
1612  get
1613  {
1614  return m_Item4;
1615  }
1616  }
1617 
1620  [__DynamicallyInvokable]
1621  public T5 Item5
1622  {
1623  [__DynamicallyInvokable]
1624  get
1625  {
1626  return m_Item5;
1627  }
1628  }
1629 
1632  [__DynamicallyInvokable]
1633  public T6 Item6
1634  {
1635  [__DynamicallyInvokable]
1636  get
1637  {
1638  return m_Item6;
1639  }
1640  }
1641 
1644  [__DynamicallyInvokable]
1645  public T7 Item7
1646  {
1647  [__DynamicallyInvokable]
1648  get
1649  {
1650  return m_Item7;
1651  }
1652  }
1653 
1656  int ITuple.Length
1657  {
1658  get
1659  {
1660  return 7;
1661  }
1662  }
1663 
1669  object ITuple.this[int index]
1670  {
1671  get
1672  {
1673  switch (index)
1674  {
1675  case 0:
1676  return Item1;
1677  case 1:
1678  return Item2;
1679  case 2:
1680  return Item3;
1681  case 3:
1682  return Item4;
1683  case 4:
1684  return Item5;
1685  case 5:
1686  return Item6;
1687  case 6:
1688  return Item7;
1689  default:
1690  throw new IndexOutOfRangeException();
1691  }
1692  }
1693  }
1694 
1703  [__DynamicallyInvokable]
1704  public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
1705  {
1706  m_Item1 = item1;
1707  m_Item2 = item2;
1708  m_Item3 = item3;
1709  m_Item4 = item4;
1710  m_Item5 = item5;
1711  m_Item6 = item6;
1712  m_Item7 = item7;
1713  }
1714 
1719  [__DynamicallyInvokable]
1720  public override bool Equals(object obj)
1721  {
1723  }
1724 
1730  [__DynamicallyInvokable]
1731  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
1732  {
1733  if (other == null)
1734  {
1735  return false;
1736  }
1737  Tuple<T1, T2, T3, T4, T5, T6, T7> tuple = other as Tuple<T1, T2, T3, T4, T5, T6, T7>;
1738  if (tuple == null)
1739  {
1740  return false;
1741  }
1742  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2) && comparer.Equals(m_Item3, tuple.m_Item3) && comparer.Equals(m_Item4, tuple.m_Item4) && comparer.Equals(m_Item5, tuple.m_Item5) && comparer.Equals(m_Item6, tuple.m_Item6))
1743  {
1744  return comparer.Equals(m_Item7, tuple.m_Item7);
1745  }
1746  return false;
1747  }
1748 
1754  [__DynamicallyInvokable]
1755  int IComparable.CompareTo(object obj)
1756  {
1757  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
1758  }
1759 
1766  [__DynamicallyInvokable]
1767  int IStructuralComparable.CompareTo(object other, IComparer comparer)
1768  {
1769  if (other == null)
1770  {
1771  return 1;
1772  }
1773  Tuple<T1, T2, T3, T4, T5, T6, T7> tuple = other as Tuple<T1, T2, T3, T4, T5, T6, T7>;
1774  if (tuple == null)
1775  {
1776  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
1777  }
1778  int num = 0;
1779  num = comparer.Compare(m_Item1, tuple.m_Item1);
1780  if (num != 0)
1781  {
1782  return num;
1783  }
1784  num = comparer.Compare(m_Item2, tuple.m_Item2);
1785  if (num != 0)
1786  {
1787  return num;
1788  }
1789  num = comparer.Compare(m_Item3, tuple.m_Item3);
1790  if (num != 0)
1791  {
1792  return num;
1793  }
1794  num = comparer.Compare(m_Item4, tuple.m_Item4);
1795  if (num != 0)
1796  {
1797  return num;
1798  }
1799  num = comparer.Compare(m_Item5, tuple.m_Item5);
1800  if (num != 0)
1801  {
1802  return num;
1803  }
1804  num = comparer.Compare(m_Item6, tuple.m_Item6);
1805  if (num != 0)
1806  {
1807  return num;
1808  }
1809  return comparer.Compare(m_Item7, tuple.m_Item7);
1810  }
1811 
1814  [__DynamicallyInvokable]
1815  public override int GetHashCode()
1816  {
1818  }
1819 
1823  [__DynamicallyInvokable]
1825  {
1826  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7));
1827  }
1828 
1829  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
1830  {
1831  return ((IStructuralEquatable)this).GetHashCode(comparer);
1832  }
1833 
1836  [__DynamicallyInvokable]
1837  public override string ToString()
1838  {
1839  StringBuilder stringBuilder = new StringBuilder();
1840  stringBuilder.Append("(");
1841  return ((ITupleInternal)this).ToString(stringBuilder);
1842  }
1843 
1844  string ITupleInternal.ToString(StringBuilder sb)
1845  {
1846  sb.Append(m_Item1);
1847  sb.Append(", ");
1848  sb.Append(m_Item2);
1849  sb.Append(", ");
1850  sb.Append(m_Item3);
1851  sb.Append(", ");
1852  sb.Append(m_Item4);
1853  sb.Append(", ");
1854  sb.Append(m_Item5);
1855  sb.Append(", ");
1856  sb.Append(m_Item6);
1857  sb.Append(", ");
1858  sb.Append(m_Item7);
1859  sb.Append(")");
1860  return sb.ToString();
1861  }
1862  }
1872  [Serializable]
1873  [__DynamicallyInvokable]
1874  public class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple
1875  {
1876  private readonly T1 m_Item1;
1877 
1878  private readonly T2 m_Item2;
1879 
1880  private readonly T3 m_Item3;
1881 
1882  private readonly T4 m_Item4;
1883 
1884  private readonly T5 m_Item5;
1885 
1886  private readonly T6 m_Item6;
1887 
1888  private readonly T7 m_Item7;
1889 
1890  private readonly TRest m_Rest;
1891 
1894  [__DynamicallyInvokable]
1895  public T1 Item1
1896  {
1897  [__DynamicallyInvokable]
1898  get
1899  {
1900  return m_Item1;
1901  }
1902  }
1903 
1906  [__DynamicallyInvokable]
1907  public T2 Item2
1908  {
1909  [__DynamicallyInvokable]
1910  get
1911  {
1912  return m_Item2;
1913  }
1914  }
1915 
1918  [__DynamicallyInvokable]
1919  public T3 Item3
1920  {
1921  [__DynamicallyInvokable]
1922  get
1923  {
1924  return m_Item3;
1925  }
1926  }
1927 
1930  [__DynamicallyInvokable]
1931  public T4 Item4
1932  {
1933  [__DynamicallyInvokable]
1934  get
1935  {
1936  return m_Item4;
1937  }
1938  }
1939 
1942  [__DynamicallyInvokable]
1943  public T5 Item5
1944  {
1945  [__DynamicallyInvokable]
1946  get
1947  {
1948  return m_Item5;
1949  }
1950  }
1951 
1954  [__DynamicallyInvokable]
1955  public T6 Item6
1956  {
1957  [__DynamicallyInvokable]
1958  get
1959  {
1960  return m_Item6;
1961  }
1962  }
1963 
1966  [__DynamicallyInvokable]
1967  public T7 Item7
1968  {
1969  [__DynamicallyInvokable]
1970  get
1971  {
1972  return m_Item7;
1973  }
1974  }
1975 
1978  [__DynamicallyInvokable]
1979  public TRest Rest
1980  {
1981  [__DynamicallyInvokable]
1982  get
1983  {
1984  return m_Rest;
1985  }
1986  }
1987 
1990  int ITuple.Length
1991  {
1992  get
1993  {
1994  return 7 + ((ITupleInternal)(object)Rest).Length;
1995  }
1996  }
1997 
2003  object ITuple.this[int index]
2004  {
2005  get
2006  {
2007  switch (index)
2008  {
2009  case 0:
2010  return Item1;
2011  case 1:
2012  return Item2;
2013  case 2:
2014  return Item3;
2015  case 3:
2016  return Item4;
2017  case 4:
2018  return Item5;
2019  case 5:
2020  return Item6;
2021  case 6:
2022  return Item7;
2023  default:
2024  return ((ITupleInternal)(object)Rest)[index - 7];
2025  }
2026  }
2027  }
2028 
2040  [__DynamicallyInvokable]
2041  public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
2042  {
2043  if (!(((object)rest) is ITupleInternal))
2044  {
2045  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleLastArgumentNotATuple"));
2046  }
2047  m_Item1 = item1;
2048  m_Item2 = item2;
2049  m_Item3 = item3;
2050  m_Item4 = item4;
2051  m_Item5 = item5;
2052  m_Item6 = item6;
2053  m_Item7 = item7;
2054  m_Rest = rest;
2055  }
2056 
2061  [__DynamicallyInvokable]
2062  public override bool Equals(object obj)
2063  {
2065  }
2066 
2072  [__DynamicallyInvokable]
2073  bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
2074  {
2075  if (other == null)
2076  {
2077  return false;
2078  }
2079  Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> tuple = other as Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>;
2080  if (tuple == null)
2081  {
2082  return false;
2083  }
2084  if (comparer.Equals(m_Item1, tuple.m_Item1) && comparer.Equals(m_Item2, tuple.m_Item2) && comparer.Equals(m_Item3, tuple.m_Item3) && comparer.Equals(m_Item4, tuple.m_Item4) && comparer.Equals(m_Item5, tuple.m_Item5) && comparer.Equals(m_Item6, tuple.m_Item6) && comparer.Equals(m_Item7, tuple.m_Item7))
2085  {
2086  return comparer.Equals(m_Rest, tuple.m_Rest);
2087  }
2088  return false;
2089  }
2090 
2096  [__DynamicallyInvokable]
2097  int IComparable.CompareTo(object obj)
2098  {
2099  return ((IStructuralComparable)this).CompareTo(obj, (IComparer)Comparer<object>.Default);
2100  }
2101 
2108  [__DynamicallyInvokable]
2109  int IStructuralComparable.CompareTo(object other, IComparer comparer)
2110  {
2111  if (other == null)
2112  {
2113  return 1;
2114  }
2115  Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> tuple = other as Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>;
2116  if (tuple == null)
2117  {
2118  throw new ArgumentException(Environment.GetResourceString("ArgumentException_TupleIncorrectType", GetType().ToString()), "other");
2119  }
2120  int num = 0;
2121  num = comparer.Compare(m_Item1, tuple.m_Item1);
2122  if (num != 0)
2123  {
2124  return num;
2125  }
2126  num = comparer.Compare(m_Item2, tuple.m_Item2);
2127  if (num != 0)
2128  {
2129  return num;
2130  }
2131  num = comparer.Compare(m_Item3, tuple.m_Item3);
2132  if (num != 0)
2133  {
2134  return num;
2135  }
2136  num = comparer.Compare(m_Item4, tuple.m_Item4);
2137  if (num != 0)
2138  {
2139  return num;
2140  }
2141  num = comparer.Compare(m_Item5, tuple.m_Item5);
2142  if (num != 0)
2143  {
2144  return num;
2145  }
2146  num = comparer.Compare(m_Item6, tuple.m_Item6);
2147  if (num != 0)
2148  {
2149  return num;
2150  }
2151  num = comparer.Compare(m_Item7, tuple.m_Item7);
2152  if (num != 0)
2153  {
2154  return num;
2155  }
2156  return comparer.Compare(m_Rest, tuple.m_Rest);
2157  }
2158 
2161  [__DynamicallyInvokable]
2162  public override int GetHashCode()
2163  {
2165  }
2166 
2170  [__DynamicallyInvokable]
2172  {
2173  ITupleInternal tupleInternal = (ITupleInternal)(object)m_Rest;
2174  if (tupleInternal.Length >= 8)
2175  {
2176  return tupleInternal.GetHashCode(comparer);
2177  }
2178  switch (8 - tupleInternal.Length)
2179  {
2180  case 1:
2181  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2182  case 2:
2183  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2184  case 3:
2185  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2186  case 4:
2187  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2188  case 5:
2189  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2190  case 6:
2191  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2192  case 7:
2193  return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer));
2194  default:
2195  return -1;
2196  }
2197  }
2198 
2199  int ITupleInternal.GetHashCode(IEqualityComparer comparer)
2200  {
2201  return ((IStructuralEquatable)this).GetHashCode(comparer);
2202  }
2203 
2206  [__DynamicallyInvokable]
2207  public override string ToString()
2208  {
2209  StringBuilder stringBuilder = new StringBuilder();
2210  stringBuilder.Append("(");
2211  return ((ITupleInternal)this).ToString(stringBuilder);
2212  }
2213 
2214  string ITupleInternal.ToString(StringBuilder sb)
2215  {
2216  sb.Append(m_Item1);
2217  sb.Append(", ");
2218  sb.Append(m_Item2);
2219  sb.Append(", ");
2220  sb.Append(m_Item3);
2221  sb.Append(", ");
2222  sb.Append(m_Item4);
2223  sb.Append(", ");
2224  sb.Append(m_Item5);
2225  sb.Append(", ");
2226  sb.Append(m_Item6);
2227  sb.Append(", ");
2228  sb.Append(m_Item7);
2229  sb.Append(", ");
2230  return ((ITupleInternal)(object)m_Rest).ToString(sb);
2231  }
2232  }
2233 }
Tuple(T1 item1, T2 item2, T3 item3, T4 item4)
Initializes a new instance of the T:System.Tuple`4 class.
Definition: Tuple.cs:849
Tuple(T1 item1, T2 item2, T3 item3)
Initializes a new instance of the T:System.Tuple`3 class.
Definition: Tuple.cs:616
bool Equals(object other, IEqualityComparer comparer)
Determines whether an object is structurally equal to the current instance.
T3 Item3
Gets the value of the current T:System.Tuple`3 object's third component.
Definition: Tuple.cs:570
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...
override int GetHashCode()
Returns the hash code for the current T:System.Tuple`1 object.
Definition: Tuple.cs:303
override string ToString()
Returns a string that represents the value of this T:System.Tuple`1 instance.
Definition: Tuple.cs:325
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
Provides static methods for creating tuple objects. To browse the .NET Framework source code for this...
Definition: Tuple.cs:10
Definition: __Canon.cs:3
Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
Initializes a new instance of the T:System.Tuple`7 class.
Definition: Tuple.cs:1704
T6 Item6
Gets the value of the current T:System.Tuple`6 object's sixth component.
Definition: Tuple.cs:1338
Defines a generalized type-specific comparison method that a value type or class implements to order ...
Definition: IComparable.cs:8
int GetHashCode(IEqualityComparer comparer)
Returns a hash code for the current instance.
T7 Item7
Gets the value of the current T:System.Tuple`7 object's seventh component.
Definition: Tuple.cs:1646
int Length
Gets the number of elements in this Tuple instance.
Definition: ITuple.cs:9
TRest Rest
Gets the current T:System.Tuple`8 object's remaining components.
Definition: Tuple.cs:1980
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.
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
Defines methods to support the comparison of objects for equality.
Exposes a method that compares two objects.
Definition: IComparer.cs:8
T5 Item5
Gets the value of the current T:System.Tuple`5 object's fifth component.
Definition: Tuple.cs:1056
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
Initializes a new instance of the T:System.Tuple`5 class.
Definition: Tuple.cs:1108
T1 Item1
Gets the value of the T:System.Tuple`1 object's single component.
Definition: Tuple.cs:195
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.
Tuple(T1 item1)
Initializes a new instance of the T:System.Tuple`1 class.
Definition: Tuple.cs:233
Tuple(T1 item1, T2 item2)
Initializes a new instance of the T:System.Tuple`2 class.
Definition: Tuple.cs:409
T4 Item4
Gets the value of the current T:System.Tuple`4 object's fourth component.
Definition: Tuple.cs:800
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.
Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
Initializes a new instance of the T:System.Tuple`8 class.
Definition: Tuple.cs:2041
T2 Item2
Gets the value of the current T:System.Tuple`2 object's second component.
Definition: Tuple.cs:366
override bool Equals(object obj)
Returns a value that indicates whether the current T:System.Tuple`1 object is equal to a specified ob...
Definition: Tuple.cs:243
Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
Initializes a new instance of the T:System.Tuple`6 class.
Definition: Tuple.cs:1393
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