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

DomCR / ACadSharp / 13113864037

03 Feb 2025 12:49PM UTC coverage: 75.826% (-0.4%) from 76.226%
13113864037

Pull #546

github

web-flow
Merge d11d9fa5d into da8587f47
Pull Request #546: Issue 529 geodata

5408 of 7857 branches covered (68.83%)

Branch coverage included in aggregate %.

178 of 394 new or added lines in 14 files covered. (45.18%)

2 existing lines in 1 file now uncovered.

21455 of 27570 relevant lines covered (77.82%)

39133.9 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)
152✔
17
                {
152✔
18
                }
152✔
19

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

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

30
                                try
31
                                {
32,319✔
32
                                        template = this.readObject();
32,319✔
33
                                }
32,319✔
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)
32,319✔
46
                                        continue;
510✔
47

48
                                //Add the object and the template to the builder
49
                                this._builder.AddTemplate(template);
31,809✔
50
                        }
31,809✔
51
                }
152✔
52

53
                private CadTemplate readObject()
54
                {
32,319✔
55
                        switch (this._reader.ValueAsString)
32,319!
56
                        {
57
                                case DxfFileToken.ObjectDBColor:
58
                                        return this.readObjectCodes<BookColor>(new CadNonGraphicalObjectTemplate(new BookColor()), this.readBookColor);
10✔
59
                                case DxfFileToken.ObjectDictionary:
60
                                        return this.readObjectCodes<CadDictionary>(new CadDictionaryTemplate(), this.readDictionary);
10,289✔
61
                                case DxfFileToken.ObjectDictionaryWithDefault:
62
                                        return this.readObjectCodes<CadDictionaryWithDefault>(new CadDictionaryWithDefaultTemplate(), this.readDictionaryWithDefault);
140✔
63
                                case DxfFileToken.ObjectLayout:
64
                                        return this.readObjectCodes<Layout>(new CadLayoutTemplate(), this.readLayout);
564✔
65
                                case DxfFileToken.ObjectEvalGraph:
66
                                        return this.readObjectCodes<EvaluationGraph>(new CadEvaluationGraphTemplate(), this.readEvaluationGraph);
1✔
67
                                case DxfFileToken.ObjectDictionaryVar:
68
                                        return this.readObjectCodes<DictionaryVariable>(new CadTemplate<DictionaryVariable>(new DictionaryVariable()), this.readObjectSubclassMap);
1,915✔
69
                                case DxfFileToken.ObjectPdfDefinition:
70
                                        return this.readObjectCodes<PdfUnderlayDefinition>(new CadNonGraphicalObjectTemplate(new PdfUnderlayDefinition()), this.readObjectSubclassMap);
×
71
                                case DxfFileToken.ObjectSortEntsTable:
72
                                        return this.readSortentsTable();
246✔
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);
4,824✔
77
                                case DxfFileToken.ObjectTableContent:
78
                                        return this.readObjectCodes<TableContent>(new CadTableContentTemplate(), this.readTableContent);
121✔
79
                                case DxfFileToken.ObjectVisualStyle:
80
                                        return this.readObjectCodes<VisualStyle>(new CadTemplate<VisualStyle>(new VisualStyle()), this.readVisualStyle);
3,360✔
81
                                case DxfFileToken.ObjectXRecord:
82
                                        return this.readObjectCodes<XRecord>(new CadXRecordTemplate(), this.readXRecord);
7,785✔
83
                                default:
84
                                        DxfMap map = DxfMap.Create<CadObject>();
3,062✔
85
                                        CadUnknownNonGraphicalObjectTemplate unknownEntityTemplate = null;
3,062✔
86
                                        if (this._builder.DocumentToBuild.Classes.TryGetByName(this._reader.ValueAsString, out Classes.DxfClass dxfClass))
3,062✔
87
                                        {
2,552✔
88
                                                this._builder.Notify($"NonGraphicalObject not supported read as an UnknownNonGraphicalObject: {this._reader.ValueAsString}", NotificationType.NotImplemented);
2,552✔
89
                                                unknownEntityTemplate = new CadUnknownNonGraphicalObjectTemplate(new UnknownNonGraphicalObject(dxfClass));
2,552✔
90
                                        }
2,552✔
91
                                        else
92
                                        {
510✔
93
                                                this._builder.Notify($"UnknownNonGraphicalObject not supported: {this._reader.ValueAsString}", NotificationType.NotImplemented);
510✔
94
                                        }
510✔
95

96
                                        this._reader.ReadNext();
3,062✔
97

98
                                        do
99
                                        {
175,029✔
100
                                                if (unknownEntityTemplate != null && this._builder.KeepUnknownEntities)
175,029✔
101
                                                {
15,600✔
102
                                                        this.readCommonCodes(unknownEntityTemplate, out bool isExtendedData, map);
15,600✔
103
                                                        if (isExtendedData)
15,600✔
104
                                                                continue;
26✔
105
                                                }
15,574✔
106

107
                                                this._reader.ReadNext();
175,003✔
108
                                        }
175,003✔
109
                                        while (this._reader.DxfCode != DxfCode.Start);
175,029✔
110

111
                                        return unknownEntityTemplate;
3,062✔
112
                        }
113
                }
32,319✔
114

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

120
                        DxfMap map = DxfMap.Create<T>();
29,011✔
121

122
                        while (this._reader.DxfCode != DxfCode.Start)
881,583✔
123
                        {
852,572✔
124
                                if (!readObject(template, map))
852,572✔
125
                                {
448,352✔
126
                                        this.readCommonCodes(template, out bool isExtendedData, map);
448,352✔
127
                                        if (isExtendedData)
448,352✔
128
                                                continue;
3,211✔
129
                                }
445,141✔
130

131
                                if (this._reader.DxfCode != DxfCode.Start)
849,361✔
132
                                        this._reader.ReadNext();
841,575✔
133
                        }
849,361✔
134

135
                        return template;
29,011✔
136
                }
29,011✔
137

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

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

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

161
                        switch (this._reader.Code)
8✔
162
                        {
163
                                case 91:
164
                                        while (this._reader.Code == 91)
13✔
165
                                        {
12✔
166
                                                GraphNodeTemplate nodeTemplate = new GraphNodeTemplate();
12✔
167
                                                EvaluationGraph.Node node = nodeTemplate.Node;
12✔
168

169
                                                node.Index = this._reader.ValueAsInt;
12✔
170

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

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

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

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

189
                                                this._reader.ReadNext();
12✔
190

191
                                                tmp.NodeTemplates.Add(nodeTemplate);
12✔
192
                                        }
12✔
193

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

209
                                                this._reader.ReadNext();
10✔
210
                                        }
10✔
211

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

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

222
                        switch (this._reader.Code)
36,218✔
223
                        {
224
                                case 330:
225
                                        tmp.PaperSpaceBlockHandle = this._reader.ValueAsHandle;
1,128✔
226
                                        return true;
1,128✔
227
                                case 331:
228
                                        tmp.LasActiveViewportHandle = (this._reader.ValueAsHandle);
500✔
229
                                        return true;
500✔
230
                                default:
231
                                        if (!this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Layout]))
34,590✔
232
                                        {
17,780✔
233
                                                return this.readPlotSettings(template, map);
17,780✔
234
                                        }
235
                                        return true;
16,810✔
236
                        }
237
                }
36,218✔
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!
NEW
299
                                        {
×
NEW
300
                                                this._reader.ReadNext();
×
NEW
301
                                                Debug.Assert(this._reader.Code == 97);
×
NEW
302
                                                int index1 = this._reader.ValueAsInt;
×
NEW
303
                                                this._reader.ReadNext();
×
NEW
304
                                                Debug.Assert(this._reader.Code == 98);
×
NEW
305
                                                int index2 = this._reader.ValueAsInt;
×
NEW
306
                                                this._reader.ReadNext();
×
NEW
307
                                                Debug.Assert(this._reader.Code == 99);
×
NEW
308
                                                int index3 = this._reader.ValueAsInt;
×
309

NEW
310
                                                tmp.CadObject.Faces.Add(new GeoData.GeoMeshFace
×
NEW
311
                                                {
×
NEW
312
                                                        Index1 = index1,
×
NEW
313
                                                        Index2 = index2,
×
NEW
314
                                                        Index3 = index3
×
NEW
315
                                                });
×
NEW
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
                {
43,212✔
349
                        switch (this._reader.Code)
43,212✔
350
                        {
351
                                // Undocumented codes
352
                                case 70:
353
                                        //Always 0
354
                                        return true;
4,824✔
355
                                default:
356
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Scale]);
38,388✔
357
                        }
358
                }
43,212✔
359

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

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

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

387
                        switch (this._reader.Code)
30,420✔
388
                        {
389
                                case 100 when this._reader.ValueAsString == DxfSubclassMarker.XRecord:
7,785✔
390
                                        this.readXRecordEntries(tmp);
7,785✔
391
                                        return true;
7,785✔
392
                                default:
393
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.XRecord]);
22,635✔
394
                        }
395
                }
30,420✔
396

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

401
                        while (this._reader.DxfCode != DxfCode.Start)
537,282✔
402
                        {
529,497✔
403
                                switch (this._reader.GroupCodeValue)
529,497!
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);
529,497✔
410
                                                break;
529,497✔
411
                                }
412

413
                                this._reader.ReadNext();
529,497✔
414
                        }
529,497✔
415
                }
7,785✔
416

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

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

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

437
                        switch (this._reader.Code)
101,408✔
438
                        {
439
                                case 280:
440
                                        cadDictionary.HardOwnerFlag = this._reader.ValueAsBool;
6,641✔
441
                                        return true;
6,641✔
442
                                case 281:
443
                                        cadDictionary.ClonningFlags = (DictionaryCloningFlags)this._reader.Value;
10,429✔
444
                                        return true;
10,429✔
445
                                case 3:
446
                                        tmp.Entries.Add(this._reader.ValueAsString, null);
24,514✔
447
                                        return true;
24,514✔
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;
24,514✔
451
                                        return true;
24,514✔
452
                                default:
453
                                        return this.tryAssignCurrentValue(template.CadObject, map.SubClasses[DxfSubclassMarker.Dictionary]);
35,310✔
454
                        }
455
                }
101,408✔
456

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

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

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

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

483
                        this.readCommonObjectData(template);
246✔
484

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

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

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

492
                        while (this._reader.DxfCode != DxfCode.Start)
2,492✔
493
                        {
2,246✔
494
                                switch (this._reader.Code)
2,246!
495
                                {
496
                                        case 5:
497
                                                pair.Item1 = this._reader.ValueAsHandle;
1,000✔
498
                                                break;
1,000✔
499
                                        case 330:
500
                                                template.BlockOwnerHandle = this._reader.ValueAsHandle;
246✔
501
                                                break;
246✔
502
                                        case 331:
503
                                                pair.Item2 = this._reader.ValueAsHandle;
1,000✔
504
                                                break;
1,000✔
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)
2,246✔
511
                                {
1,000✔
512
                                        template.Values.Add((pair.Item1.Value, pair.Item2.Value));
1,000✔
513
                                        pair = (null, null);
1,000✔
514
                                }
1,000✔
515

516
                                this._reader.ReadNext();
2,246✔
517
                        }
2,246✔
518

519
                        return template;
246✔
520
                }
246✔
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