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

DomCR / ACadSharp / 20457200384

23 Dec 2025 09:42AM UTC coverage: 76.854% (-0.3%) from 77.148%
20457200384

Pull #924

github

web-flow
Merge fde81b197 into 886606be2
Pull Request #924: issue 923 - dim style override

7696 of 10903 branches covered (70.59%)

Branch coverage included in aggregate %.

49 of 176 new or added lines in 8 files covered. (27.84%)

123 existing lines in 7 files now uncovered.

28361 of 36013 relevant lines covered (78.75%)

159201.5 hits per line

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

56.52
/src/ACadSharp/CadSystemVariable.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Header;
3
using System.Reflection;
4

5
namespace ACadSharp
6
{
7
        public class CadSystemVariable : DxfPropertyBase<CadSystemVariableAttribute>
8
        {
9
                /// <summary>
10
                /// Gets the name associated with this attribute.
11
                /// </summary>
UNCOV
12
                public string Name { get { return this._attributeData.Name; } }
×
13

14
                public CadSystemVariable(PropertyInfo property) : base(property)
162,597✔
15
                {
162,597✔
16
                }
162,597✔
17

18
                /// <summary>
19
                /// Retrieves the value of a system variable from the specified CAD header based on the provided code and reference
20
                /// type.
21
                /// </summary>
22
                /// <remarks>The method determines how to retrieve the value based on the reference type associated with the
23
                /// system variable. The returned value may be a direct property, a handle, a name, a count, or a raw value, depending
24
                /// on the context. Callers should cast the result to the expected type based on the variable being
25
                /// accessed.</remarks>
26
                /// <param name="code">The code identifying the system variable to retrieve. The interpretation of this code depends on the reference
27
                /// type associated with the variable.</param>
28
                /// <param name="header">The CAD header object from which to retrieve the system variable value. Cannot be null.</param>
29
                /// <returns>An object representing the value of the requested system variable. The type and meaning of the returned value
30
                /// depend on the reference type and the specified code.</returns>
31
                public object GetSystemValue(int code, CadHeader header)
32
                {
13,455✔
33
                        switch (this._attributeData.ReferenceType)
13,455!
34
                        {
35
                                case DxfReferenceType.Unprocess:
NEW
36
                                        return this._property.GetValue(header);
×
37
                                case DxfReferenceType.Handle:
NEW
38
                                        return this.getHandledValue(header);
×
39
                                case DxfReferenceType.Name:
NEW
40
                                        return this.getNamedValue(header);
×
41
                                case DxfReferenceType.Count:
NEW
42
                                        return this.getCounterValue(header);
×
43
                                case DxfReferenceType.None:
44
                                default:
45
                                        return getRawValue(code, header);
13,455✔
46
                        }
47
                }
13,455✔
48

49
                /// <summary>
50
                /// Gets the value of the specified property from the provided <see cref="CadHeader"/> instance.
51
                /// </summary>
52
                /// <param name="header">The <see cref="CadHeader"/> instance from which to retrieve the property value. Cannot be null.</param>
53
                /// <returns>The value of the property for the specified <see cref="CadHeader"/> instance.</returns>
54
                public object GetValue(CadHeader header)
55
                {
13,455✔
56
                        return this._property.GetValue(header);
13,455✔
57
                }
13,455✔
58
        }
59
}
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

© 2025 Coveralls, Inc