public AlarmDetectRuleExecutor(
     IRuleFactory<int>[] ruleFactory, 
     IRuleEngineFactory<int> engineFactory)
 {
     _engineFactory = engineFactory;
     RuleFactory = ruleFactory;
 }
Exemple #2
0
 public LowAlarmRuleExecutor(
     IRuleFactory<double>[] ruleFactory, 
     IRuleEngineFactory<double> engineFactory)
 {
     _engineFactory = engineFactory;
     RuleFactory = ruleFactory;
 }
 public HighWarningRuleExecutor(
     IRuleFactory<double>[] ruleFactory, 
     IRuleEngineFactory<double> engineFactory)
 {
     _engineFactory = engineFactory;
     RuleFactory = ruleFactory;
 }
Exemple #4
0
 public NidaWorkflowEngine(IRuleCollectionFactory ruleCollectionFactory, IRuleEngineFactory ruleEngineFactory,
                           IMessageCollector messageCollector)
 {
     _ruleCollectionFactory = ruleCollectionFactory;
     _ruleEngineFactory     = ruleEngineFactory;
     _messageCollector      = messageCollector;
 }
Exemple #5
0
 public TestEnvironment()
 {
     EngineRepository  = new MemoryEngineRepository();
     BuildRepository   = new MemoryBuildRepository();
     ProjectRepository = new MemoryRepository <Project>();
     _engineOptions    = new OptionsWrapper <EngineOptions>(new EngineOptions
     {
         EngineCommitFrequency = TimeSpan.FromMinutes(5),
         InactiveEngineTimeout = TimeSpan.FromMinutes(10)
     });
     _smtModelFactory   = CreateSmtModelFactory();
     _ruleEngineFactory = CreateRuleEngineFactory();
     _textCorpusFactory = CreateTextCorpusFactory();
 }
Exemple #6
0
        public void CreateEngineService()
        {
            SmtModel     = Substitute.For <IInteractiveSmtModel>();
            BatchTrainer = Substitute.For <ISmtBatchTrainer>();
            BatchTrainer.Stats.Returns(new SmtBatchTrainStats());
            _smtModelFactory   = CreateSmtModelFactory();
            _ruleEngineFactory = CreateRuleEngineFactory();
            _textCorpusFactory = CreateTextCorpusFactory();

            Service = new EngineService(new OptionsWrapper <EngineOptions>(EngineOptions), EngineRepository,
                                        BuildRepository, ProjectRepository, CreateEngineRuntime);
            Service.Init();
            var jobServerOptions = new BackgroundJobServerOptions
            {
                Activator = new EnvActivator(this)
            };

            _jobServer = new BackgroundJobServer(jobServerOptions, _memoryStorage);
        }
Exemple #7
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="AssessmentCompletenessManager" /> class.
 /// </summary>
 /// <param name="completenessRuleCollectionFactory">The completeness rule collection factory.</param>
 /// <param name="ruleEngineFactory">The rule engine factory.</param>
 public AssessmentCompletenessManager(ICompletenessRuleCollectionFactory completenessRuleCollectionFactory, IRuleEngineFactory ruleEngineFactory)
 {
     _completenessRuleCollectionFactory = completenessRuleCollectionFactory;
     _ruleEngineFactory = ruleEngineFactory;
 }
 public BusinessRuleRequestHandler()
 {
     this.ruleExecutor      = new BusinessRuleExecutor();
     this.ruleEngineFactory = new RuleEngineFactory();
 }
Exemple #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckRulesInterceptor"/> class.
 /// </summary>
 /// <param name="ruleEngineFactory">The rule engine factory.</param>
 public CheckRulesInterceptor(IRuleEngineFactory ruleEngineFactory)
 {
     _ruleEngineFactory = ruleEngineFactory;
 }