Rulealize.Plugin.State
1.0.1
dotnet add package Rulealize.Plugin.State --version 1.0.1
NuGet\Install-Package Rulealize.Plugin.State -Version 1.0.1
<PackageReference Include="Rulealize.Plugin.State" Version="1.0.1" />
<PackageVersion Include="Rulealize.Plugin.State" Version="1.0.1" />
<PackageReference Include="Rulealize.Plugin.State" />
paket add Rulealize.Plugin.State --version 1.0.1
#r "nuget: Rulealize.Plugin.State, 1.0.1"
#:package Rulealize.Plugin.State@1.0.1
#addin nuget:?package=Rulealize.Plugin.State&version=1.0.1
#tool nuget:?package=Rulealize.Plugin.State&version=1.0.1
Rulealize.Plugin.State
Reading and writing the state of a Rulealize rule set.
| Plugin id | Rulealize.Plugin.State |
| Namespace | state |
| Reserved prefix | $ |
| Depends on | Rulealize.Abstraction |
| Specification | doc/specification.md |
state.get is an expression, with "$path" as its shorthand; state.set and
state.update are effects. Reads and writes live together because they share one path
syntax — split across two plugins, the specification of what a path means would live in two
places, and neither half would be much use alone.
Paths are literal, dot-separated field names resolved against state.schema when the
rule set is built, and that is the decision everything else here follows from. Every path
can be checked to exist before anything runs, which fields an input writes is readable from
the document, and schema validation never has to be deferred to evaluation time.
The seam that matters: there is no "board.d3". A board is one opaque value as far as this
plugin is concerned, and its squares are read with grid.at and written with grid.set. If
paths could reach inside a board, this plugin would have to know whether boards are sparse
or dense and what notation their coordinates use — and the grid would stop being
replaceable.
How another plugin writes through this one
state.get implements IStateLocation, the contract in Rulealize.Abstraction that
carries a resolved StatePath.
That is how grid.set, handed "$board" as its target, finds out which field to write
back to. It cannot inspect the node — it does not reference this assembly — but it can ask
for the interface:
ExpressionNode target = context.RequireExpression("target");
if (target is not IStateLocation location)
{
throw context.Error("target", "must denote a state field.");
}
Neither plugin learns anything about the other.
Building
dotnet build. Rulealize.Abstraction restores from nuget.org like any other package, so
this repository builds on its own.
License
Apache-2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Rulealize.Abstraction (>= 0.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.