DecisionRules 2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DecisionRules --version 2.0.0
NuGet\Install-Package DecisionRules -Version 2.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="DecisionRules" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DecisionRules" Version="2.0.0" />
<PackageReference Include="DecisionRules" />
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 DecisionRules --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DecisionRules, 2.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 DecisionRules@2.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=DecisionRules&version=2.0.0
#tool nuget:?package=DecisionRules&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
A 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 to use in solver API. If omitted last version is used. (string)
Standard usage
namespace DemoApp
{
class Program
{
// Define apikey value;
private static readonly string apiKey = "API_KEY_HERE";
// Define ruleId value;
private static readonly string ruleId = "RULE_ID_HERE";
static void Main(string[] args)
{
// Mandatory RequestOption object that contains API key and Geolocation from GeoLocations enum.
RequestOption requestOptions = new RequestOption(apiKey, GeoLocations.DEFAULT);
// Init of DecisionRulesService
DecisionRulesService drs = new DecisionRulesService(requestOptions);
InputData inputModel = new InputData
{
day = "today"
};
string inputJSON = @"{""data"": {""day"":""today""}}";
// Standard Solver method usage that returns Result.
List<ResultModel> response = drs.Solve<InputData, ResultModel>(ruleId, inputModel, SolverStrategies.STANDARD ,"VERSION_HERE", solverType: SolverTypeEnum.RULE).Result;
List<ResultModel> responseString = drs.Solve<ResultModel>(ruleId, inputJSON, SolverStrategies.STANDARD ,"VERSION_HERE" solverType: SolverTypeEnum.RULE_FLOW).Result;
}
}
}
Usage with a custom domain
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)
{
// Custom domain object that contains your custom domain and desired transfer protocol
CustomDomain customDomain = new CustomDomain("your.domain.com", CustomDomainProtocol.HTTP);
RequestOption requestOptions = new RequestOption(apiKey: apiKey, geoloc:GeoLocations.DEFAULT, customDomain: customDomain);
DecisionRulesService drs = new DecisionRulesService(requestOptions);
..........
}
}
}
InputModel preview example
class InputModel
{
public string day { get; set; }
}
ResultModel preview example
class ResultModel
{
public string result { get; set; }
}
| 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 | 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
- Newtonsoft.Json (>= 13.0.1)
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 |
|---|---|---|
| 4.0.6 | 393 | 12/11/2025 |
| 4.0.5 | 411 | 12/10/2025 |
| 4.0.4 | 658 | 12/3/2025 |
| 4.0.3 | 653 | 12/3/2025 |
| 4.0.2 | 105 | 11/28/2025 |
| 4.0.1 | 209 | 10/30/2025 |
| 4.0.0 | 201 | 10/29/2025 |
| 3.1.0 | 5,231 | 3/25/2025 |
| 3.0.6 | 44,233 | 7/22/2022 |
| 3.0.5 | 583 | 7/22/2022 |
| 3.0.4 | 640 | 6/27/2022 |
| 3.0.3 | 554 | 6/15/2022 |
| 3.0.2 | 589 | 6/6/2022 |
| 3.0.0 | 596 | 5/6/2022 |
| 2.0.1 | 640 | 1/24/2022 |
| 2.0.0 | 485 | 10/8/2021 |
| 1.6.5 | 470 | 9/23/2021 |
| 1.6.3 | 608 | 1/24/2022 |
| 1.5.3 | 497 | 8/3/2021 |
| 1.5.1 | 491 | 7/26/2021 |
| 1.4.2 | 523 | 6/28/2021 |