Skip to content

Commit 4be4919

Browse files
committed
Simplify
1 parent 9735d11 commit 4be4919

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Orm/Xtensive.Orm/Orm/Rse/MappedColumn.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Xtensive.Orm.Rse;
1212
/// Mapped column of the <see cref="RecordSetHeader"/>.
1313
/// </summary>
1414
[Serializable]
15-
public sealed class MappedColumn(ColumnInfoRef columnInfoRef, string name, ColNum index, Type type)
15+
public class MappedColumn(ColumnInfoRef columnInfoRef, string name, ColNum index, Type type)
1616
: Column(name, index, type)
1717
{
1818
private const string ToStringFormat = "{0} = {1}";
@@ -65,11 +65,7 @@ public MappedColumn(ColumnInfoRef columnInfoRef, ColNum index, Type type)
6565
}
6666

6767
internal sealed class DerivedMappedColumn(string name, ColNum index, Type type, Column origin, ColumnInfoRef columnInfoRef)
68-
: DerivedColumn(name, index, type, origin)
68+
: MappedColumn(columnInfoRef, name, index, type)
6969
{
70-
public ColumnInfoRef ColumnInfoRef { get; } = columnInfoRef;
71-
72-
public override Column Clone(ColNum newIndex) => new MappedColumn(ColumnInfoRef, Name, newIndex, Type);
73-
74-
public override Column Clone(string newName) => new DerivedMappedColumn(newName, Index, Type, Origin, ColumnInfoRef);
70+
public override Column Origin => origin ?? this;
7571
}

0 commit comments

Comments
 (0)