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

DomCR / ACadSharp / 24773630069

22 Apr 2026 10:33AM UTC coverage: 77.116% (+0.04%) from 77.076%
24773630069

Pull #1041

github

web-flow
Merge fa6c69b42 into 98bd2e4f4
Pull Request #1041: issue-1035 Add progress reporting to CAD file reading process

8457 of 11919 branches covered (70.95%)

Branch coverage included in aggregate %.

326 of 382 new or added lines in 12 files covered. (85.34%)

8 existing lines in 3 files now uncovered.

30454 of 38539 relevant lines covered (79.02%)

153339.89 hits per line

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

73.68
/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;
13,425✔
16

17
        /// <summary>
18
        /// Gets the unique handle that identifies this CAD object within the database.
19
        /// </summary>
NEW
20
        public ulong Handle { get; }
×
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 handle of the owner object, or <see langword="null"/> if no owner is specified.
29
        /// </summary>
NEW
30
        public ulong? OwnerHandle { get; }
×
31

32
        /// <summary>
33
        /// Gets the type name of the CAD object, corresponding to <see cref="CadObject.ObjectName"/>.
34
        /// </summary>
NEW
35
        public string Type { 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.Type = 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
}
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