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

DomCR / ACadSharp / 14885819796

07 May 2025 02:23PM UTC coverage: 75.518%. First build
14885819796

Pull #659

github

web-flow
Merge 5cf33a810 into 9eb0eaeae
Pull Request #659: issue 627

5742 of 8357 branches covered (68.71%)

Branch coverage included in aggregate %.

22 of 25 new or added lines in 5 files covered. (88.0%)

22892 of 29560 relevant lines covered (77.44%)

83096.66 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)
×
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

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!
NEW
46
                                {
×
47

NEW
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

© 2025 Coveralls, Inc