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

DomCR / ACadSharp / 12550157427

30 Dec 2024 06:03PM UTC coverage: 75.001% (-0.4%) from 75.393%
12550157427

push

github

web-flow
Merge pull request #517 from DomCR/issue-503_dwg-xdata

Issue 503 dwg xdata

5140 of 7558 branches covered (68.01%)

Branch coverage included in aggregate %.

114 of 256 new or added lines in 25 files covered. (44.53%)

27 existing lines in 4 files now uncovered.

20487 of 26611 relevant lines covered (76.99%)

36386.36 hits per line

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

48.0
/src/ACadSharp/XData/ExtendedDataCollection.cs
1
using ACadSharp.Tables;
2
using System.Collections.Generic;
3

4
namespace ACadSharp.XData
5
{
6
        public class ExtendedDataDictionary
7
        {
8
                public IEnumerable<KeyValuePair<AppId, ExtendedData>> Entries { get { return this._data; } }
7,056✔
9

NEW
10
                public CadObject Owner { get; }
×
11

12
                private Dictionary<AppId, ExtendedData> _data = new Dictionary<AppId, ExtendedData>();
606,037✔
13

14
                public ExtendedDataDictionary(CadObject owner)
606,037✔
15
                {
606,037✔
16
                        this.Owner = owner;
606,037✔
17
                }
606,037✔
18

19
                public void Add(AppId app)
NEW
20
                {
×
NEW
21
                        this._data.Add(app, new ExtendedData(app));
×
NEW
22
                }
×
23

24
                /// <summary>Add ExtendedData for a specific AppId to the Dictionary.</summary>
25
                /// <param name="app">The AppId object.</param>
26
                /// <param name="records">The ExtendedData records.</param>
27
                public void Add(AppId app, IEnumerable<ExtendedDataRecord> records)
28
                {
20,573✔
29
                        this._data.Add(app, new ExtendedData(app, records));
20,573✔
30
                }
20,573✔
31

32
                /// <summary>Get ExtendedData for a specific AppId from the Dictionary.</summary>
33
                /// <param name="app">The AppId object.</param>
34
                public ExtendedData Get(AppId app)
35
                {
×
36
                        return this._data[app];
×
37
                }
×
38

39
                /// <summary>Try to get ExtendedData for a specific AppId from the Dictionary.</summary>
40
                /// <param name="app">The AppId object.</param>
41
                /// <param name="value">ExtendedData object.</param>
42
                public bool TryGet(AppId app, out ExtendedData value)
43
                {
×
44
                        return this._data.TryGetValue(app, out value);
×
45
                }
×
46

47
                /// <summary>Check whether a AppId is given in the Dictionary.</summary>
48
                /// <param name="app">The AppId object.</param>
49
                public bool ContainsKey(AppId app)
50
                {
×
51
                        return this._data.ContainsKey(app);
×
52
                }
×
53

54
                /// <summary>Clear all Dictionary entries.</summary>
55
                public void Clear()
56
                {
7,977✔
57
                        this._data.Clear();
7,977✔
58
                }
7,977✔
59
        }
60
}
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