4
4
// Created by: Alexey Kochetov
5
5
// Created: 2008.08.01
6
6
7
- using System ;
8
- using System . Collections . Generic ;
9
7
using System . Diagnostics ;
10
8
using Xtensive . Collections ;
11
9
12
-
13
- namespace Xtensive . Orm . Model
14
- {
15
- /// <summary>
16
- /// Describes a group of columns that belongs to the specified <see cref="TypeInfoRef"/>.
17
- /// </summary>
18
- [ Serializable ]
19
- [ DebuggerDisplay ( "Type = {TypeInfoRef}, Keys = {Keys}, Columns = {Columns}" ) ]
20
- public readonly struct ColumnGroup
21
- {
22
- /// <summary>
23
- /// Gets the <see cref="Model.TypeInfoRef"/> pointing to <see cref="TypeInfo"/>
24
- /// this column group belongs to.
25
- /// </summary>
26
- public TypeInfoRef TypeInfoRef { get ; }
27
-
28
- /// <summary>
29
- /// Gets the indexes of key columns.
30
- /// </summary>
31
- public IReadOnlyList < ColNum > Keys { get ; }
32
-
33
- /// <summary>
34
- /// Gets the indexes of all columns.
35
- /// </summary>
36
- public IReadOnlyList < ColNum > Columns { get ; }
37
-
38
-
39
- // Constructors
40
-
41
- /// <summary>
42
- /// Initializes a new instance of this class.
43
- /// </summary>
44
- /// <param name="type">The type.</param>
45
- /// <param name="keys">The keys.</param>
46
- /// <param name="columns">The columns.</param>
47
- public ColumnGroup ( TypeInfoRef type , IReadOnlyList < ColNum > keys , IReadOnlyList < ColNum > columns )
48
- {
49
- TypeInfoRef = type ;
50
- Keys = keys ;
51
- Columns = columns ;
52
- }
53
- }
54
- }
10
+ namespace Xtensive . Orm . Model ;
11
+
12
+ /// <summary>
13
+ /// Describes a group of columns that belongs to the specified <see cref="TypeInfoRef"/>.
14
+ /// </summary>
15
+ [ Serializable ]
16
+ [ DebuggerDisplay ( "Type = {TypeInfoRef}, Keys = {Keys}, Columns = {Columns}" ) ]
17
+ public record struct ColumnGroup
18
+ (
19
+ TypeInfoRef TypeInfoRef ,
20
+ IReadOnlyList < ColNum > Keys , // indexes of key columns.
21
+ IReadOnlyList < ColNum > Columns // indexes of all columns.
22
+ ) ;
0 commit comments