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

DomCR / ACadSharp / 17737836230

15 Sep 2025 03:12PM UTC coverage: 2.092% (-76.2%) from 78.245%
17737836230

push

github

web-flow
Merge pull request #790 from DomCR/addflag-refactor

addflag refactor

141 of 9225 branches covered (1.53%)

Branch coverage included in aggregate %.

0 of 93 new or added lines in 10 files covered. (0.0%)

24910 existing lines in 372 files now uncovered.

724 of 32119 relevant lines covered (2.25%)

5.76 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.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)
UNCOV
10
                        : base(reader, builder)
×
UNCOV
11
                {
×
UNCOV
12
                }
×
13

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

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

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

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();
×
37
                                }
×
38

UNCOV
39
                                if (template == null)
×
UNCOV
40
                                        continue;
×
41

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

UNCOV
45
                                if(template.CadObject.Handle == 51790)
×
46
                                {
×
47

48
                                }
×
49

UNCOV
50
                                if (template.OwnerHandle == null)
×
UNCOV
51
                                {
×
UNCOV
52
                                        this._builder.ModelSpaceEntities.Add(template.CadObject.Handle);
×
UNCOV
53
                                }
×
UNCOV
54
                                else if (this._builder.TryGetObjectTemplate(template.OwnerHandle, out CadBlockRecordTemplate owner))
×
UNCOV
55
                                {
×
UNCOV
56
                                        owner.OwnedObjectsHandlers.Add(template.CadObject.Handle);
×
UNCOV
57
                                }
×
UNCOV
58
                        }
×
UNCOV
59
                }
×
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