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

DomCR / ACadSharp / 12905761471

22 Jan 2025 10:03AM UTC coverage: 2.0% (-74.0%) from 75.963%
12905761471

push

github

DomCR
version 1.0.6

104 of 7676 branches covered (1.35%)

Branch coverage included in aggregate %.

590 of 27024 relevant lines covered (2.18%)

5.13 hits per line

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

0.0
/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; }
×
14

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

20
                protected static void addClassProperties(DxfMapBase map, Type type)
21
                {
×
22
                        foreach (var item in cadObjectMapDxf(type))
×
23
                        {
×
24
                                map.DxfProperties.Add(item.Key, item.Value);
×
25
                        }
×
26
                }
×
27

28
                protected static IEnumerable<KeyValuePair<int, DxfProperty>> cadObjectMapDxf(Type type)
29
                {
×
30
                        foreach (PropertyInfo p in type.GetProperties(BindingFlags.Public
×
31
                                                                                                                | BindingFlags.Instance
×
32
                                                                                                                | BindingFlags.DeclaredOnly))
×
33
                        {
×
34
                                DxfCodeValueAttribute att = p.GetCustomAttribute<DxfCodeValueAttribute>();
×
35
                                if (att == null)
×
36
                                        continue;
×
37

38
                                if (att.ReferenceType == DxfReferenceType.Count)
×
39
                                {
×
40

41
                                }
×
42

43
                                foreach (var item in att.ValueCodes)
×
44
                                {
×
45
                                        yield return new KeyValuePair<int, DxfProperty>((int)item, new DxfProperty((int)item, p));
×
46
                                }
×
47
                        }
×
48
                }
×
49
        }
50
}
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