RuleEvaluator 3.0.0

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

RuleEvaluator

Item Link
Code coverage Coverage Status
NuGet NuGet version (RuleEvaluator)
NuGet Repository NuGet version (RuleEvaluator.Repository.Database)

For usage, see UnitTests. One sample is:

    private static IWindsorContainer _WindsorContainer
    {
        get
        {
            IWindsorContainer container = new WindsorContainer();
            container.Install(FromAssembly.InThisApplication());
            return container;
        }
    }

    [Test]
    public void IntegrityTest_Find_OneFromMoreRuleItems_IntervalStringAsCellValidateFilterDecimal_ReturnsCorrectOutputValue()
    {
        //Arrange
        var cf = _WindsorContainer.Resolve<ICellFactory>();
        RuleItems items = new RuleItems(cf);
        items.AddRuleItem(".*", ".*", ".*", "MyString", "Interval<10;15)", cf.CreateCell("ReturnValue1", CellInputOutputType.Output));
        items.AddRuleItem(".*", ".*", ".*", "MyString", "INTERVAL<15;24)", cf.CreateCell("ReturnValue2", CellInputOutputType.Output));

        //Act
        var found = items.Find("Anything", "Anything2", "Anything3", "MyString", 15m).Output(0).FilterValue;

        //Assert
        Assert.AreEqual("ReturnValue2", found);
    }

RuleEvaluator.Repository.Database can load RuleItems from DB. One unit test sample looks like:

    [Test]
    public void IntegrityTest_RepoLoad_FindOneRuleItemAndCheckFilterValue()
    {
        //Arrange
        var cf = _WindsorContainer.Resolve<ICellFactory>();

        //Act
        var repo = new RuleItemsRepository(cf, ConfigurationManager.AppSettings.Get("ConnectionString"), "Ciselnik.p_GetSchemaColBySchemaKod", "Ciselnik.p_GetTranslatorDataBySchemaKod");
        var items = repo.Load("OdhadBodu");
        var found = items.Find("A", "B", "C", "7BN Perspektiva Důchod", 15);
        var outputValue = found.Output(0).FilterValue;

        //Assert
        Assert.AreEqual("C2/240", outputValue);
    }
Product Compatible and additional computed target framework versions.
.NET 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 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 Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on RuleEvaluator:

Package Downloads
RuleEvaluator.Repository.Database

Database repository implementation for RuleEvaluator with support for .NET Framework 4.7.2 and .NET 8.0. Supports MSSQL and PostgreSQL databases with optimized Npgsql version compatibility.

RuleEvaluator.Repository.Contract

Repository contracts for RuleEvaluator with support for .NET Framework 4.7.2 and .NET 8.0

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 453 11/18/2025
2.6.0 196 3/21/2025
2.5.2 701 4/21/2021
2.5.1 708 11/4/2020
2.4.0 1,189 9/20/2018
2.3.0 1,231 8/6/2018
2.2.0 1,470 6/29/2018
2.1.0 1,339 5/24/2017
2.0.1 1,449 11/23/2016
1.0.0 1,571 10/17/2016