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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

0.0
/src/ACadSharp/Objects/MultiLeaderObjectContextData.LeaderLine.cs
1
using System;
2
using System.Collections.Generic;
3
using ACadSharp.Attributes;
4
using ACadSharp.Tables;
5
using CSMath;
6

7
namespace ACadSharp.Objects
8
{
9
        public partial class MultiLeaderObjectContextData
10
        {
11
                /// <summary>
12
                ///        Represents a leader line
13
                /// </summary>
14
                /// <remarks>
15
                /// Appears as 304        DXF: “LEADER_LINE“
16
                /// </remarks>
17
                public class LeaderLine : ICloneable
18
                {
19
                        /// <summary>
20
                        /// Gets or sets a <see cref="BlockRecord"/> containig elements
21
                        /// to be dawn as arrow symbol.
22
                        /// </summary>
23
                        [DxfCodeValue(DxfReferenceType.Handle, 341)]
UNCOV
24
                        public BlockRecord Arrowhead { get; set; }
×
25

26
                        /// <summary>
27
                        /// Arrowhead size
28
                        /// </summary>
29
                        [DxfCodeValue(40)]
UNCOV
30
                        public double ArrowheadSize { get; set; }
×
31

32
                        /// <summary>
33
                        /// Break info count
34
                        /// </summary>
UNCOV
35
                        public int BreakInfoCount { get; set; }
×
36

37
                        /// <summary>
38
                        /// Leader line index.
39
                        /// </summary>
40
                        [DxfCodeValue(91)]
UNCOV
41
                        public int Index { get; set; }
×
42

43
                        /// <summary>
44
                        /// Line color
45
                        /// </summary>
46
                        [DxfCodeValue(92)]
UNCOV
47
                        public Color LineColor { get; set; }
×
48

49
                        /// <summary>
50
                        /// Line type
51
                        /// </summary>
52
                        [DxfCodeValue(DxfReferenceType.Handle, 340)]
53
                        public LineType LineType
54
                        {
UNCOV
55
                                get { return this._lineType; }
×
56
                                set
57
                                {
×
58
                                        if (value == null)
×
59
                                        {
×
60
                                                _lineType = null;
×
61
                                                return;
×
62
                                        }
63

64
                                        if (this.Document != null)
×
65
                                        {
×
66
                                                if (this.Document.LineTypes.TryGetValue(((LineType)value).Name, out LineType lt))
×
67
                                                {
×
68
                                                        this._lineType = lt;
×
69
                                                }
×
70
                                                else
71
                                                {
×
72
                                                        this._lineType = value;
×
73
                                                        this.Document.LineTypes.Add(this._lineType);
×
74
                                                }
×
75
                                        }
×
76
                                }
×
77
                        }
78

79
                        /// <summary>
80
                        /// Line weight
81
                        /// </summary>
82
                        [DxfCodeValue(171)]
UNCOV
83
                        public LineWeightType LineWeight { get; set; }
×
84

85
                        /// <summary>
86
                        /// Override flags
87
                        /// </summary>
88
                        [DxfCodeValue(93)]
UNCOV
89
                        public LeaderLinePropertOverrideFlags OverrideFlags { get; set; }
×
90

91
                        //R2010
92
                        /// <summary>
93
                        /// Leader type
94
                        /// </summary>
95
                        [DxfCodeValue(170)]
UNCOV
96
                        public MultiLeaderPathType PathType { get; set; }
×
97

98
                        /// <summary>
99
                        /// Get the list of points of this <see cref="LeaderLine"/>.
100
                        /// </summary>
UNCOV
101
                        public IList<XYZ> Points { get; private set; } = new List<XYZ>();
×
102

103
                        /// <summary>
104
                        /// Segment index
105
                        /// </summary>
106
                        [DxfCodeValue(90)]
107
                        public int SegmentIndex { get; set; }
×
108

109
                        /// <summary>
110
                        /// Start/end point pairs
111
                        /// </summary>
UNCOV
112
                        public IList<StartEndPointPair> StartEndPoints { get; private set; } = new List<StartEndPointPair>();
×
113

UNCOV
114
                        internal CadDocument Document { get; set; }
×
115

116
                        private LineType _lineType;
117

UNCOV
118
                        public LeaderLine()
×
UNCOV
119
                        { }
×
120

121
                        public void AssignDocument(CadDocument doc)
UNCOV
122
                        {
×
UNCOV
123
                                this.Document = doc;
×
124

UNCOV
125
                                if (_lineType != null)
×
126
                                {
×
127
                                        if (doc.LineTypes.TryGetValue(_lineType.Name, out LineType existing))
×
128
                                        {
×
129
                                                this._lineType = existing;
×
130
                                        }
×
131
                                        else
132
                                        {
×
133
                                                doc.LineTypes.Add(_lineType);
×
134
                                        }
×
135
                                }
×
136

UNCOV
137
                                doc.LineTypes.OnRemove += this.tableOnRemove;
×
UNCOV
138
                        }
×
139

140
                        public object Clone()
141
                        {
×
142
                                LeaderLine clone = (LeaderLine)this.MemberwiseClone();
×
143

144
                                clone.LineType = (LineType)this.LineType?.Clone();
×
145
                                clone.Arrowhead = (BlockRecord)this.Arrowhead?.Clone();
×
146

147
                                clone.Points = new List<XYZ>();
×
148
                                foreach (var point in this.Points)
×
149
                                {
×
150
                                        clone.Points.Add(point);
×
151
                                }
×
152

153
                                clone.StartEndPoints = new List<StartEndPointPair>();
×
154
                                foreach (var startEndPoint in this.StartEndPoints)
×
155
                                {
×
156
                                        clone.StartEndPoints.Add((StartEndPointPair)startEndPoint.Clone());
×
157
                                }
×
158

159
                                return clone;
×
160
                        }
×
161

162
                        public void UassignDocument()
UNCOV
163
                        {
×
UNCOV
164
                                this.Document.LineTypes.OnRemove -= this.tableOnRemove;
×
165

UNCOV
166
                                this.Document = null;
×
167

UNCOV
168
                                this._lineType = (LineType)this._lineType?.Clone();
×
UNCOV
169
                        }
×
170

171
                        private void tableOnRemove(object sender, CollectionChangedEventArgs e)
172
                        {
×
173
                                if (e.Item.Equals(this._lineType))
×
174
                                {
×
175
                                        this._lineType = null;
×
176
                                }
×
177
                        }
×
178
                }
179
        }
180
}
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