• 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/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)
×
10
                {
×
11
                }
×
12

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

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

23
                                try
24
                                {
×
25
                                        template = this.readEntity();
×
26
                                }
×
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)
×
39
                                        continue;
×
40

41
                                //Add the object and the template to the builder
42
                                this._builder.AddTemplate(template);
×
43

44
                                if (template.OwnerHandle == null)
×
45
                                {
×
46
                                        this._builder.ModelSpaceEntities.Add(template.CadObject.Handle);
×
47
                                }
×
48
                        }
×
49
                }
×
50
        }
51
}
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