LogicBuilder.Workflow.Activities.Rules
2.0.6
Prefix Reserved
dotnet add package LogicBuilder.Workflow.Activities.Rules --version 2.0.6
NuGet\Install-Package LogicBuilder.Workflow.Activities.Rules -Version 2.0.6
<PackageReference Include="LogicBuilder.Workflow.Activities.Rules" Version="2.0.6" />
<PackageVersion Include="LogicBuilder.Workflow.Activities.Rules" Version="2.0.6" />
<PackageReference Include="LogicBuilder.Workflow.Activities.Rules" />
paket add LogicBuilder.Workflow.Activities.Rules --version 2.0.6
#r "nuget: LogicBuilder.Workflow.Activities.Rules, 2.0.6"
#:package LogicBuilder.Workflow.Activities.Rules@2.0.6
#addin nuget:?package=LogicBuilder.Workflow.Activities.Rules&version=2.0.6
#tool nuget:?package=LogicBuilder.Workflow.Activities.Rules&version=2.0.6
LogicBuilder.Workflow.Activities.Rules
A powerful, forward-chaining rules engine for .NET that enables dynamic business rule evaluation and execution without recompilation. This library provides a flexible framework for defining, validating, and executing business rules using CodeDOM expressions.
Overview
LogicBuilder.Workflow.Activities.Rules is a .NET rules engine that allows you to:
- Define business rules declaratively using CodeDOM expressions
- Validate rules against target types at design-time or runtime
- Execute rules with forward-chaining and re-evaluation support
- Serialize/deserialize rule sets for storage and versioning
- Support complex conditions and actions including method calls, property access, and object creation
Core Components
RuleEngine
The RuleEngine class is the execution engine that processes validated rule sets against target objects. It handles:
- Rule preprocessing and analysis
- Forward-chaining execution with configurable chaining behavior
- Rule priority management
- Re-evaluation of rules when object state changes
RuleSet
The RuleSet class represents a collection of rules that can be executed together. Features include:
- Named rule collections with optional descriptions
- Configurable chaining behavior (Full, Sequential, None)
- Rule validation against target types
- Serialization support for persistence
- Cloning capabilities for rule set management
Properties:
Name- Unique identifier for the rule setDescription- Optional documentationRules- Collection of Rule objectsChainingBehavior- Controls how rules trigger re-evaluation
Chaining Behaviors:
Full- Rules can trigger re-evaluation of all other rulesSequential- Rules execute in priority order without re-evaluationNone- No forward chaining
RuleValidation
The RuleValidation class validates rule expressions against target types and provides type resolution services. It:
- Validates rule conditions and actions at design-time or runtime
- Resolves types, methods, properties, and fields
- Manages type conversions and implicit/explicit operators
- Supports extension methods (C# 3.0+)
- Provides detailed validation errors with line information
Key Capabilities:
- Type Resolution: Resolves types from assemblies including generic types
- Method Resolution: Finds best-match methods considering overloads, optional parameters, and params arrays
- Property/Field Resolution: Validates member access including indexers
- Conversion Validation: Checks implicit and explicit type conversions
- Access Validation: Enforces visibility rules (public, internal, private)
Supported Expression Types
The library supports a rich set of CodeDOM expressions:
- Binary operations: Comparison, arithmetic, logical operators
- Property/field access: Including nested properties
- Method invocation: Instance and static methods
- Array indexers: Multi-dimensional array access
- Object creation: Constructor calls with parameters
- Type casting: Explicit type conversions
- Generic types: Full support for generic type arguments
- Collection initializers: Array and list initialization
Advanced Features
Forward Chaining
Rules can trigger re-evaluation of other rules when they modify object state, enabling complex rule dependencies and cascading logic.
Update Actions
Use RuleUpdateAction to explicitly mark properties as updated, forcing re-evaluation of dependent rules:
rule.ThenActions.Add(new RuleUpdateAction("this/PropertyName"));
Target Frameworks
- .NET Standard 2.0
Use Cases
This library is ideal for:
- Business rule engines requiring dynamic rule modification
- Policy-based systems with versioned rule sets
- Complex validation scenarios with cascading rules
- Decision automation systems
- Workflow rule evaluation
- Configurable business logic without code deployment
| 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 was computed. 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. |
| .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 was computed. 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. |
-
.NETStandard 2.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LogicBuilder.Workflow.Activities.Rules:
| Package | Downloads |
|---|---|
|
LogicBuilder.Workflow.Activities.Rules.Design
This package makes the RuleSetDialog from System.Workflow.Activities.Rules compatible with .Net 5. |
|
|
LogicBuilder.RulesDirector
LogicBuilder.RulesDirector manages the state of the flow for the Logic Builder, including switching between rule engines, and keeping track of the current location as the rules are evaluated. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.6 | 182 | 2/11/2026 |
| 2.0.4 | 107,576 | 5/10/2023 |
| 2.0.3 | 252 | 5/5/2023 |
| 2.0.2 | 14,202 | 11/23/2021 |
| 2.0.1 | 6,652 | 11/23/2021 |
| 2.0.0 | 1,177 | 10/25/2021 |
| 2.0.0-preview.2 | 377 | 4/1/2021 |
| 2.0.0-preview.1 | 358 | 3/30/2021 |
| 1.0.4 | 11,413 | 2/19/2021 |
| 1.0.3-preview01 | 635 | 7/20/2020 |
| 1.0.2 | 3,095 | 2/28/2019 |
| 1.0.0 | 18,085 | 12/30/2018 |
| 1.0.0-preview06 | 2,140 | 1/3/2018 |
| 1.0.0-preview05 | 1,475 | 1/3/2018 |
Refactoring to accelerate DevOps.