public IEmailConnector Build(EmailConnectorType emailConnectorType, List <Rule> rules, IRuleProcessorFactory ruleProcessorFactory, IUnitOfWork unitOfWork) { if (emailConnectorType.IsPop3()) { return(new POP3EmailConnector(rules, ruleProcessorFactory, unitOfWork)); } else if (emailConnectorType.IsIMAP()) { return(new IMAPEmailConnector(rules, ruleProcessorFactory, unitOfWork)); } else { return(new IMAPEmailConnector(rules, ruleProcessorFactory, unitOfWork)); } }
public POP3EmailConnector(List <Rule> rules, IRuleProcessorFactory ruleProcessorFactory, IUnitOfWork unitOfWork) { Pipeline = new RulePipeline(rules, ruleProcessorFactory, unitOfWork); }
public BusinessRulesFacade(IRuleProcessorFactory ruleProcessorFactory, IRuleModuleService ruleModuleService) { this._ruleProcessorFactory = ruleProcessorFactory; this._ruleModuleService = ruleModuleService; }
public RulePipeline(List <Rule> rules, IRuleProcessorFactory ruleProcessorFactory, IUnitOfWork unitOfWork) { _rules = rules; _factory = ruleProcessorFactory; _unitOfWork = unitOfWork; }