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

DomCR / ACadSharp / 30556126935

30 Jul 2026 03:19PM UTC coverage: 76.839% (+1.0%) from 75.805%
30556126935

Pull #1151

github

web-flow
Merge 7f2b563d8 into 219e5fc4a
Pull Request #1151: Dynamic parameters

9787 of 13734 branches covered (71.26%)

Branch coverage included in aggregate %.

2988 of 3445 new or added lines in 70 files covered. (86.73%)

74 existing lines in 12 files now uncovered.

34836 of 44339 relevant lines covered (78.57%)

142210.9 hits per line

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

89.66
/src/ACadSharp/Objects/NonGraphicalObject.cs
1
using ACadSharp.Attributes;
2
using System;
3

4
namespace ACadSharp.Objects;
5

6
/// <summary>
7
/// The standard class for a basic CAD non-graphical object.
8
/// </summary>
9
[DxfSubClass(null, true)]
10
public abstract class NonGraphicalObject : CadObject, INamedCadObject
11
{
12
        public event EventHandler<OnNameChangedArgs> OnNameChanged;
13

14
        /// <inheritdoc/>
15
        /// <remarks>
16
        /// The name of a <see cref="NonGraphicalObject"/> will be used as the name of the entry when the owner is a <see cref="CadDictionary"/>
17
        /// otherwise the name may not be saved if there is no dxf code assigned to the <see cref="CadObject"/>.
18
        /// </remarks>
19
        public virtual string Name
20
        {
21
                get { return this._name; }
1,287,474✔
22
                set
23
                {
170,378✔
24
                        OnNameChanged?.Invoke(this, new OnNameChangedArgs(this._name, value));
170,378✔
25
                        this._name = value;
170,378✔
26
                }
170,378✔
27
        }
28

29
        /// <inheritdoc/>
30
        public override ObjectType ObjectType => ObjectType.UNLISTED;
30✔
31

32
        private string _name = string.Empty;
220,743✔
33

34
        /// <summary>
35
        /// Default constructor.
36
        /// </summary>
37
        public NonGraphicalObject()
201,090✔
38
        { }
402,180✔
39

40
        /// <summary>
41
        /// Initialize a <see cref="NonGraphicalObject"/> with an specific name.
42
        /// </summary>
43
        /// <param name="name"></param>
44
        public NonGraphicalObject(string name)
19,653✔
45
        {
19,653✔
46
                this.Name = name;
19,653✔
47
        }
19,653✔
48

49
        /// <inheritdoc/>
50
        public override CadObject Clone()
51
        {
17,314✔
52
                NonGraphicalObject clone = (NonGraphicalObject)base.Clone();
17,314✔
53
                clone.OnNameChanged = null;
17,314✔
54
                return clone;
17,314✔
55
        }
17,314✔
56

57
        /// <inheritdoc/>
58
        public override string ToString()
59
        {
4✔
60
                if (string.IsNullOrEmpty(this.Name))
4!
61
                {
4✔
62
                        return $"{this.ObjectName}:{this.Handle}";
4✔
63
                }
64
                else
UNCOV
65
                {
×
NEW
66
                        return $"{this.ObjectName}:{this.Name}:{this.Handle}";
×
67
                }
68
        }
4✔
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc