• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DomCR / ACadSharp / 26020083793

18 May 2026 07:38AM UTC coverage: 76.862% (+0.01%) from 76.848%
26020083793

push

github

DomCR
Merge branch 'master' of https://github.com/DomCR/ACadSharp

8608 of 12139 branches covered (70.91%)

Branch coverage included in aggregate %.

20 of 27 new or added lines in 3 files covered. (74.07%)

8 existing lines in 3 files now uncovered.

30896 of 39257 relevant lines covered (78.7%)

157679.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.77
/src/ACadSharp/Entities/TableEntity.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Objects;
3
using ACadSharp.Tables;
4
using CSMath;
5
using System;
6
using System.Collections.Generic;
7

8
namespace ACadSharp.Entities;
9

10
/// <summary>
11
/// Represents a <see cref="TableEntity"/> entity.
12
/// </summary>
13
/// <remarks>
14
/// Object name <see cref="DxfFileToken.EntityTable"/> <br/>
15
/// Dxf class name <see cref="DxfSubclassMarker.TableEntity"/>
16
/// </remarks>
17
[DxfName(DxfFileToken.EntityTable)]
18
[DxfSubClass(DxfSubclassMarker.TableEntity)]
19
public partial class TableEntity : Insert
20
{
21
        /// <summary>
22
        /// Gets the table break data that defines how the table should be divided across breaks, including spacing, flow direction,
23
        /// </summary>
24
        public TableBreakData BreakData { get; } = new();
740✔
25

26
        /// <summary>
27
        /// Gets the collection of columns in the table entity.
28
        /// </summary>
29
        [DxfCodeValue(DxfReferenceType.Count, 92)]
30
        public List<Column> Columns { get { return this.Content.Columns; } }
48,531✔
31

32
        /// <summary>
33
        /// Gets or sets a value indicating whether bread data is available.
34
        /// </summary>
35
        public bool HasBreadData { get; set; }
261✔
36

37
        /// <summary>
38
        /// Horizontal direction vector
39
        /// </summary>
40
        [DxfCodeValue(11, 21, 31)]
41
        public XYZ HorizontalDirection { get; set; }
2,892✔
42

43
        /// <inheritdoc/>
44
        public override string ObjectName => DxfFileToken.EntityTable;
2,197✔
45

46
        /// <inheritdoc/>
47
        public override ObjectType ObjectType => ObjectType.UNLISTED;
3✔
48

49
        /// <summary>
50
        /// Flag for an override of border color.
51
        /// </summary>
52
        [DxfCodeValue(94)]
53
        public bool OverrideBorderColor { get; set; }
435✔
54

55
        /// <summary>
56
        /// Flag for an override of border line weight.
57
        /// </summary>
58
        [DxfCodeValue(95)]
59
        public bool OverrideBorderLineWeight { get; set; }
435✔
60

61
        /// <summary>
62
        /// Flag for an override of border visibility.
63
        /// </summary>
64
        [DxfCodeValue(96)]
65
        public bool OverrideBorderVisibility { get; set; }
435✔
66

67
        /// <summary>
68
        /// Flag for an override.
69
        /// </summary>
70
        [DxfCodeValue(93)]
71
        public bool OverrideFlag { get; set; }
435✔
72

73
        /// <summary>
74
        /// Table rows.
75
        /// </summary>
76
        [DxfCodeValue(DxfReferenceType.Count, 91)]
77
        public List<Row> Rows { get { return this.Content.Rows; } }
52,359✔
78

79
        /// <summary>
80
        /// Gets or sets the table style associated with this object.
81
        /// </summary>
82
        [DxfCodeValue(DxfReferenceType.Handle, 342)]
83
        public TableStyle Style
84
        {
85
                get { return this.Content.Style; }
3,591✔
86
                set
87
                {
702✔
88
                        this.Content.Style = value;
702✔
89
                }
702✔
90
        }
91

92
        /// <inheritdoc/>
93
        public override string SubclassMarker => DxfSubclassMarker.TableEntity;
142,236✔
94

95
        /// <summary>
96
        /// Flag for table value.
97
        /// </summary>
98
        [DxfCodeValue(90)]
99
        public int ValueFlag { get; set; }
603✔
100

101
        /// <summary>
102
        /// Table data version
103
        /// </summary>
104
        [DxfCodeValue(280)]
105
        public short Version { get; set; }
219✔
106

107
        internal List<BreakRowRange> BreakRowRanges { get; set; } = new();
872✔
108

109
        internal TableContent Content { get; set; } = new();
36,482✔
110

111
        [DxfCodeValue(DxfReferenceType.Handle, 343)]
UNCOV
112
        internal BlockRecord TableBlock { get { return this.Block; } }
×
113

114
        /// <summary>
115
        /// Initializes a new instance of the <see cref="TableEntity"/> class.
116
        /// </summary>
117
        public TableEntity() : base()
740✔
118
        {
740✔
119
        }
740✔
120

121
        /// <summary>
122
        /// Initializes a new instance of the <see cref="TableEntity"/> class
123
        /// bound to the given anonymous <see cref="BlockRecord"/> that will host the table cache.
124
        /// </summary>
125
        /// <param name="block">Anonymous block record used as the table's owning block (DXF 343).</param>
126
        /// <exception cref="ArgumentNullException"></exception>
NEW
127
        public TableEntity(BlockRecord block) : base()
×
NEW
128
        {
×
NEW
129
                if (block is null) throw new ArgumentNullException(nameof(block));
×
NEW
130
                this.Block = block;
×
NEW
131
        }
×
132

133
        /// <inheritdoc/>
134
        public override CadObject Clone()
135
        {
2✔
136
                TableEntity clone = (TableEntity)base.Clone();
2✔
137

138
                return clone;
2✔
139
        }
2✔
140

141
        /// <inheritdoc/>
142
        public override BoundingBox GetBoundingBox()
UNCOV
143
        {
×
UNCOV
144
                return BoundingBox.Null;
×
UNCOV
145
        }
×
146

147
        /// <summary>
148
        /// Retrieves the cell at the specified row and column indices.
149
        /// </summary>
150
        /// <param name="row">The zero-based index of the row containing the cell to retrieve.</param>
151
        /// <param name="column">The zero-based index of the column containing the cell to retrieve.</param>
152
        /// <returns>The cell located at the specified row and column.</returns>
153
        public Cell GetCell(int row, int column)
154
        {
38✔
155
                return this.Rows[row].Cells[column];
38✔
156
        }
38✔
157

158
        /// <summary>
159
        /// Gets the collection of merged cell ranges associated with this table.
160
        /// </summary>
NEW
161
        public List<CellRange> MergedCellRanges { get { return this.Content.MergedCellRanges; } }
×
162

163
        /// <summary>
164
        /// Gets the cell style override applied at the table level.
165
        /// Use this to set table-level overrides such as flow direction (FlowDirectionBottomToTop).
166
        /// </summary>
NEW
167
        public TableStyle.CellStyle CellStyleOverride { get { return this.Content.CellStyleOverride; } }
×
168
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc