Skip to content

Commit fceab31

Browse files
committed
TupleStruct refactoring
1 parent 823897b commit fceab31

File tree

4 files changed

+214
-34
lines changed

4 files changed

+214
-34
lines changed

Jetbrains.Annotations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ internal enum ImplicitUseKindFlags
399399
/// </summary>
400400
InstantiatedWithFixedConstructorSignature = 4,
401401
/// <summary>Indicates implicit instantiation of a type.</summary>
402-
InstantiatedNoFixedConstructorSignature = 8,
402+
InstantiatedNoFixedConstructorSignature = 8
403403
}
404404

405405
/// <summary>
@@ -904,7 +904,7 @@ internal enum AssertionConditionType
904904
/// <summary>Marked parameter should be evaluated to null value.</summary>
905905
IS_NULL = 2,
906906
/// <summary>Marked parameter should be evaluated to not null value.</summary>
907-
IS_NOT_NULL = 3,
907+
IS_NOT_NULL = 3
908908
}
909909

910910
/// <summary>

Main/src/Structures/ITuple.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using JetBrains.Annotations;
2+
3+
namespace CodeJam
4+
{
5+
/// <summary>
6+
/// Common interface for all tuples.
7+
/// </summary>
8+
[PublicAPI]
9+
public interface ITuple
10+
{
11+
/// <summary>
12+
/// Tuple rank (count of values).
13+
/// </summary>
14+
int Rank { get; }
15+
16+
/// <summary>
17+
/// Returns value by it index.
18+
/// </summary>
19+
/// <param name="index">Index of value, zero based.</param>
20+
object this[int index] { get; }
21+
}
22+
}

0 commit comments

Comments
 (0)