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

DomCR / ACadSharp / 19746807496

27 Nov 2025 08:04PM UTC coverage: 78.083% (+0.004%) from 78.079%
19746807496

Pull #889

github

web-flow
Merge d4c913b6d into b4f4477ec
Pull Request #889: LineType Segments.Text Reader/Writer

7507 of 10433 branches covered (71.95%)

Branch coverage included in aggregate %.

134 of 152 new or added lines in 2 files covered. (88.16%)

59 existing lines in 7 files now uncovered.

27823 of 34814 relevant lines covered (79.92%)

97895.59 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.Blocks;
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)
294✔
11
                {
294✔
12
                }
294✔
13

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

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

24
                                try
25
                                {
49,320✔
26
                                        template = this.readEntity();
49,320✔
27
                                }
49,320✔
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)
49,320✔
UNCOV
40
                                        continue;
×
41

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

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