コード例 #1
0
 /// <summary>
 /// Add a negated OR antecedent to a rule.
 /// </summary>
 /// <param name="ruleIndex">The handle of the rule to modify</param>
 /// <param name="antecedent">The text of the antecedent. Parentheses will be added.</param>
 public void AddNegatedOrAntecedent(int ruleIndex, string antecedent)
 {
     CFact mem = new CFact("(" + antecedent + ")");
     rules[ruleIndex].orAntacedents.Add(mem);
     rules[ruleIndex].operators[mem] = "true";
 }
コード例 #2
0
 /// <summary>
 /// Add an AND antecedent to a rule.
 /// </summary>
 /// <param name="ruleIndex">The handle of the rule to modify</param>
 /// <param name="antecedent">The text of the antecedent. Parentheses will be added.</param>
 public void AddAndAntecedent(int ruleIndex, string antecedent)
 {
     CFact mem = new CFact("(" + antecedent + ")");
     rules[ruleIndex].andAntacedents.Add(mem);
 }
コード例 #3
0
 /// <summary>
 /// Always return true.
 /// </summary>
 /// <param name="fact">Fact to attend to</param>
 /// <returns>Always true</returns>
 public override bool AttendTo(CFact fact)
 {
     return false;
 }