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

DomCR / ACadSharp / 12544237206

30 Dec 2024 08:54AM UTC coverage: 75.108% (-0.3%) from 75.369%
12544237206

Pull #517

github

web-flow
Merge c177724ff into d2df0c87e
Pull Request #517: Issue 503 dwg xdata

5139 of 7542 branches covered (68.14%)

Branch coverage included in aggregate %.

114 of 227 new or added lines in 25 files covered. (50.22%)

20 existing lines in 4 files now uncovered.

20491 of 26582 relevant lines covered (77.09%)

36427.46 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