|
|
|
|
|
|
namespace RSG |
|
|
|
{ |
|
|
|
namespace RSG { |
|
|
|
public class Tuple |
|
|
|
{ |
|
|
|
public class Tuple { |
|
|
|
/// <summary>
|
|
|
|
/// Create a new 2-tuple, or pair.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
/// <param name="item2">The value of the second component of the tuple.</param>
|
|
|
|
/// <returns>A 2-tuple whose value is (item1, item2)</returns>
|
|
|
|
public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) |
|
|
|
{ |
|
|
|
public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) { |
|
|
|
return new Tuple<T1, T2>(item1, item2); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
/// <param name="item2">The value of the second component of the tuple.</param>
|
|
|
|
/// <param name="item3">The value of the third component of the tuple.</param>
|
|
|
|
/// <returns>A 3-tuple whose value is (item1, item2, item3)</returns>
|
|
|
|
public static Tuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3) |
|
|
|
{ |
|
|
|
public static Tuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3) { |
|
|
|
return new Tuple<T1, T2, T3>(item1, item2, item3); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
/// <param name="item3">The value of the third component of the tuple.</param>
|
|
|
|
/// <param name="item4">The value of the fourth component of the tuple.</param>
|
|
|
|
/// <returns>A 3-tuple whose value is (item1, item2, item3, item4)</returns>
|
|
|
|
public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4) |
|
|
|
{ |
|
|
|
public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4) { |
|
|
|
return new Tuple<T1, T2, T3, T4>(item1, item2, item3, item4); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T1">The type of the tuple's first component.</typeparam>
|
|
|
|
/// <typeparam name="T2">The type of the tuple's second component.</typeparam>
|
|
|
|
public class Tuple<T1, T2> |
|
|
|
{ |
|
|
|
internal Tuple(T1 item1, T2 item2) |
|
|
|
{ |
|
|
|
public class Tuple<T1, T2> { |
|
|
|
internal Tuple(T1 item1, T2 item2) { |
|
|
|
Item1 = item1; |
|
|
|
Item2 = item2; |
|
|
|
} |
|
|
|
|
|
|
/// <typeparam name="T1">The type of the tuple's first component.</typeparam>
|
|
|
|
/// <typeparam name="T2">The type of the tuple's second component.</typeparam>
|
|
|
|
/// <typeparam name="T3">The type of the tuple's third component.</typeparam>
|
|
|
|
public class Tuple<T1, T2, T3> |
|
|
|
{ |
|
|
|
internal Tuple(T1 item1, T2 item2, T3 item3) |
|
|
|
{ |
|
|
|
public class Tuple<T1, T2, T3> { |
|
|
|
internal Tuple(T1 item1, T2 item2, T3 item3) { |
|
|
|
Item1 = item1; |
|
|
|
Item2 = item2; |
|
|
|
Item3 = item3; |
|
|
|
|
|
|
/// <typeparam name="T2">The type of the tuple's second component.</typeparam>
|
|
|
|
/// <typeparam name="T3">The type of the tuple's third component.</typeparam>
|
|
|
|
/// <typeparam name="T4">The type of the tuple's fourth component.</typeparam>
|
|
|
|
public class Tuple<T1, T2, T3, T4> |
|
|
|
{ |
|
|
|
internal Tuple(T1 item1, T2 item2, T3 item3, T4 item4) |
|
|
|
{ |
|
|
|
public class Tuple<T1, T2, T3, T4> { |
|
|
|
internal Tuple(T1 item1, T2 item2, T3 item3, T4 item4) { |
|
|
|
Item1 = item1; |
|
|
|
Item2 = item2; |
|
|
|
Item3 = item3; |
|
|
|