RuleWright.Core
1.0.2
See the version list below for details.
dotnet add package RuleWright.Core --version 1.0.2
NuGet\Install-Package RuleWright.Core -Version 1.0.2
<PackageReference Include="RuleWright.Core" Version="1.0.2" />
<PackageVersion Include="RuleWright.Core" Version="1.0.2" />
<PackageReference Include="RuleWright.Core" />
paket add RuleWright.Core --version 1.0.2
#r "nuget: RuleWright.Core, 1.0.2"
#:package RuleWright.Core@1.0.2
#addin nuget:?package=RuleWright.Core&version=1.0.2
#tool nuget:?package=RuleWright.Core&version=1.0.2
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 model — RuleSet, 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) });
Actions — RuleAction and its four types: setOutput replaces, addToOutput sums,
appendToOutput collects into a list, removeOutput deletes the key.
Value expressions — ValueExpression and its three shapes, LiteralExpression,
FieldExpression, and OperatorExpression (arithmetic, concat, coalesce). Pure data: a
closed operator vocabulary, never embedded code.
Results and traces — RuleEvaluationResult, 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 contracts — IRuleFunction, 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.
Documentation
📖 RuleWright documentation ·
How RuleWright works ·
API reference: RuleWright.Core
Contact
Questions, support or licensing: salwan@albahadly.com · www.albahadly.com
License
MIT.
| Product | Versions 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. |
-
.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.
See https://github.com/albahadly/rulewright/releases for release notes.