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

DomCR / ACadSharp / 13726099261

07 Mar 2025 05:34PM UTC coverage: 76.062% (-0.02%) from 76.08%
13726099261

push

github

DomCR
fix

5460 of 7879 branches covered (69.3%)

Branch coverage included in aggregate %.

21533 of 27609 relevant lines covered (77.99%)

75868.1 hits per line

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

91.93
/src/ACadSharp/IO/DXF/DxfStreamReader/DxfObjectsSectionReader.cs
1
using ACadSharp.IO.Templates;
2
using ACadSharp.Objects;
3
using ACadSharp.Objects.Evaluations;
4
using System;
5
using System.Diagnostics;
6
using System.Linq;
7
using static ACadSharp.IO.Templates.CadEvaluationGraphTemplate;
8

9
namespace ACadSharp.IO.DXF
10
{
11
        internal class DxfObjectsSectionReader : DxfSectionReaderBase
12
        {
13
                public delegate bool ReadObjectDelegate<T>(CadTemplate template, DxfMap map) where T : CadObject;
14

15
                public DxfObjectsSectionReader(IDxfStreamReader reader, DxfDocumentBuilder builder)
16
                        : base(reader, builder)
206✔
17
                {
206✔
18
                }
206✔
19

20
                public override void Read()
21
                {
206✔
22
                        //Advance to the first value in the section
23
                        this._reader.ReadNext();
206✔
24

25
                        //Loop until the section ends
26
                        while (this._reader.ValueAsString != DxfFileToken.EndSection)
58,841✔
27
                        {
58,635✔
28
                                CadTemplate template = null;
58,635✔
29

30
                                try
31
                                {
58,635✔
32
                                        template = this.readObject();
58,635✔
33
                                }
58,635✔
34
                                catch (Exception ex)
×
35
                                {
×
36
                                        if (!this._builder.Configuration.Failsafe)
×
37
                                                throw;
×
38

39
                                        this._builder.Notify($"Error while reading an object at line {this._reader.Position}", NotificationType.Error, ex);
×
40

41
                                        while (this._reader.DxfCode != DxfCode.Start)
×
42
                                                this._reader.ReadNext();
×
43
                                }
×
44

45
                                if (template == null)
58,635✔
46
                                        continue;
752✔
47

48
                                //Add the object and the template to the builder
49
                                this._builder.AddTemplate(template);
57,883✔
50
                        }
57,883✔
51
                }
206✔
52

53
                private CadTemplate readObject()
54
                {
58,635✔
55
                        switch (this._reader.ValueAsString)
58,635!
56
                        {
57
                                case DxfFileToken.ObjectDBColor:
58
                                        return this.readObjectCodes<BookColor>(new CadNonGraphicalObjectTemplate(new BookColor()), this.readBookColor);
192✔
59
                                case DxfFileToken.ObjectDictionary:
60
                                        return this.readObjectCodes<CadDictionary>(new CadDictionaryTemplate(), this.readDictionary);
19,268✔
61
                                case DxfFileToken.ObjectDictionaryWithDefault:
62
                                        return this.readObjectCodes<CadDictionaryWithDefault>(new CadDictionaryWithDefaultTemplate(), this.readDictionaryWithDefault);
194✔
63
                                case DxfFileToken.ObjectLayout:
64
                                        return this.readObjectCodes<Layout>(new CadLayoutTemplate(), this.readLayout);
798✔
65
                                case DxfFileToken.ObjectEvalGraph:
66
                                        return this.readObjectCodes<EvaluationGraph>(new CadEvaluationGraphTemplate(), this.readEvaluationGraph);
192✔
67
                                case DxfFileToken.ObjectDictionaryVar:
68
                                        return this.readObjectCodes<DictionaryVariable>(new CadTemplate<DictionaryVariable>(new DictionaryVariable()), this.readObjectSubclassMap);
2,757✔
69
                                case DxfFileToken.ObjectPdfDefinition:
70
                                        return this.readObjectCodes<PdfUnderlayDefinition>(new CadNonGraphicalObjectTemplate(new PdfUnderlayDefinition()), this.readObjectSubclassMap);
×
71
                                case DxfFileToken.ObjectSortEntsTable:
72
                                        return this.readSortentsTable();
576✔
73
                                case DxfFileToken.ObjectGeoData:
74
                                        return this.readObjectCodes<GeoData>(new CadGeoDataTemplate(), this.readGeoData);
2✔
75
                                case DxfFileToken.ObjectScale:
76
                                        return this.readObjectCodes<Scale>(new CadTemplate<Scale>(new Scale()), this.readScale);
6,606✔
77
                                case DxfFileToken.ObjectTableContent:
78
                                        return this.readObjectCodes<TableContent>(new CadTableContentTemplate(), this.readTableContent);
384✔
79
                                case DxfFileToken.ObjectVisualStyle:
80
                                        return this.readObjectCodes<VisualStyle>(new CadTemplate<VisualStyle>(new VisualStyle()), this.readVisualStyle);
4,656✔
81
                                case DxfFileToken.ObjectXRecord:
82
                                        return this.readObjectCodes<XRecord>(new CadXRecordTemplate(), this.readXRecord);
15,154✔
83
                                default:
84
                                        DxfMap map = DxfMap.Create<CadObject>();
7,856✔
85
                                        CadUnknownNonGraphicalObjectTemplate unknownEntityTemplate = null;
7,856✔
86
                                        if (this._builder.DocumentToBuild.Classes.TryGetByName(this._reader.ValueAsString, out Classes.DxfClass dxfClass))
7,856✔
87
                                        {
7,104✔
88
                                                this._builder.Notify($"NonGraphicalObject not supported read as an UnknownNonGraphicalObject: {this._reader.ValueAsString}", NotificationType.NotImplemented);
7,104✔
89
                                                unknownEntityTemplate = new CadUnknownNonGraphicalObjectTemplate(new UnknownNonGraphicalObject(dxfClass));
7,104✔
90
                                        }
7,104✔
91
                                        else
92
                                        {
752✔
93
                                                this._builder.Notify($"UnknownNonGraphicalObject not supported: {this._reader.ValueAsString}", NotificationType.NotImplemented);
752✔
94
                                        }
752✔
95

96
                                        this._reader.ReadNext();
7,856✔
97

98
                                        do
99
                                        {
387,352✔
100
                                                if (unknownEntityTemplate != null && this._builder.KeepUnknownEntities)
387,352✔
101
                                                {
45,088✔
102
                                                        this.readCommonCodes(unknownEntityTemplate, out bool isExtendedData, map);
45,088✔
103
                                                        if (isExtendedData)
45,088✔
104
                                                                continue;
72✔
105
                                                }
45,016✔
106

107
                                                this._reader.ReadNext();
387,280✔
108
                                        }
387,280✔
109
                                        while (this._reader.DxfCode != DxfCode.Start);
387,352✔
110

111
                                        return unknownEntityTemplate;
7,856✔
112
                        }
113
                }
58,635✔
114

115
                protected CadTemplate readObjectCodes<T>(CadTemplate template, ReadObjectDelegate<T> readObject)
116
                        where T : CadObject
117
                {
50,203✔
118
                        this._reader.ReadNext();
50,203✔
119

120
                        DxfMap map = DxfMap.Create<T>();
50,203✔
121

122
                        while (this._reader.DxfCode != DxfCode.Start)
1,654,784✔
123
                        {
1,604,581✔
124
                                if (!readObject(template, map))
1,604,581✔
125
                                {
941,917✔
126
                                        this.readCommonCodes(template, out bool isExtendedData, map);
941,917✔
127
                                        if (isExtendedData)
941,917✔
128
                                                continue;
4,921✔
129
                                }
936,996✔
130

131
                                if (this._reader.DxfCode != DxfCode.Start)
1,599,660✔
132
                                        this._reader.ReadNext();
1,584,314✔
133
                        }
1,599,660✔
134

135
                        return template;
50,203✔
136
                }
50,203✔
137

138
                private bool readObjectSubclassMap(CadTemplate template, DxfMap map)
139
                {
16,542✔
140
                        switch (this._reader.Code)
16,542✔
141
                        {
142
                                default:
143
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[template.CadObject.SubclassMarker]);
16,542✔
144
                        }
145
                }
16,542✔
146

147
                private bool readPlotSettings(CadTemplate template, DxfMap map)
148
                {
25,252✔
149
                        switch (this._reader.Code)
25,252✔
150
                        {
151
                                default:
152
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.PlotSettings]);
25,252✔
153
                        }
154
                }
25,252✔
155

156
                private bool readEvaluationGraph(CadTemplate template, DxfMap map)
157
                {
1,536✔
158
                        CadEvaluationGraphTemplate tmp = template as CadEvaluationGraphTemplate;
1,536✔
159
                        EvaluationGraph evGraph = tmp.CadObject;
1,536✔
160

161
                        switch (this._reader.Code)
1,536✔
162
                        {
163
                                case 91:
164
                                        while (this._reader.Code == 91)
2,496✔
165
                                        {
2,304✔
166
                                                GraphNodeTemplate nodeTemplate = new GraphNodeTemplate();
2,304✔
167
                                                EvaluationGraph.Node node = nodeTemplate.Node;
2,304✔
168

169
                                                node.Index = this._reader.ValueAsInt;
2,304✔
170

171
                                                this._reader.ExpectedCode(93);
2,304✔
172
                                                node.Flags = this._reader.ValueAsInt;
2,304✔
173

174
                                                this._reader.ExpectedCode(95);
2,304✔
175
                                                node.NextNodeIndex = this._reader.ValueAsInt;
2,304✔
176

177
                                                this._reader.ExpectedCode(360);
2,304✔
178
                                                nodeTemplate.ExpressionHandle = this._reader.ValueAsHandle;
2,304✔
179

180
                                                this._reader.ExpectedCode(92);
2,304✔
181
                                                node.Data1 = this._reader.ValueAsInt;
2,304✔
182
                                                this._reader.ExpectedCode(92);
2,304✔
183
                                                node.Data2 = this._reader.ValueAsInt;
2,304✔
184
                                                this._reader.ExpectedCode(92);
2,304✔
185
                                                node.Data3 = this._reader.ValueAsInt;
2,304✔
186
                                                this._reader.ExpectedCode(92);
2,304✔
187
                                                node.Data4 = this._reader.ValueAsInt;
2,304✔
188

189
                                                this._reader.ReadNext();
2,304✔
190

191
                                                tmp.NodeTemplates.Add(nodeTemplate);
2,304✔
192
                                        }
2,304✔
193

194
                                        return this.checkObjectEnd(template, map, this.readEvaluationGraph);
192✔
195
                                case 92:
196
                                        //Edges
197
                                        while (this._reader.Code == 92)
2,112✔
198
                                        {
1,920✔
199
                                                this._reader.ExpectedCode(93);
1,920✔
200
                                                this._reader.ExpectedCode(94);
1,920✔
201
                                                this._reader.ExpectedCode(91);
1,920✔
202
                                                this._reader.ExpectedCode(91);
1,920✔
203
                                                this._reader.ExpectedCode(92);
1,920✔
204
                                                this._reader.ExpectedCode(92);
1,920✔
205
                                                this._reader.ExpectedCode(92);
1,920✔
206
                                                this._reader.ExpectedCode(92);
1,920✔
207
                                                this._reader.ExpectedCode(92);
1,920✔
208

209
                                                this._reader.ReadNext();
1,920✔
210
                                        }
1,920✔
211

212
                                        return this.checkObjectEnd(template, map, this.readEvaluationGraph);
192✔
213
                                default:
214
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.EvalGraph]);
1,152✔
215
                        }
216
                }
1,536✔
217

218
                private bool readLayout(CadTemplate template, DxfMap map)
219
                {
51,406✔
220
                        CadLayoutTemplate tmp = template as CadLayoutTemplate;
51,406✔
221

222
                        switch (this._reader.Code)
51,406✔
223
                        {
224
                                case 330:
225
                                        tmp.PaperSpaceBlockHandle = this._reader.ValueAsHandle;
1,596✔
226
                                        return true;
1,596✔
227
                                case 331:
228
                                        tmp.LasActiveViewportHandle = (this._reader.ValueAsHandle);
770✔
229
                                        return true;
770✔
230
                                default:
231
                                        if (!this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Layout]))
49,040✔
232
                                        {
25,252✔
233
                                                return this.readPlotSettings(template, map);
25,252✔
234
                                        }
235
                                        return true;
23,788✔
236
                        }
237
                }
51,406✔
238

239
                private bool readGeoData(CadTemplate template, DxfMap map)
240
                {
102✔
241
                        CadGeoDataTemplate tmp = template as CadGeoDataTemplate;
102✔
242

243
                        switch (this._reader.Code)
102✔
244
                        {
245
                                case 40 when tmp.CadObject.Version == GeoDataVersion.R2009:
2✔
246
                                        tmp.CadObject.ReferencePoint = new CSMath.XYZ(
1✔
247
                                                tmp.CadObject.ReferencePoint.X,
1✔
248
                                                this._reader.ValueAsDouble,
1✔
249
                                                tmp.CadObject.ReferencePoint.Z
1✔
250
                                                );
1✔
251
                                        return true;
1✔
252
                                case 41 when tmp.CadObject.Version == GeoDataVersion.R2009:
2✔
253
                                        tmp.CadObject.ReferencePoint = new CSMath.XYZ(
1✔
254
                                                this._reader.ValueAsDouble,
1✔
255
                                                tmp.CadObject.ReferencePoint.Y,
1✔
256
                                                tmp.CadObject.ReferencePoint.Z
1✔
257
                                                );
1✔
258
                                        return true;
1✔
259
                                case 42 when tmp.CadObject.Version == GeoDataVersion.R2009:
1✔
260
                                        tmp.CadObject.ReferencePoint = new CSMath.XYZ(
1✔
261
                                                tmp.CadObject.ReferencePoint.X,
1✔
262
                                                tmp.CadObject.ReferencePoint.Y,
1✔
263
                                                this._reader.ValueAsDouble
1✔
264
                                                );
1✔
265
                                        return true;
1✔
266
                                case 46 when tmp.CadObject.Version == GeoDataVersion.R2009:
1✔
267
                                        tmp.CadObject.HorizontalUnitScale = this._reader.ValueAsDouble;
1✔
268
                                        return true;
1✔
269
                                case 52 when tmp.CadObject.Version == GeoDataVersion.R2009:
1✔
270
                                        double angle = System.Math.PI / 2.0 - this._reader.ValueAsAngle;
1✔
271
                                        tmp.CadObject.NorthDirection = new CSMath.XY(Math.Cos(angle), Math.Sin(angle));
1✔
272
                                        return true;
1✔
273
                                // Number of Geo-Mesh points
274
                                case 93:
275
                                        var npts = this._reader.ValueAsInt;
3✔
276
                                        for (int i = 0; i < npts; i++)
54✔
277
                                        {
24✔
278
                                                this._reader.ReadNext();
24✔
279
                                                double sourceX = this._reader.ValueAsDouble;
24✔
280
                                                this._reader.ReadNext();
24✔
281
                                                double sourceY = this._reader.ValueAsDouble;
24✔
282

283
                                                this._reader.ReadNext();
24✔
284
                                                double destX = this._reader.ValueAsDouble;
24✔
285
                                                this._reader.ReadNext();
24✔
286
                                                double destY = this._reader.ValueAsDouble;
24✔
287

288
                                                tmp.CadObject.Points.Add(new GeoData.GeoMeshPoint
24✔
289
                                                {
24✔
290
                                                        Source = new CSMath.XY(sourceX, sourceY),
24✔
291
                                                        Destination = new CSMath.XY(destX, destY)
24✔
292
                                                });
24✔
293
                                        }
24✔
294
                                        return true;
3✔
295
                                // Number of Geo-Mesh points
296
                                case 96:
297
                                        var nfaces = this._reader.ValueAsInt;
2✔
298
                                        for (int i = 0; i < nfaces; i++)
4!
299
                                        {
×
300
                                                this._reader.ReadNext();
×
301
                                                Debug.Assert(this._reader.Code == 97);
×
302
                                                int index1 = this._reader.ValueAsInt;
×
303
                                                this._reader.ReadNext();
×
304
                                                Debug.Assert(this._reader.Code == 98);
×
305
                                                int index2 = this._reader.ValueAsInt;
×
306
                                                this._reader.ReadNext();
×
307
                                                Debug.Assert(this._reader.Code == 99);
×
308
                                                int index3 = this._reader.ValueAsInt;
×
309

310
                                                tmp.CadObject.Faces.Add(new GeoData.GeoMeshFace
×
311
                                                {
×
312
                                                        Index1 = index1,
×
313
                                                        Index2 = index2,
×
314
                                                        Index3 = index3
×
315
                                                });
×
316
                                        }
×
317
                                        return true;
2✔
318
                                case 303:
319
                                        tmp.CadObject.CoordinateSystemDefinition += this._reader.ValueAsString;
13✔
320
                                        return true;
13✔
321
                                //Obsolete codes for version GeoDataVersion.R2009
322
                                case 3:
323
                                case 4:
324
                                case 14:
325
                                case 24:
326
                                case 15:
327
                                case 25:
328
                                case 43:
329
                                case 44:
330
                                case 45:
331
                                case 94:
332
                                case 293:
333
                                case 16:
334
                                case 26:
335
                                case 17:
336
                                case 27:
337
                                case 54:
338
                                case 140:
339
                                case 304:
340
                                case 292:
341
                                        return true;
19✔
342
                                default:
343
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[tmp.CadObject.SubclassMarker]);
60✔
344
                        }
345
                }
102✔
346

347
                private bool readScale(CadTemplate template, DxfMap map)
348
                {
59,250✔
349
                        switch (this._reader.Code)
59,250✔
350
                        {
351
                                // Undocumented codes
352
                                case 70:
353
                                        //Always 0
354
                                        return true;
6,606✔
355
                                default:
356
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Scale]);
52,644✔
357
                        }
358
                }
59,250✔
359

360
                private bool readTableContent(CadTemplate template, DxfMap map)
361
                {
888,576✔
362
                        switch (this._reader.Code)
888,576✔
363
                        {
364
                                default:
365
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.TableContent]);
888,576✔
366
                        }
367
                }
888,576✔
368

369
                private bool readVisualStyle(CadTemplate template, DxfMap map)
370
                {
346,908✔
371
                        switch (this._reader.Code)
346,908✔
372
                        {
373
                                // Undocumented codes
374
                                case 176:
375
                                case 177:
376
                                case 420:
377
                                        return true;
119,122✔
378
                                default:
379
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.VisualStyle]);
227,786✔
380
                        }
381
                }
346,908✔
382

383
                private bool readXRecord(CadTemplate template, DxfMap map)
384
                {
58,184✔
385
                        CadXRecordTemplate tmp = template as CadXRecordTemplate;
58,184✔
386

387
                        switch (this._reader.Code)
58,184✔
388
                        {
389
                                case 100 when this._reader.ValueAsString == DxfSubclassMarker.XRecord:
15,154✔
390
                                        this.readXRecordEntries(tmp);
15,154✔
391
                                        return true;
15,154✔
392
                                default:
393
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.XRecord]);
43,030✔
394
                        }
395
                }
58,184✔
396

397
                private void readXRecordEntries(CadXRecordTemplate template)
398
                {
15,154✔
399
                        this._reader.ReadNext();
15,154✔
400

401
                        while (this._reader.DxfCode != DxfCode.Start)
830,680✔
402
                        {
815,526✔
403
                                switch (this._reader.GroupCodeValue)
815,526!
404
                                {
405
                                        case GroupCodeValueType.Handle:
406
                                                template.AddHandleReference(this._reader.Code, this._reader.ValueAsHandle);
×
407
                                                break;
×
408
                                        default:
409
                                                template.CadObject.CreateEntry(this._reader.Code, this._reader.Value);
815,526✔
410
                                                break;
815,526✔
411
                                }
412

413
                                this._reader.ReadNext();
815,526✔
414
                        }
815,526✔
415
                }
15,154✔
416

417
                private bool readBookColor(CadTemplate template, DxfMap map)
418
                {
1,376✔
419
                        CadNonGraphicalObjectTemplate tmp = template as CadNonGraphicalObjectTemplate;
1,376✔
420
                        BookColor color = tmp.CadObject as BookColor;
1,376✔
421

422
                        switch (this._reader.Code)
1,376✔
423
                        {
424
                                case 430:
425
                                        color.Name = this._reader.ValueAsString;
160✔
426
                                        return true;
160✔
427
                                default:
428
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.DbColor]);
1,216✔
429
                        }
430
                }
1,376✔
431

432
                private bool readDictionary(CadTemplate template, DxfMap map)
433
                {
180,699✔
434
                        CadDictionaryTemplate tmp = template as CadDictionaryTemplate;
180,699✔
435
                        CadDictionary cadDictionary = tmp.CadObject;
180,699✔
436

437
                        switch (this._reader.Code)
180,699✔
438
                        {
439
                                case 280:
440
                                        cadDictionary.HardOwnerFlag = this._reader.ValueAsBool;
13,185✔
441
                                        return true;
13,185✔
442
                                case 281:
443
                                        cadDictionary.ClonningFlags = (DictionaryCloningFlags)this._reader.Value;
19,462✔
444
                                        return true;
19,462✔
445
                                case 3:
446
                                        tmp.Entries.Add(this._reader.ValueAsString, null);
40,814✔
447
                                        return true;
40,814✔
448
                                case 350: // Soft-owner ID/handle to entry object 
449
                                case 360: // Hard-owner ID/handle to entry object
450
                                        tmp.Entries[tmp.Entries.LastOrDefault().Key] = this._reader.ValueAsHandle;
40,814✔
451
                                        return true;
40,814✔
452
                                default:
453
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Dictionary]);
66,424✔
454
                        }
455
                }
180,699✔
456

457
                private bool readDictionaryWithDefault(CadTemplate template, DxfMap map)
458
                {
1,746✔
459
                        CadDictionaryWithDefaultTemplate tmp = template as CadDictionaryWithDefaultTemplate;
1,746✔
460

461
                        switch (this._reader.Code)
1,746✔
462
                        {
463
                                case 340:
464
                                        tmp.DefaultEntryHandle = this._reader.ValueAsHandle;
194✔
465
                                        return true;
194✔
466
                                default:
467
                                        if (!this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.DictionaryWithDefault]))
1,552!
468
                                        {
1,552✔
469
                                                return this.readDictionary(template, map);
1,552✔
470
                                        }
471
                                        return true;
×
472
                        }
473
                }
1,746✔
474

475
                private CadTemplate readSortentsTable()
476
                {
576✔
477
                        SortEntitiesTable sortTable = new SortEntitiesTable();
576✔
478
                        CadSortensTableTemplate template = new CadSortensTableTemplate(sortTable);
576✔
479

480
                        //Jump the 0 marker
481
                        this._reader.ReadNext();
576✔
482

483
                        this.readCommonObjectData(template);
576✔
484

485
                        System.Diagnostics.Debug.Assert(DxfSubclassMarker.SortentsTable == this._reader.ValueAsString);
576✔
486

487
                        //Jump the 100 marker
488
                        this._reader.ReadNext();
576✔
489

490
                        (ulong?, ulong?) pair = (null, null);
576✔
491

492
                        while (this._reader.DxfCode != DxfCode.Start)
4,224✔
493
                        {
3,648✔
494
                                switch (this._reader.Code)
3,648!
495
                                {
496
                                        case 5:
497
                                                pair.Item1 = this._reader.ValueAsHandle;
1,536✔
498
                                                break;
1,536✔
499
                                        case 330:
500
                                                template.BlockOwnerHandle = this._reader.ValueAsHandle;
576✔
501
                                                break;
576✔
502
                                        case 331:
503
                                                pair.Item2 = this._reader.ValueAsHandle;
1,536✔
504
                                                break;
1,536✔
505
                                        default:
506
                                                this._builder.Notify($"Group Code not handled {this._reader.GroupCodeValue} for {typeof(SortEntitiesTable)}, code : {this._reader.Code} | value : {this._reader.ValueAsString}");
×
507
                                                break;
×
508
                                }
509

510
                                if (pair.Item1.HasValue && pair.Item2.HasValue)
3,648✔
511
                                {
1,536✔
512
                                        template.Values.Add((pair.Item1.Value, pair.Item2.Value));
1,536✔
513
                                        pair = (null, null);
1,536✔
514
                                }
1,536✔
515

516
                                this._reader.ReadNext();
3,648✔
517
                        }
3,648✔
518

519
                        return template;
576✔
520
                }
576✔
521
        }
522
}
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