Example #1
0
 public ServerHandler(TcpServerProperties tcpServerProperties, RulesEngine.RulesEngine engine, TcpRuleWorkflow ruleWorkflow, ILogger logger)
 {
     _tcpServerProperties = tcpServerProperties;
     _engine       = engine;
     _ruleWorkflow = ruleWorkflow;
     _logger       = logger;
 }
Example #2
0
 public DotNettyTcpServerMessageListener(ILogger logger, string id, TcpServerProperties properties)
 {
     _logger = logger;
     Id      = id;
     _tcpServerProperties = properties;
     _ruleWorkflow        = GetTcpRuleWorkflow();
     _engine = GetRuleEngine();
 }
Example #3
0
        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);
        }