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

DomCR / ACadSharp / 24788042622

22 Apr 2026 03:47PM UTC coverage: 77.123% (+0.05%) from 77.076%
24788042622

push

github

web-flow
Merge pull request #1041 from DomCR/issue/1035_parse-hook

issue-1035 Add progress reporting to CAD file reading process

8457 of 11919 branches covered (70.95%)

Branch coverage included in aggregate %.

332 of 385 new or added lines in 12 files covered. (86.23%)

8 existing lines in 3 files now uncovered.

30460 of 38542 relevant lines covered (79.03%)

153328.51 hits per line

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

68.18
/src/ACadSharp/IO/CadObjectData.cs
1
namespace ACadSharp.IO;
2

3
/// <summary>
4
/// Represents metadata and associated information for a CAD object, including its handle, type, name, ownership, and
5
/// optional entity data.
6
/// </summary>
7
/// <remarks>This struct provides a read-only view of key properties for a CAD object, which may be used for
8
/// serialization, inspection, or referencing objects within a CAD database. All properties are immutable after
9
/// construction.</remarks>
10
public readonly struct CadObjectData
11
{
12
        /// <summary>
13
        /// Gets the optional entity-specific data associated with this CAD object.
14
        /// </summary>
15
        public EntityData? EntityData { get; } = null;
23,098✔
16

17
        /// <summary>
18
        /// Gets the unique handle that identifies this CAD object within the database.
19
        /// </summary>
20
        public ulong Handle { get; }
6,659✔
21

22
        /// <summary>
23
        /// Gets the name of the CAD object, if it implements <see cref="INamedCadObject"/>; otherwise, <see langword="null"/>.
24
        /// </summary>
NEW
25
        public string Name { get; }
×
26

27
        /// <summary>
28
        /// Gets the name of the CAD object type, which can be used to determine the specific type of object.
29
        /// </summary>
NEW
30
        public string ObjectName { get; }
×
31

32
        /// <summary>
33
        /// Gets the handle of the owner object, or <see langword="null"/> if no owner is specified.
34
        /// </summary>
NEW
35
        public ulong? OwnerHandle { get; }
×
36

37
        /// <summary>
38
        /// Gets the handle of the extension dictionary associated with this object, or <see langword="null"/> if none is assigned.
39
        /// </summary>
NEW
40
        public ulong? XDictHandle { get; }
×
41

42
        /// <summary>
43
        /// Initializes a new instance of the <see cref="CadObjectData"/> struct from the specified <see cref="CadObject"/>.
44
        /// </summary>
45
        /// <param name="cadObject">The CAD object from which to extract handle, type, and name information.</param>
46
        /// <param name="ownerHandle">The optional handle of the owning object.</param>
47
        /// <param name="xDictHandle">The optional handle of the extension dictionary.</param>
48
        /// <param name="entityData">The optional entity-specific data to associate with this object.</param>
49
        public CadObjectData(
50
                CadObject cadObject,
51
                ulong? ownerHandle = null,
52
                ulong? xDictHandle = null,
53
                EntityData? entityData = null)
54
        {
13,425✔
55
                this.Handle = cadObject.Handle;
13,425✔
56
                this.ObjectName = cadObject.ObjectName;
13,425✔
57

58
                if (cadObject is INamedCadObject named)
13,425✔
59
                {
7,371✔
60
                        this.Name = named.Name;
7,371✔
61
                }
7,371✔
62

63
                this.OwnerHandle = ownerHandle;
13,425✔
64
                this.XDictHandle = xDictHandle;
13,425✔
65
                this.EntityData = entityData;
13,425✔
66
        }
13,425✔
67

68
        /// <inheritdoc/>
69
        public override string ToString()
NEW
70
        {
×
NEW
71
                return $"{ObjectName}:{Handle}";
×
NEW
72
        }
×
73
}
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