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

DomCR / ACadSharp / 20490822353

24 Dec 2025 05:15PM UTC coverage: 76.65% (-0.4%) from 77.021%
20490822353

Pull #924

github

web-flow
Merge 99883e83c into 68e4e7c16
Pull Request #924: issue 923 - dim style override

7695 of 10931 branches covered (70.4%)

Branch coverage included in aggregate %.

22 of 179 new or added lines in 9 files covered. (12.29%)

4 existing lines in 4 files now uncovered.

28372 of 36123 relevant lines covered (78.54%)

158725.09 hits per line

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

89.19
/src/ACadSharp/DxfMapBase.cs
1
using ACadSharp.Attributes;
2
using System;
3
using System.Collections.Generic;
4
using System.Reflection;
5

6
namespace ACadSharp
7
{
8
        public abstract class DxfMapBase
9
        {
10
                /// <summary>
11
                /// Name of the subclass map
12
                /// </summary>
13
                public string Name { get; set; }
1,056,566✔
14

15
                /// <summary>
16
                /// Properties linked to a dxf code
17
                /// </summary>
18
                public Dictionary<int, DxfProperty> DxfProperties { get; } = new Dictionary<int, DxfProperty>();
7,174,708✔
19

20
                protected static void addClassProperties(DxfMapBase map, Type type, CadObject obj = null)
21
                {
53,512✔
22
                        foreach (var item in cadObjectMapDxf(type))
954,780✔
23
                        {
397,122✔
24
                                map.DxfProperties.Add(item.Key, item.Value);
397,122✔
25
                                if (obj != null)
397,122!
NEW
26
                                {
×
NEW
27
                                        item.Value.StoredValue = item.Value.GetValue(obj);
×
NEW
28
                                }
×
29
                        }
397,122✔
30
                }
53,512✔
31

32
                protected static IEnumerable<KeyValuePair<int, DxfProperty>> cadObjectMapDxf(Type type)
33
                {
53,512✔
34
                        foreach (PropertyInfo p in type.GetProperties(BindingFlags.Public
1,271,754✔
35
                                                                                                                | BindingFlags.Instance
53,512✔
36
                                                                                                                | BindingFlags.DeclaredOnly))
53,512✔
37
                        {
555,609✔
38
                                DxfCodeValueAttribute att = p.GetCustomAttribute<DxfCodeValueAttribute>();
555,609✔
39
                                if (att == null)
555,609✔
40
                                {
231,446✔
41
                                        continue;
231,446✔
42
                                }
43

44
                                foreach (var item in att.ValueCodes)
1,766,733✔
45
                                {
397,122✔
46
                                        yield return new KeyValuePair<int, DxfProperty>((int)item, new DxfProperty((int)item, p));
397,122✔
47
                                }
397,122✔
48
                        }
324,163✔
49
                }
53,512✔
50
        }
51
}
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