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

DomCR / ACadSharp / 17344811653

30 Aug 2025 02:15PM UTC coverage: 78.262% (+0.02%) from 78.243%
17344811653

push

github

web-flow
Merge pull request #765 from DomCR/dwg-xrecords

Dwg xrecords

6570 of 9127 branches covered (71.98%)

Branch coverage included in aggregate %.

19 of 60 new or added lines in 2 files covered. (31.67%)

16 existing lines in 4 files now uncovered.

25465 of 31806 relevant lines covered (80.06%)

105831.2 hits per line

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

66.67
/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,705✔
8

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

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

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

35
                        public XRecord Owner { get; set; }
1,565,216✔
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()
45
                        {
8✔
46
                                if (!this.HasLinkedObject)
8!
NEW
47
                                        return null;
×
48

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

56
                                        return cadObject;
8✔
57
                                }
58
                                else
NEW
59
                                {
×
NEW
60
                                        return null;
×
61
                                }
62
                        }
8✔
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