| | | 1 | | //======================================================================= |
| | | 2 | | // GridDiagnosticQueryResult.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024–present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | namespace GridForge.Diagnostics; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Summary information returned from a diagnostic query. |
| | | 12 | | /// </summary> |
| | | 13 | | public readonly struct GridDiagnosticQueryResult |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Status of the completed query pass. |
| | | 17 | | /// </summary> |
| | | 18 | | public readonly GridDiagnosticQueryStatus Status; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Number of cells written or visited. |
| | | 22 | | /// </summary> |
| | | 23 | | public readonly int CellCount; |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Number of cells skipped because the query stopped before traversal |
| | | 27 | | /// completed. |
| | | 28 | | /// </summary> |
| | | 29 | | public readonly int SkippedCellCount; |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Initializes a query result. |
| | | 33 | | /// </summary> |
| | | 34 | | public GridDiagnosticQueryResult( |
| | | 35 | | GridDiagnosticQueryStatus status, |
| | | 36 | | int cellCount, |
| | | 37 | | int skippedCellCount) |
| | | 38 | | { |
| | 63 | 39 | | Status = status; |
| | 63 | 40 | | CellCount = cellCount; |
| | 63 | 41 | | SkippedCellCount = skippedCellCount; |
| | 63 | 42 | | } |
| | | 43 | | } |