Skip to content

Commit

Permalink
interface needed adjusting to include obsolete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
asulwer committed Jun 23, 2024
1 parent 3bdd422 commit c376485
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/RulesEngine/Interfaces/IRulesEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using RulesEngine.Models;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -16,6 +17,8 @@ public interface IRulesEngine
/// <param name="workflowName">The name of the workflow with rules to execute against the inputs</param>
/// <param name="inputs">A variable number of inputs</param>
/// <returns>List of rule results</returns>
[Obsolete("Use Method with CancellationToken")]
ValueTask<List<RuleResultTree>> ExecuteAllRulesAsync(string workflowName, params object[] inputs);
ValueTask<List<RuleResultTree>> ExecuteAllRulesAsync(string workflowName, object[] inputs, CancellationToken ct = default);

/// <summary>
Expand All @@ -24,7 +27,12 @@ public interface IRulesEngine
/// <param name="workflowName">The name of the workflow with rules to execute against the inputs</param>
/// <param name="ruleParams">A variable number of rule parameters</param>
/// <returns>List of rule results</returns>
[Obsolete("Use Method with CancellationToken")]
ValueTask<List<RuleResultTree>> ExecuteAllRulesAsync(string workflowName, params RuleParameter[] ruleParams);
ValueTask<List<RuleResultTree>> ExecuteAllRulesAsync(string workflowName, RuleParameter[] ruleParams, CancellationToken ct = default);

[Obsolete("Use Method with CancellationToken")]
ValueTask<ActionRuleResult> ExecuteActionWorkflowAsync(string workflowName, string ruleName, RuleParameter[] ruleParameters);
ValueTask<ActionRuleResult> ExecuteActionWorkflowAsync(string workflowName, string ruleName, RuleParameter[] ruleParameters, CancellationToken ct = default);

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/RulesEngine/RulesEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private IDictionary<string, Func<ActionBase>> GetActionRegistry(ReSettings reSet
/// <param name="inputs">A variable number of inputs</param>
/// <returns>List of rule results</returns>
[Obsolete("Use Method with CancellationToken")]
public async ValueTask<List<RuleResultTree>> ExecuteAllRules(string workflowname, params object[] inputs)
public async ValueTask<List<RuleResultTree>> ExecuteAllRulesAsync(string workflowname, params object[] inputs)
{
return await ExecuteAllRulesAsync(workflowname, inputs, CancellationToken.None);
}
Expand Down

0 comments on commit c376485

Please sign in to comment.