Skip to content

Repository files navigation

Pure.Chart.Model.HashCodes

Deterministic hash code implementations for chart model abstractions in the Pure ecosystem.

.NET build & testBuild and DeployNuGetLicense: MIT

Overview

Pure.Chart.Model.HashCodes provides deterministic, byte-enumerable hash codes for every type in the chart model abstraction layer. Each type wraps one of the Pure.Chart.Model.Abstractions interfaces and produces a stable byte sequence by prepending a fixed 16-byte type-discriminator prefix before hashing the object's fields. The resulting sequences compose cleanly with Pure.HashCodes.DeterminedHash, enabling structural equality checks and content-addressed storage across chart configurations.

API

All types are sealed record and implement IDeterminedHash (which extends IEnumerable<byte>).

TypeWrapsHashed fields
ChartHashIChartTitle, Description, Type, XAxis, YAxis, Series
ChartTypeHashIChartTypeName
ChartSeriesHashIChartSeriesLegend, XAxisSource, YAxisSource
AxisHashIAxisLegend

All hash types live in the Pure.Chart.Model.HashCodes namespace.

Dependencies

Target Frameworks

  • .NET 7
  • .NET 8
  • .NET 9
  • .NET 10

Installation

dotnet add package Pure.Chart.Model.HashCodes

Usage

usingPure.Chart.Model.HashCodes;IChartchart= ...;// any IChart implementation// Enumerate the hash bytes directlybyte[]hash=newChartHash(chart).ToArray();// Compose with other IDeterminedHash valuesIEnumerable<byte>combined=newDeterminedHash(newChartHash(chartA).Concat(newChartHash(chartB)));

About

Deterministic hash code implementations for chart model abstractions in the Pure ecosystem.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from kudima03/Pure.Template