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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

0.0
/src/ACadSharp/Objects/BookColor.cs
1
using ACadSharp.Attributes;
2
using CSUtilities.Extensions;
3
using System;
4
using System.Linq;
5

6
namespace ACadSharp.Objects
7
{
8
        /// <summary>
9
        /// Represents a <see cref="BookColor"/> object.
10
        /// </summary>
11
        /// <remarks>
12
        /// Object name <see cref="DxfFileToken.ObjectDBColor"/> <br/>
13
        /// Dxf class name <see cref="DxfSubclassMarker.DbColor"/>
14
        /// </remarks>
15
        [DxfName(DxfFileToken.ObjectDBColor)]
16
        [DxfSubClass(DxfSubclassMarker.DbColor)]
17
        public class BookColor : NonGraphicalObject
18
        {
19
                /// <inheritdoc/>
UNCOV
20
                public override string ObjectName => DxfFileToken.ObjectDBColor;
×
21

22
                /// <inheritdoc/>
23
                public override string SubclassMarker => DxfSubclassMarker.DbColor;
×
24

25
                /// <summary>
26
                /// Returns the full name of the color, following the structure BookName$ColorName,
27
                /// if when set doesn't follow this structure only the name will be changed.
28
                /// </summary>
29
                /// <inheritdoc/>
30
                public override string Name
31
                {
32
                        get
UNCOV
33
                        {
×
UNCOV
34
                                if (this.ColorName.IsNullOrEmpty())
×
UNCOV
35
                                {
×
UNCOV
36
                                        return string.Empty;
×
37
                                }
38
                                else
UNCOV
39
                                {
×
UNCOV
40
                                        return $"{this.BookName}${this.ColorName}";
×
41
                                }
UNCOV
42
                        }
×
43
                        set
UNCOV
44
                        {
×
UNCOV
45
                                if (value.Contains('$'))
×
UNCOV
46
                                {
×
UNCOV
47
                                        base.Name = value;
×
48

UNCOV
49
                                        this.BookName = value.Split('$').First();
×
UNCOV
50
                                        this.ColorName = value.Split('$').Last();
×
UNCOV
51
                                }
×
52
                                else
UNCOV
53
                                {
×
UNCOV
54
                                        this.ColorName = value;
×
UNCOV
55
                                }
×
UNCOV
56
                        }
×
57
                }
58

59
                /// <summary>
60
                /// Color name.
61
                /// </summary>
UNCOV
62
                public string ColorName { get; set; }
×
63

64
                /// <summary>
65
                /// Book name where the color is stored.
66
                /// </summary>
UNCOV
67
                public string BookName { get; set; }
×
68

69
                [DxfCodeValue(62, 420)]
UNCOV
70
                public Color Color { get; set; }
×
71

72
                /// <inheritdoc/>
UNCOV
73
                public BookColor() : base() { }
×
74

75
                /// <summary>
76
                /// Initialize a <see cref="BookColor"/> with an specific name.
77
                /// </summary>
78
                /// <param name="name"></param>
UNCOV
79
                public BookColor(string name) : base(name)
×
UNCOV
80
                {
×
UNCOV
81
                }
×
82

83
                /// <summary>
84
                /// Initialize a <see cref="BookColor"/> with an specific book and color name.
85
                /// </summary>
86
                /// <param name="name"></param>
87
                /// <param name="bookName"></param>
88
                public BookColor(string name, string bookName) : base()
×
89
                {
×
90
                        this.Name = name;
×
91
                        this.BookName = bookName;
×
92
                }
×
93
        }
94
}
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