-
-
Notifications
You must be signed in to change notification settings - Fork 630
Expand file tree
/
Copy pathIRuleEngine.cs
More file actions
29 lines (26 loc) · 1.04 KB
/
IRuleEngine.cs
File metadata and controls
29 lines (26 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using BotSharp.Abstraction.Rules.Models;
namespace BotSharp.Abstraction.Rules;
public interface IRuleEngine
{
/// <summary>
/// Trigger the rule that is subscribed by agents.
/// </summary>
/// <param name="trigger"></param>
/// <param name="text"></param>
/// <param name="states"></param>
/// <param name="options"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
Task<IEnumerable<string>> Triggered(IRuleTrigger trigger, string text, IEnumerable<MessageState>? states = null, RuleTriggerOptions? options = null)
=> throw new NotImplementedException();
/// <summary>
/// Execute rule graph node
/// </summary>
/// <param name="node"></param>
/// <param name="graph"></param>
/// <param name="agentId"></param>
/// <param name="trigger"></param>
/// <param name="options"></param>
/// <returns></returns>
Task ExecuteGraphNode(RuleNode node, RuleGraph graph, string agentId, IRuleTrigger trigger, RuleNodeExecutionOptions options);
}