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

DomCR / ACadSharp / 18987410744

31 Oct 2025 11:15PM UTC coverage: 77.821% (+0.09%) from 77.732%
18987410744

push

github

web-flow
Merge pull request #851 from DomCR/issue-845_ac1009polyline

issue 845

6952 of 9729 branches covered (71.46%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

5 existing lines in 3 files now uncovered.

26729 of 33551 relevant lines covered (79.67%)

101998.47 hits per line

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

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

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

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

18
                        //Loop until the section ends
19
                        while (this._reader.ValueAsString != DxfFileToken.EndSection)
49,614✔
20
                        {
49,320✔
21
                                CadEntityTemplate template = null;
49,320✔
22

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

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

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

38
                                if (template == null)
49,320✔
UNCOV
39
                                        continue;
×
40

41
                                //Add the object and the template to the builder
42
                                this._builder.AddTemplate(template);
49,320✔
43

44
                                if (template.OwnerHandle == null)
49,320✔
45
                                {
6,360✔
46
                                        this._builder.ModelSpaceEntities.Add(template.CadObject);
6,360✔
47
                                }
6,360✔
48
                                else if (this._builder.TryGetObjectTemplate(template.OwnerHandle, out CadBlockRecordTemplate owner))
42,960✔
49
                                {
36,252✔
50
                                        owner.OwnedObjectsHandlers.Add(template.CadObject.Handle);
36,252✔
51
                                }
36,252✔
52
                        }
49,320✔
53
                }
294✔
54
        }
55
}
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