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

DomCR / ACadSharp / 14887897407

07 May 2025 04:00PM UTC coverage: 75.489% (+0.03%) from 75.458%
14887897407

Pull #657

github

web-flow
Merge 23453c8d4 into eb394c3fa
Pull Request #657: issue-649 XRecord

5741 of 8357 branches covered (68.7%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 1 file covered. (0.0%)

155 existing lines in 10 files now uncovered.

22882 of 29560 relevant lines covered (77.41%)

83098.02 hits per line

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

69.39
/src/ACadSharp/IO/DXF/DxfStreamReader/DxfEntitiesSectionReader.cs
1
using ACadSharp.Entities;
2
using ACadSharp.IO.Templates;
3
using System;
4

5
namespace ACadSharp.IO.DXF
6
{
7
        internal class DxfEntitiesSectionReader : DxfSectionReaderBase
8
        {
9
                public DxfEntitiesSectionReader(IDxfStreamReader reader, DxfDocumentBuilder builder)
10
                        : base(reader, builder)
280✔
11
                {
280✔
12
                }
280✔
13

14
                public override void Read()
15
                {
280✔
16
                        //Advance to the first value in the section
17
                        this._reader.ReadNext();
280✔
18

19
                        //Loop until the section ends
20
                        while (this._reader.ValueAsString != DxfFileToken.EndSection)
64,538✔
21
                        {
64,258✔
22
                                CadEntityTemplate template = null;
64,258✔
23

24
                                try
25
                                {
64,258✔
26
                                        template = this.readEntity();
64,258✔
27
                                }
64,258✔
28
                                catch (Exception ex)
×
29
                                {
×
30
                                        if (!this._builder.Configuration.Failsafe)
×
UNCOV
31
                                                throw;
×
32

UNCOV
33
                                        this._builder.Notify($"Error while reading an entity at line {this._reader.Position}", NotificationType.Error, ex);
×
34

35
                                        while (this._reader.DxfCode != DxfCode.Start)
×
36
                                                this._reader.ReadNext();
×
UNCOV
37
                                }
×
38

39
                                if (template == null)
64,258✔
40
                                        continue;
1,116✔
41

42
                                //Add the object and the template to the builder
43
                                this._builder.AddTemplate(template);
63,142✔
44

45
                                if(template.CadObject.Handle == 51790)
63,142!
UNCOV
46
                                {
×
47

UNCOV
48
                                }
×
49

50
                                if (template.OwnerHandle == null)
63,142✔
51
                                {
27,394✔
52
                                        this._builder.ModelSpaceEntities.Add(template.CadObject.Handle);
27,394✔
53
                                }
27,394✔
54
                                else if (this._builder.TryGetObjectTemplate(template.OwnerHandle, out CadBlockRecordTemplate owner))
35,748✔
55
                                {
29,568✔
56
                                        owner.OwnedObjectsHandlers.Add(template.CadObject.Handle);
29,568✔
57
                                }
29,568✔
58
                        }
63,142✔
59
                }
280✔
60
        }
61
}
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