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

DomCR / ACadSharp / 10546434957

25 Aug 2024 11:09AM UTC coverage: 75.832% (-0.2%) from 75.987%
10546434957

push

github

web-flow
Merge pull request #428 from DomCR/UnknownNonGraphicalObject

Unknown None Graphical Object

4853 of 7047 branches covered (68.87%)

Branch coverage included in aggregate %.

54 of 62 new or added lines in 11 files covered. (87.1%)

69 existing lines in 25 files now uncovered.

19285 of 24784 relevant lines covered (77.81%)

33698.64 hits per line

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

62.96
/src/ACadSharp/Entities/UnknownEntity.cs
1
using ACadSharp.Classes;
2
using CSMath;
3

4
namespace ACadSharp.Entities
5
{
6
        /// <summary>
7
        /// Class that holds the basic information for an unknown <see cref="Entity"/>.
8
        /// </summary>
9
        /// <remarks>
10
        /// Unknown entities may appear in the <see cref="CadDocument"/> if the cad file contains proxies or entities not yet supported by ACadSharp.
11
        /// </remarks>
12
        public class UnknownEntity : Entity
13
        {
14
                /// <inheritdoc/>
15
                public override ObjectType ObjectType => ObjectType.UNDEFINED;
×
16

17
                /// <inheritdoc/>
18
                public override string ObjectName
19
                {
20
                        get
21
                        {
60✔
22
                                if (this.DxfClass == null)
60!
23
                                {
×
24
                                        return "UNKNOWN";
×
25
                                }
26
                                else
27
                                {
60✔
28
                                        return this.DxfClass.DxfName;
60✔
29
                                }
30
                        }
60✔
31
                }
32

33
                /// <inheritdoc/>
34
                public override string SubclassMarker
35
                {
36
                        get
37
                        {
6,548✔
38
                                if (this.DxfClass == null)
6,548!
39
                                {
×
40
                                        return DxfSubclassMarker.Entity;
×
41
                                }
42
                                else
43
                                {
6,548✔
44
                                        return this.DxfClass.CppClassName;
6,548✔
45
                                }
46
                        }
6,548✔
47
                }
48

49
                /// <summary>
50
                /// Dxf class linked to this entity.
51
                /// </summary>
52
                public DxfClass DxfClass { get; }
13,216✔
53

54
                internal UnknownEntity(DxfClass dxfClass)
454✔
55
                {
454✔
56
                        this.DxfClass = dxfClass;
454✔
57
                }
454✔
58

59
                /// <inheritdoc/>
60
                /// <remarks>
61
                /// An Unknown Entity does not have any geometric shape, therfore it's bounding box will be always 0
62
                /// </remarks>
63
                public override BoundingBox GetBoundingBox()
64
                {
×
NEW
65
                        return BoundingBox.Null;
×
66
                }
×
67
        }
68
}
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