📄 dotnetblockconsequencefactory.cs
字号:
using System;
using org.drools.rule;
using org.drools.smf;
using org.drools.spi;
namespace org.drools.semantics.dotnet
{
/// <summary>
/// .NET Block Consequence Factory
/// </summary>
public class DotNetBlockConsequenceFactory : ConsequenceFactory
{
public Consequence newConsequence(Rule r, RuleBaseContext rbc, Configuration c)
{
try
{
int id = 0;
if (rbc.get("dotnet-consequence-id") != null)
{
id = (int)rbc.get("dotnet-consequence-id");
}
id++;
rbc.put("dotnet-consequence-id", id);
return new DotNetBlockConsequence(r, id, c.getText());
}
catch (Exception e)
{
throw new FactoryException(e);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -