< Summary

Information
Class: GridForge.Grids.Topology.GridPlanarLayer
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Topology/GridPlanarLayer.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 28
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Topology/GridPlanarLayer.cs

#LineLine coverage
 1//=======================================================================
 2// GridPlanarLayer.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
 8namespace GridForge.Grids.Topology;
 9
 10/// <summary>Identifies one selected planar layer in an exact grid generation.</summary>
 11public readonly struct GridPlanarLayer
 12{
 13    /// <summary>The exact eligible generation and committed revision.</summary>
 14    public GridCoveredAddressGeneration Generation { get; }
 15
 16    /// <summary>The nonnegative topology-local layer index.</summary>
 17    public int LayerIndex { get; }
 18
 19    /// <summary>Creates one explicit layer selection.</summary>
 20    public GridPlanarLayer(GridCoveredAddressGeneration generation, int layerIndex)
 21    {
 26422        ChronicleGuard.ThrowIfArgumentOutOfRange(generation.GridSpawnToken <= 0,
 26423            actualValue: null, paramName: nameof(generation));
 26324        ChronicleGuard.ThrowIfNegative(layerIndex, nameof(layerIndex));
 26225        Generation = generation;
 26226        LayerIndex = layerIndex;
 26227    }
 28}