DecisionRules 1.5.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package DecisionRules --version 1.5.1
NuGet\Install-Package DecisionRules -Version 1.5.1
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="DecisionRules" Version="1.5.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DecisionRules --version 1.5.1
#r "nuget: DecisionRules, 1.5.1"
#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.
// Install DecisionRules as a Cake Addin
#addin nuget:?package=DecisionRules&version=1.5.1

// Install DecisionRules as a Cake Tool
#tool nuget:?package=DecisionRules&version=1.5.1

Simple library that allows you to easily connect to Decisionrules.io from your application.

Request Options

  • API_KEY - Your API_KEY (string)
  • Geolocation - optional argument. If omited default geoloc is set. Our geolocs (string)
  • URI - Custom base url for on premise version of DecisionRules (if omited our default uri is used (api.decisionrules.io)); (string)

Arguments

  • U - generic return type
  • T - generic input argument
  • JsonStringInput - input model in json string format instead of T type. (string)
  • Version - optional parameter that defines which version of rule you want use in solver API. If omited last version is used. (string)

Usage

namespace DemoApp
{
    class Program
    {

        private static readonly string apiKey = "API_KEY_HERE";

        private static readonly string ruleId = "RULE_ID_HERE";

        static void Main(string[] args)
        {
            RequestOption requestOptions = new RequestOption(apiKey, GeoLocations.DEFAULT, "IF on premise version then base url here");

            DecisionRulesService drs = new DecisionRulesService(requestOptions);

            InputData inputModel = new InputData
            {
                day = "today"
            };

            string inputJSON = @"{""data"": {""day"":""today""}}";

            List<ResultModel> response = drs.Solve<InputData, ResultModel>(ruleId, inputModel, SolverStrategies.STANDARD ,"VERSION_HERE").Result;

            List<ResultModel> responseString = drs.Solve<ResultModel>(ruleId, inputJSON, SolverStrategies.STANDARD ,"VERSION_HERE").Result;

            Console.WriteLine(response[0].result);
            Console.WriteLine(responseString[0].result);
        }
    }

}

InputModel preview example

class InputModel
{
    public string day { get; set; }
}

ResultModel preview example

class ResultModel
{
    public string result { get; set; }
}
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 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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.6 11,699 7/22/2022
3.0.5 404 7/22/2022
3.0.4 443 6/27/2022
3.0.3 404 6/15/2022
3.0.2 400 6/6/2022
3.0.0 402 5/6/2022
2.0.1 450 1/24/2022
2.0.0 294 10/8/2021
1.6.5 274 9/23/2021
1.6.3 424 1/24/2022
1.5.3 299 8/3/2021
1.5.1 307 7/26/2021
1.4.2 311 6/28/2021