Rulewright.Core 0.3.0

dotnet add package Rulewright.Core --version 0.3.0
                    
NuGet\Install-Package Rulewright.Core -Version 0.3.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="Rulewright.Core" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rulewright.Core" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Rulewright.Core" />
                    
Project file
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 Rulewright.Core --version 0.3.0
                    
#r "nuget: Rulewright.Core, 0.3.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 Rulewright.Core@0.3.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=Rulewright.Core&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Rulewright.Core&version=0.3.0
                    
Install as a Cake Tool

Rulewright.Core

Foundation package for Rulewright: the immutable domain model a rule is made of, plus the result and trace types an evaluation produces.

Zero dependencies.

Install

dotnet add package Rulewright.Core

You almost certainly want Rulewright instead — it includes this package. Install Rulewright.Core directly only when you are writing something that plugs into Rulewright and does not need the rest of it: a rule generator, an analyzer, or a custom function library.

What is in it

The rule modelRuleSet, Rule, and the condition tree: ConditionNode with its two shapes, ConditionGroup (AND/OR/NOT over children) and ConditionLeaf (a field path or computed expression, a ConditionOperator, and a constant). Everything is immutable after construction and validated in the constructor.

using Rulewright.Core;

var rule = new Rule(
    "adults-only",
    new ConditionLeaf("Customer.Age", ConditionOperator.GreaterThanOrEqual, 18),
    new[] { new RuleAction(RuleAction.SetOutputType, "Eligible", true) });

ActionsRuleAction and its four types: setOutput replaces, addToOutput sums, appendToOutput collects into a list, removeOutput deletes the key.

Value expressionsValueExpression and its three shapes, LiteralExpression, FieldExpression, and OperatorExpression (arithmetic, concat, coalesce). Pure data: a closed operator vocabulary, never embedded code.

Results and tracesRuleEvaluationResult, FiredRule (with the RuleBranch that ran), EvaluationTrace, RuleTrace, and ConditionTraceNode, whose Passed is null for a node short-circuiting skipped. CompilationMode reports whether an evaluation ran compiled delegates or the interpreter, so a fallback is never silent.

Custom function contractsIRuleFunction, IRuleFunctionMetadata, RuleFunctionDescriptor, and RuleFunctionValueKind: implement IRuleFunction to back the custom operator, and add the metadata interface so a builder UI can discover it.

Requirements

.NET Framework 4.8, .NET Standard 2.0, .NET 8.0 or .NET 10.0.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Rulewright.Core:

Package Downloads
Rulewright.Serialization

Rulewright JSON-to-domain mapping, structural schema validation with JSON pointer errors, and canonical rule hashing. JSON parsing is abstracted behind IRuleJsonReader; no JSON library dependency.

Rulewright.Execution

Rulewright execution engine: expression-tree rule compiler, dynamic-fact interpreter fallback, thread-safe compiled delegate cache, and the RulewrightBuilder/RulewrightEngine public API.

Rulewright.Extensions.Functions

Built-in custom functions and registration/discovery helpers for Rulewright (the 'custom' operator).

Rulewright

The Rulewright rule engine — everything you need in one package: the core domain model, JSON parsing and schema validation, the expression-tree evaluation engine, the System.Text.Json adapter, and the built-in custom functions. Rules are plain JSON; evaluation is compiled expression trees. Install this unless you want to pick pieces individually.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 113 9/10/2026
0.1.1 285 8/29/2026