NorthEdge.GridCore
0.1.0
dotnet add package NorthEdge.GridCore --version 0.1.0
NuGet\Install-Package NorthEdge.GridCore -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NorthEdge.GridCore" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NorthEdge.GridCore" Version="0.1.0" />
<PackageReference Include="NorthEdge.GridCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NorthEdge.GridCore --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NorthEdge.GridCore, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NorthEdge.GridCore@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NorthEdge.GridCore&version=0.1.0
#tool nuget:?package=NorthEdge.GridCore&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GridCore
GridCore is a NuGet package for generic rectangular 2D grid primitives.
It provides a small reusable core for:
- grid coordinates
- grid sizes and rectangles
- dense rectangular storage
- basic adjacency helpers
Package
- Package ID:
NorthEdge.GridCore - .NET:
net8.0 - C#:
12.0
Implemented API
Current public surface:
GridPointGridOffsetGridSizeGridRectGridCell<T>IReadOnlyGrid<T>IGrid<T>DenseGrid<T>GridDirectionsGridNeighbors
Behavior
- Coordinates use
XandY. - Rectangle and grid enumeration is deterministic: top-to-bottom, then left-to-right.
DenseGrid<T>uses dense row-major storage.- Grid indexers are strict and throw for out-of-bounds access.
TryGetis the safe read path.Resizepreserves overlapping cells and returns removed cells in deterministic order.GridNeighbors.OrthogonalfollowsGridDirections.Orthogonalorder and requires the origin point to be inside bounds.
Example
using GridCore;
var grid = new DenseGrid<int>(
new GridSize(3, 2),
point => (point.Y * 10) + point.X);
grid[new GridPoint(1, 1)] = 42;
foreach (GridCell<int> cell in grid.Cells())
{
Console.WriteLine($"{cell.Point.X},{cell.Point.Y} = {cell.Value}");
}
foreach (GridPoint neighbor in GridNeighbors.Orthogonal(new GridPoint(1, 1), grid.Size))
{
Console.WriteLine($"Neighbor: {neighbor.X},{neighbor.Y}");
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 110 | 3/29/2026 |
First implementation pass: core value types, grid interfaces, DenseGrid<T>, orthogonal adjacency helpers, expanded test coverage, and updated package documentation.