public ServerHandler(TcpServerProperties tcpServerProperties, RulesEngine.RulesEngine engine, TcpRuleWorkflow ruleWorkflow, ILogger logger) { _tcpServerProperties = tcpServerProperties; _engine = engine; _ruleWorkflow = ruleWorkflow; _logger = logger; }
public DotNettyTcpServerMessageListener(ILogger logger, string id, TcpServerProperties properties) { _logger = logger; Id = id; _tcpServerProperties = properties; _ruleWorkflow = GetTcpRuleWorkflow(); _engine = GetRuleEngine(); }
private TcpRuleWorkflow GetTcpRuleWorkflow() { var result = new TcpRuleWorkflow("1==1"); if (_tcpServerProperties.ParserConfiguration != null && _tcpServerProperties.ParserConfiguration.ContainsKey("script")) { var configValue = _tcpServerProperties.ParserConfiguration["script"]; result = new TcpRuleWorkflow(configValue.ToString() ?? ""); } return(result); }