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

DomCR / ACadSharp / 17342033852

30 Aug 2025 09:17AM UTC coverage: 78.14% (-0.1%) from 78.243%
17342033852

Pull #765

github

web-flow
Merge 4c398521d into 55b1f37a7
Pull Request #765: Dwg xrecords

6557 of 9127 branches covered (71.84%)

Branch coverage included in aggregate %.

8 of 58 new or added lines in 2 files covered. (13.79%)

6 existing lines in 2 files now uncovered.

25428 of 31806 relevant lines covered (79.95%)

105830.87 hits per line

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

21.43
/src/ACadSharp/Objects/XRecord.Entry.cs
1
namespace ACadSharp.Objects
2
{
3
        public partial class XRecord
4
        {
5
                public class Entry
6
                {
7
                        public int Code { get; }
8,681✔
8

9
                        public object Value { get; set; }
1,567,838✔
10

11
                        public GroupCodeValueType GroupCode
12
                        {
13
                                get
14
                                {
×
15
                                        return GroupCodeValue.TransformValue(this.Code);
×
16
                                }
×
17
                        }
18

19
                        public bool HasLinkedObject
20
                        {
21
                                get
22
                                {
×
23
                                        switch (this.GroupCode)
×
24
                                        {
25
                                                case GroupCodeValueType.Handle:
26
                                                case GroupCodeValueType.ObjectId:
27
                                                case GroupCodeValueType.ExtendedDataHandle:
28
                                                        return true;
×
29
                                                default:
30
                                                        return false;
×
31
                                        }
32
                                }
×
33
                        }
34

35
                        public XRecord Owner { get; set; }
1,565,208✔
36

37
                        internal Entry(int code, object value, XRecord owner)
1,565,208✔
38
                        {
1,565,208✔
39
                                this.Code = code;
1,565,208✔
40
                                this.Value = value;
1,565,208✔
41
                                this.Owner = owner;
1,565,208✔
42
                        }
1,565,208✔
43

44
                        public CadObject GetReference()
NEW
45
                        {
×
NEW
46
                                if (!this.HasLinkedObject)
×
NEW
47
                                        return null;
×
48

NEW
49
                                if (this.Value is CadObject cadObject)
×
NEW
50
                                {
×
NEW
51
                                        if(cadObject.Document != this.Owner.Document)
×
NEW
52
                                        {
×
NEW
53
                                                return null;
×
54
                                        }
55

NEW
56
                                        return cadObject;
×
57
                                }
58
                                else
NEW
59
                                {
×
NEW
60
                                        return null;
×
61
                                }
NEW
62
                        }
×
63

64
                        /// <inheritdoc/>
65
                        public override string ToString()
66
                        {
×
67
                                return $"{Code}:{Value}";
×
68
                        }
×
69
                }
70
        }
71
}
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