Created
October 10, 2018 03:19
-
-
Save matthewvukomanovic/a0101e9d9b6ec285e340c46a2f1c1021 to your computer and use it in GitHub Desktop.
C# WritableTuple based on reflected Tuple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IWritableTuple | |
{ | |
int Length { get; } | |
object this[int index] { get; } | |
} | |
internal interface IWritableTupleInternal : IWritableTuple | |
{ | |
string ToString(System.Text.StringBuilder sb); | |
int GetHashCode(System.Collections.IEqualityComparer comparer); | |
} | |
public static class WritableTuple | |
{ | |
public static WritableTuple<T1> Create<T1>(T1 item1) | |
{ | |
return new WritableTuple<T1>(item1); | |
} | |
public static WritableTuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) | |
{ | |
return new WritableTuple<T1, T2>(item1, item2); | |
} | |
public static WritableTuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3) | |
{ | |
return new WritableTuple<T1, T2, T3>(item1, item2, item3); | |
} | |
public static WritableTuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4) | |
{ | |
return new WritableTuple<T1, T2, T3, T4>(item1, item2, item3, item4); | |
} | |
public static WritableTuple<T1, T2, T3, T4, T5> Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) | |
{ | |
return new WritableTuple<T1, T2, T3, T4, T5>(item1, item2, item3, item4, item5); | |
} | |
public static WritableTuple<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) | |
{ | |
return new WritableTuple<T1, T2, T3, T4, T5, T6>(item1, item2, item3, item4, item5, item6); | |
} | |
public static WritableTuple<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) | |
{ | |
return new WritableTuple<T1, T2, T3, T4, T5, T6, T7>(item1, item2, item3, item4, item5, item6, item7); | |
} | |
public static WritableTuple<T1, T2, T3, T4, T5, T6, T7, WritableTuple<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) | |
{ | |
return new WritableTuple<T1, T2, T3, T4, T5, T6, T7, WritableTuple<T8>>(item1, item2, item3, item4, item5, item6, item7, new WritableTuple<T8>(item8)); | |
} | |
internal static int CombineHashCodes(int h1, int h2) | |
{ | |
return (h1 << 5) + h1 ^ h2; | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2), h3); | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3, int h4) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2), WritableTuple.CombineHashCodes(h3, h4)); | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2, h3, h4), h5); | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2, h3, h4), WritableTuple.CombineHashCodes(h5, h6)); | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2, h3, h4), WritableTuple.CombineHashCodes(h5, h6, h7)); | |
} | |
internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7, int h8) | |
{ | |
return WritableTuple.CombineHashCodes(WritableTuple.CombineHashCodes(h1, h2, h3, h4), WritableTuple.CombineHashCodes(h5, h6, h7, h8)); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 1; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
if (index != 0) | |
throw new System.IndexOutOfRangeException(); | |
return (object)this.Item1; | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1) | |
{ | |
this.m_Item1 = item1; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1> writableTuple = other as WritableTuple<T1>; | |
if (writableTuple == null) | |
return false; | |
return comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1> writableTuple = other as WritableTuple<T1>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
return comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return comparer.GetHashCode((object)this.m_Item1); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 2; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
if (index == 0) | |
return (object)this.Item1; | |
if (index == 1) | |
return (object)this.Item2; | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2> writableTuple = other as WritableTuple<T1, T2>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1)) | |
return false; | |
return comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2> writableTuple = other as WritableTuple<T1, T2>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num != 0) | |
return num; | |
return comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 3; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
default: | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3> writableTuple = other as WritableTuple<T1, T2, T3>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || !comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2)) | |
return false; | |
return comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3> writableTuple = other as WritableTuple<T1, T2, T3>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
return comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3, T4> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
private T4 m_Item4; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
public T4 Item4 | |
{ | |
get { return this.m_Item4; } | |
set { this.m_Item4 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 4; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
case 3: | |
return (object)this.Item4; | |
default: | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3, T4 item4) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3, T4> writableTuple = other as WritableTuple<T1, T2, T3, T4>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || (!comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2) || !comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3))) | |
return false; | |
return comparer.Equals((object)this.m_Item4, (object)writableTuple.m_Item4); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3, T4> writableTuple = other as WritableTuple<T1, T2, T3, T4>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
int num3 = comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
return comparer.Compare((object)this.m_Item4, (object)writableTuple.m_Item4); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item4); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3, T4, T5> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
private T4 m_Item4; | |
private T5 m_Item5; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
public T4 Item4 | |
{ | |
get { return this.m_Item4; } | |
set { this.m_Item4 = value; } | |
} | |
public T5 Item5 | |
{ | |
get { return this.m_Item5; } | |
set { this.m_Item5 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 5; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
case 3: | |
return (object)this.Item4; | |
case 4: | |
return (object)this.Item5; | |
default: | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3, T4, T5> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || (!comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2) || !comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3)) || !comparer.Equals((object)this.m_Item4, (object)writableTuple.m_Item4)) | |
return false; | |
return comparer.Equals((object)this.m_Item5, (object)writableTuple.m_Item5); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3, T4, T5> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
int num3 = comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
int num4 = comparer.Compare((object)this.m_Item4, (object)writableTuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
return comparer.Compare((object)this.m_Item5, (object)writableTuple.m_Item5); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item4); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item5); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3, T4, T5, T6> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
private T4 m_Item4; | |
private T5 m_Item5; | |
private T6 m_Item6; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
public T4 Item4 | |
{ | |
get { return this.m_Item4; } | |
set { this.m_Item4 = value; } | |
} | |
public T5 Item5 | |
{ | |
get { return this.m_Item5; } | |
set { this.m_Item5 = value; } | |
} | |
public T6 Item6 | |
{ | |
get { return this.m_Item6; } | |
set { this.m_Item6 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 6; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
case 3: | |
return (object)this.Item4; | |
case 4: | |
return (object)this.Item5; | |
case 5: | |
return (object)this.Item6; | |
default: | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3, T4, T5, T6> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || (!comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2) || !comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3)) || (!comparer.Equals((object)this.m_Item4, (object)writableTuple.m_Item4) || !comparer.Equals((object)this.m_Item5, (object)writableTuple.m_Item5))) | |
return false; | |
return comparer.Equals((object)this.m_Item6, (object)writableTuple.m_Item6); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3, T4, T5, T6> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
int num3 = comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
int num4 = comparer.Compare((object)this.m_Item4, (object)writableTuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
int num5 = comparer.Compare((object)this.m_Item5, (object)writableTuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
return comparer.Compare((object)this.m_Item6, (object)writableTuple.m_Item6); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item4); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item5); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item6); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3, T4, T5, T6, T7> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
private T4 m_Item4; | |
private T5 m_Item5; | |
private T6 m_Item6; | |
private T7 m_Item7; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
public T4 Item4 | |
{ | |
get { return this.m_Item4; } | |
set { this.m_Item4 = value; } | |
} | |
public T5 Item5 | |
{ | |
get { return this.m_Item5; } | |
set { this.m_Item5 = value; } | |
} | |
public T6 Item6 | |
{ | |
get { return this.m_Item6; } | |
set { this.m_Item6 = value; } | |
} | |
public T7 Item7 | |
{ | |
get { return this.m_Item7; } | |
set { this.m_Item7 = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 7; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
case 3: | |
return (object)this.Item4; | |
case 4: | |
return (object)this.Item5; | |
case 5: | |
return (object)this.Item6; | |
case 6: | |
return (object)this.Item7; | |
default: | |
throw new System.IndexOutOfRangeException(); | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) | |
{ | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
this.m_Item7 = item7; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3, T4, T5, T6, T7> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6, T7>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || (!comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2) || !comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3)) || (!comparer.Equals((object)this.m_Item4, (object)writableTuple.m_Item4) || !comparer.Equals((object)this.m_Item5, (object)writableTuple.m_Item5) || !comparer.Equals((object)this.m_Item6, (object)writableTuple.m_Item6))) | |
return false; | |
return comparer.Equals((object)this.m_Item7, (object)writableTuple.m_Item7); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3, T4, T5, T6, T7> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6, T7>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
int num3 = comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
int num4 = comparer.Compare((object)this.m_Item4, (object)writableTuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
int num5 = comparer.Compare((object)this.m_Item5, (object)writableTuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
int num6 = comparer.Compare((object)this.m_Item6, (object)writableTuple.m_Item6); | |
if (num6 != 0) | |
return num6; | |
return comparer.Compare((object)this.m_Item7, (object)writableTuple.m_Item7); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7)); | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item4); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item5); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item6); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item7); | |
sb.Append(")"); | |
return sb.ToString(); | |
} | |
} | |
[System.Serializable] | |
public class WritableTuple<T1, T2, T3, T4, T5, T6, T7, TRest> : System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.IComparable, IWritableTupleInternal, IWritableTuple | |
{ | |
private T1 m_Item1; | |
private T2 m_Item2; | |
private T3 m_Item3; | |
private T4 m_Item4; | |
private T5 m_Item5; | |
private T6 m_Item6; | |
private T7 m_Item7; | |
private TRest m_Rest; | |
public T1 Item1 | |
{ | |
get { return this.m_Item1; } | |
set { this.m_Item1 = value; } | |
} | |
public T2 Item2 | |
{ | |
get { return this.m_Item2; } | |
set { this.m_Item2 = value; } | |
} | |
public T3 Item3 | |
{ | |
get { return this.m_Item3; } | |
set { this.m_Item3 = value; } | |
} | |
public T4 Item4 | |
{ | |
get { return this.m_Item4; } | |
set { this.m_Item4 = value; } | |
} | |
public T5 Item5 | |
{ | |
get { return this.m_Item5; } | |
set { this.m_Item5 = value; } | |
} | |
public T6 Item6 | |
{ | |
get { return this.m_Item6; } | |
set { this.m_Item6 = value; } | |
} | |
public T7 Item7 | |
{ | |
get { return this.m_Item7; } | |
set { this.m_Item7 = value; } | |
} | |
public TRest Rest | |
{ | |
get { return this.m_Rest; } | |
set { this.m_Rest = value; } | |
} | |
int IWritableTuple.Length | |
{ | |
get | |
{ | |
return 7 + ((IWritableTuple)(object)this.Rest).Length; | |
} | |
} | |
object IWritableTuple.this[int index] | |
{ | |
get | |
{ | |
switch (index) | |
{ | |
case 0: | |
return (object)this.Item1; | |
case 1: | |
return (object)this.Item2; | |
case 2: | |
return (object)this.Item3; | |
case 3: | |
return (object)this.Item4; | |
case 4: | |
return (object)this.Item5; | |
case 5: | |
return (object)this.Item6; | |
case 6: | |
return (object)this.Item7; | |
default: | |
return ((IWritableTuple)(object)this.Rest)[index - 7]; | |
} | |
} | |
} | |
public WritableTuple() | |
{ | |
} | |
public WritableTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) | |
{ | |
if (!((object)rest is IWritableTupleInternal)) | |
throw new System.ArgumentException("LastArgument Not A WritableTuple"); | |
this.m_Item1 = item1; | |
this.m_Item2 = item2; | |
this.m_Item3 = item3; | |
this.m_Item4 = item4; | |
this.m_Item5 = item5; | |
this.m_Item6 = item6; | |
this.m_Item7 = item7; | |
this.m_Rest = rest; | |
} | |
public override bool Equals(object obj) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).Equals(obj, (System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) | |
{ | |
if (other == null) | |
return false; | |
WritableTuple<T1, T2, T3, T4, T5, T6, T7, TRest> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6, T7, TRest>; | |
if (writableTuple == null || !comparer.Equals((object)this.m_Item1, (object)writableTuple.m_Item1) || (!comparer.Equals((object)this.m_Item2, (object)writableTuple.m_Item2) || !comparer.Equals((object)this.m_Item3, (object)writableTuple.m_Item3)) || (!comparer.Equals((object)this.m_Item4, (object)writableTuple.m_Item4) || !comparer.Equals((object)this.m_Item5, (object)writableTuple.m_Item5) || (!comparer.Equals((object)this.m_Item6, (object)writableTuple.m_Item6) || !comparer.Equals((object)this.m_Item7, (object)writableTuple.m_Item7)))) | |
return false; | |
return comparer.Equals((object)this.m_Rest, (object)writableTuple.m_Rest); | |
} | |
int System.IComparable.CompareTo(object obj) | |
{ | |
return ((System.Collections.IStructuralComparable)this).CompareTo(obj, (System.Collections.IComparer)System.Collections.Generic.Comparer<object>.Default); | |
} | |
int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) | |
{ | |
if (other == null) | |
return 1; | |
WritableTuple<T1, T2, T3, T4, T5, T6, T7, TRest> writableTuple = other as WritableTuple<T1, T2, T3, T4, T5, T6, T7, TRest>; | |
if (writableTuple == null) | |
throw new System.ArgumentException("Incorrect Type " + (object)this.GetType().ToString(), "other"); | |
int num1 = comparer.Compare((object)this.m_Item1, (object)writableTuple.m_Item1); | |
if (num1 != 0) | |
return num1; | |
int num2 = comparer.Compare((object)this.m_Item2, (object)writableTuple.m_Item2); | |
if (num2 != 0) | |
return num2; | |
int num3 = comparer.Compare((object)this.m_Item3, (object)writableTuple.m_Item3); | |
if (num3 != 0) | |
return num3; | |
int num4 = comparer.Compare((object)this.m_Item4, (object)writableTuple.m_Item4); | |
if (num4 != 0) | |
return num4; | |
int num5 = comparer.Compare((object)this.m_Item5, (object)writableTuple.m_Item5); | |
if (num5 != 0) | |
return num5; | |
int num6 = comparer.Compare((object)this.m_Item6, (object)writableTuple.m_Item6); | |
if (num6 != 0) | |
return num6; | |
int num7 = comparer.Compare((object)this.m_Item7, (object)writableTuple.m_Item7); | |
if (num7 != 0) | |
return num7; | |
return comparer.Compare((object)this.m_Rest, (object)writableTuple.m_Rest); | |
} | |
public override int GetHashCode() | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode((System.Collections.IEqualityComparer)System.Collections.Generic.EqualityComparer<object>.Default); | |
} | |
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
IWritableTupleInternal rest = (IWritableTupleInternal)(object)this.m_Rest; | |
if (rest.Length >= 8) | |
return rest.GetHashCode(comparer); | |
switch (8 - rest.Length) | |
{ | |
case 1: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 2: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 3: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 4: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 5: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 6: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
case 7: | |
return WritableTuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7), rest.GetHashCode(comparer)); | |
default: | |
return -1; | |
} | |
} | |
int IWritableTupleInternal.GetHashCode(System.Collections.IEqualityComparer comparer) | |
{ | |
return ((System.Collections.IStructuralEquatable)this).GetHashCode(comparer); | |
} | |
public override string ToString() | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(); | |
sb.Append("("); | |
return ((IWritableTupleInternal)this).ToString(sb); | |
} | |
string IWritableTupleInternal.ToString(System.Text.StringBuilder sb) | |
{ | |
sb.Append((object)this.m_Item1); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item2); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item3); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item4); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item5); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item6); | |
sb.Append(", "); | |
sb.Append((object)this.m_Item7); | |
sb.Append(", "); | |
return ((IWritableTupleInternal)(object)this.m_Rest).ToString(sb); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment