Example #1
0
 public PgCostBuilder(IPgStageBuilder pgStageBuilder,
                      IRuleService ruleService,
                      ICostStageRevisionService costStageRevisionService,
                      IAgencyService agencyService,
                      IProjectService projectService,
                      EFContext efContext,
                      ICostNumberGeneratorService costNumberGeneratorService,
                      IPgCurrencyService currencyService,
                      IPgLedgerMaterialCodeService pgLedgerMaterialCodeService,
                      ICostLineItemService costLineItemService,
                      ICostTemplateVersionService costTemplateVersionService,
                      IPermissionService permissionService,
                      IPgCostService pgCostService,
                      IPgCostSectionTotalsBuilder pgTotalsBuilder,
                      IPgPaymentService pgPaymentService,
                      IExchangeRateService exchangeRateService)
 {
     _pgStageBuilder           = pgStageBuilder;
     _ruleService              = ruleService;
     _costStageRevisionService = costStageRevisionService;
     _agencyService            = agencyService;
     _projectService           = projectService;
     _efContext = efContext;
     _costNumberGeneratorService  = costNumberGeneratorService;
     _currencyService             = currencyService;
     _pgLedgerMaterialCodeService = pgLedgerMaterialCodeService;
     _costLineItemService         = costLineItemService;
     _costTemplateVersionService  = costTemplateVersionService;
     _permissionService           = permissionService;
     _pgCostService       = pgCostService;
     _pgTotalsBuilder     = pgTotalsBuilder;
     _pgPaymentService    = pgPaymentService;
     _exchangeRateService = exchangeRateService;
 }
Example #2
0
 public AppCustomerControllerService(IHttpContextAccessor httpContextAccessor, IMapper mapper, ICustomerRepository customerRepository, IRuleService <CustomerEntity> ruleService)
 {
     this.httpContextAccessor = httpContextAccessor;
     this.mapper             = mapper;
     this.customerRepository = customerRepository;
     this.ruleService        = ruleService;
 }
Example #3
0
 public FunctionService(
     IRuleService ruleService,
     IPolicyRepository policyRep)
 {
     this.ruleService = ruleService;
     this.policyRep   = policyRep;
 }
Example #4
0
        private void CreateCorrectTestData()
        {
            var data     = GenerateData();
            var _service = new Mock <IRuleService>();

            _service.Setup(x => x.Add(It.IsAny <RuleModel>()))
            .Returns(true);
            _service.Setup(x => x.Delete(It.IsAny <int>()))
            .Returns <int>(x => "Delete completed successful");
            _service.Setup(x => x.Edit(It.IsAny <RuleModel>()))
            .Returns(true);
            _service.Setup(x => x.GetAll())
            .Returns(data);
            _service.Setup(x => x.GetAllCategories()).Returns(data.GroupBy(x => x.Category).Select(x => x.Key));
            _service.Setup(x => x.GetByCategory(It.IsAny <string>()))
            .Returns <string>(str => data.Where(x => x.Category.Equals(str)));
            _service.Setup(x => x.Get(It.IsAny <int>()))
            .Returns <int>(id => data.FirstOrDefault(x => x.RuleId == id));
            _service.Setup(x => x.AddImages(It.IsAny <Image[]>()))
            .Returns <Image[]>(img => new List <string> {
                "Ok"
            });
            controller = new RuleController(_service.Object);
            service    = _service.Object;
        }
 /// <summary>
 /// Constructor for OrderProcessingSystem that accepts 3 paramaeters through dependency injection
 /// </summary>
 /// <param name="orderRepository"></param>
 /// <param name="categoryRepository"></param>
 /// <param name="productRepository"></param>
 /// <param name="ruleService"></param>
 public OrderProviderService(IOrderRepository orderRepository, ICategoryRepository categoryRepository, IProductRepository productRepository, IRuleService ruleService)
 {
     _orderRepository    = orderRepository;
     _categoryRepository = categoryRepository;
     _productRepository  = productRepository;
     _ruleService        = ruleService;
 }
Example #6
0
        public RuleRunnerGrain(
            IGrainState <State> state,
            IAppProvider appProvider,
            ILocalCache localCache,
            IEventStore eventStore,
            IEventDataFormatter eventDataFormatter,
            IRuleEventRepository ruleEventRepository,
            IRuleService ruleService,
            ISemanticLog log)
        {
            Guard.NotNull(state, nameof(state));
            Guard.NotNull(appProvider, nameof(appProvider));
            Guard.NotNull(localCache, nameof(localCache));
            Guard.NotNull(eventStore, nameof(eventStore));
            Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter));
            Guard.NotNull(ruleEventRepository, nameof(ruleEventRepository));
            Guard.NotNull(ruleService, nameof(ruleService));
            Guard.NotNull(log, nameof(log));

            this.state               = state;
            this.appProvider         = appProvider;
            this.localCache          = localCache;
            this.eventStore          = eventStore;
            this.eventDataFormatter  = eventDataFormatter;
            this.ruleEventRepository = ruleEventRepository;
            this.ruleService         = ruleService;
            this.log = log;
        }
Example #7
0
 public RulePageViewModel(IRuleService ruleService)
 {
     this.ruleService = ruleService;
     Rule             = new Rule();
     modified         = false;
     patternValid     = true;
 }
Example #8
0
 public UserController(IUserService userService, ICodeService codeService, IUserAndRuleService userAndRuleService, IRuleService ruleService, IProjectService projectService)
 {
     _userService = userService;
     _codeService = codeService;
     _userAndRuleService = userAndRuleService;
     _ruleService = ruleService;
     _projectService = projectService;
 }
        public GrainRuleRunnerService(IGrainFactory grainFactory, IRuleService ruleService)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(ruleService, nameof(ruleService));

            this.grainFactory = grainFactory;
            this.ruleService  = ruleService;
        }
Example #10
0
 public UserController(IUserService userService, ICodeService codeService, IUserAndRuleService userAndRuleService, IRuleService ruleService, IProjectService projectService)
 {
     _userService        = userService;
     _codeService        = codeService;
     _userAndRuleService = userAndRuleService;
     _ruleService        = ruleService;
     _projectService     = projectService;
 }
 public RulesController(IRuleService rulesService,
                        IRuleExecutionService executionService,
                        IDatabaseEnvironmentService databaseEnvironmentService)
 {
     _rulesService = rulesService;
     _databaseEnvironmentService = databaseEnvironmentService;
     _executionService           = executionService;
 }
 public ManageRule()
 {
     InitializeComponent();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
     _ruleService = new RuleService();
 }
Example #13
0
 public SurveyService(ISurveyRepository surveyRepository, ICacheStorage cacheStorage, ILogger logger, ICmsService cmsService, IRuleService ruleService, IUserService userService)
 {
     _surveyRepository = surveyRepository;
     _cacheStorage     = cacheStorage;
     _logger           = logger;
     _cmsService       = cmsService;
     _ruleService      = ruleService;
     _userService      = userService;
 }
Example #14
0
 public ProductRuleEvaluatorTask(
     SmartDbContext db,
     IRuleService ruleService,
     IProductRuleProvider productRuleProvider)
 {
     _db                  = db;
     _ruleService         = ruleService;
     _productRuleProvider = productRuleProvider;
 }
 public MessageRoutingSystemErrorService()
 {
     _ruleService = new RuleService();
     _poolService = new PoolService();
     _messagePoolService = new MessagePoolService();
     _messageService = new MessageService();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
 }
Example #16
0
        public GameService(ICardDeskService cardDeskService, IPlayerService playerService, IRuleService ruleService
                           , IAutomaticPlayerService automaticPlayerService)
        {
            _cardDeskService        = cardDeskService;
            _playerService          = playerService;
            _ruleService            = ruleService;
            _automaticPlayerService = automaticPlayerService;

            Games = new List <Game>();
        }
Example #17
0
 public RuleController(IRuleService ruleService)
 {
     _ruleService = ruleService;
     _mapper      = new Mapper(new MapperConfiguration(cfg =>
     {
         cfg.CreateMap <Rule, RuleBasicDTO>();
         cfg.CreateMap <Rule, RuleAdminDTO>();
         cfg.CreateMap <Rule, RuleDetailedDTO>().ReverseMap();
     }));
 }
 public DefaultRuleRunnerService(IGrainFactory grainFactory,
                                 IEventStore eventStore,
                                 IEventDataFormatter eventDataFormatter,
                                 IRuleService ruleService)
 {
     this.grainFactory       = grainFactory;
     this.eventDataFormatter = eventDataFormatter;
     this.eventStore         = eventStore;
     this.ruleService        = ruleService;
 }
        public CategoryPageViewModel(ICategoryService categoryService, IWalletCategoryService walletCategoryService, IRuleService ruleService)
        {
            this.categoryService       = categoryService;
            this.walletCategoryService = walletCategoryService;
            this.ruleService           = ruleService;
            modified = false;

            DeleCategoryCommand = new AsyncCommandHandler(DeleteCategory);

            Category = new Category();
        }
Example #20
0
 public FunctionFacadeService(IMapper <RuleFunctionBase, FunctionDTODescriptionWithActions> functionWithActionMapper,
                              IMapper <RuleFunctionBase, FunctionDTO> functionMapper,
                              IFunctionService functionService,
                              IPolicyRepository policyRep, IRuleService ruleService)
 {
     this.functionWithActionMapper = functionWithActionMapper;
     this.functionMapper           = functionMapper;
     this.functionService          = functionService;
     this.policyRep   = policyRep;
     this.ruleService = ruleService;
 }
 public TargetGroupEvaluatorTask(
     SmartDbContext db,
     IRuleService ruleService,
     ITargetGroupService targetGroupService,
     ICacheManager cache)
 {
     _db                 = db;
     _ruleService        = ruleService;
     _targetGroupService = targetGroupService;
     _cache              = cache;
 }
 public PgCostStatusResolver(
     EFContext efContext,
     ILogger logger,
     ICostStageRevisionService costStageRevisionService,
     IRuleService ruleService)
 {
     _efContext = efContext;
     _logger    = logger;
     _costStageRevisionService = costStageRevisionService;
     _ruleService = ruleService;
 }
 public PgStageBuilder(IRuleService ruleService,
                       EFContext efContext,
                       ICostStageRevisionService costStageRevisionService,
                       IPgCostService pgCostService
                       )
 {
     _ruleService = ruleService;
     _efContext   = efContext;
     _costStageRevisionService = costStageRevisionService;
     _pgCostService            = pgCostService;
 }
 public MessageRoutingSystemErrorService(IRuleService ruleService, IPoolService poolService,
     IMessagePoolService messagePoolService, IMessageService messageService,
     IApplicationService applicationService, IMachineService machineService)
 {
     _ruleService = ruleService;
     _poolService = poolService;
     _messagePoolService = messagePoolService;
     _messageService = messageService;
     _applicationService = applicationService;
     _machineService = machineService;
 }
Example #25
0
 public TargetGroupService(
     SmartDbContext db,
     IRuleService ruleService,
     IStoreContext storeContext,
     ILocalizationService localizationService)
     : base(RuleScope.Customer)
 {
     _db                  = db;
     _ruleService         = ruleService;
     _storeContext        = storeContext;
     _localizationService = localizationService;
 }
Example #26
0
 public JobRunner(ITagService tagService,
                  IContainerService containerService,
                  IDatabaseEnvironmentService databaseEnvironmentService,
                  IRuleExecutionService executionService,
                  IRuleService ruleService)
 {
     _tagService                 = tagService;
     _containerService           = containerService;
     _databaseEnvironmentService = databaseEnvironmentService;
     _executionService           = executionService;
     _ruleService                = ruleService;
 }
 public PgActionBuilder(
     EFContext efContext,
     IRuleService ruleService,
     ICustomObjectDataService customObjectDataService,
     IPgCostUserRoleService costUserRoleService
     )
 {
     _efContext = efContext;
     _ruleService = ruleService;
     _customObjectDataService = customObjectDataService;
     _costUserRoleService = costUserRoleService;
 }
Example #28
0
 public TargetGroupService(
     SmartDbContext db,
     IRuleService ruleService,
     IStoreContext storeContext,
     LocalizedEntityHelper localizedEntityHelper)
     : base(RuleScope.Customer)
 {
     _db                    = db;
     _ruleService           = ruleService;
     _storeContext          = storeContext;
     _localizedEntityHelper = localizedEntityHelper;
 }
Example #29
0
 public CartRuleProvider(
     IComponentContext componentContext,
     IRuleService ruleService,
     IWorkContext workContext,
     IStoreContext storeContext)
     : base(RuleScope.Cart)
 {
     _componentContext = componentContext;
     _ruleService      = ruleService;
     _workContext      = workContext;
     _storeContext     = storeContext;
 }
Example #30
0
        public AddRulesForm(MainForm main, IFirewallService firewallService,
                            IRuleService ruleService, IOptionsService optionsService)
            : base(main, optionsService)
        {
            this.firewallService = firewallService;
            this.ruleService     = ruleService;
            this.optionsService  = optionsService;

            InitializeComponent();

            FillCombos();
            LoadRules();
        }
Example #31
0
 public PageController(IPageService service,
                       ICookie cookie,
                       ILayoutService layoutService,
                       IWidgetBasePartService widgetService,
                       IRuleService ruleService,
                       IApplicationSettingService applicationSettingService)
     : base(service)
 {
     _cookie                    = cookie;
     _layoutService             = layoutService;
     _widgetService             = widgetService;
     _ruleService               = ruleService;
     _applicationSettingService = applicationSettingService;
 }
Example #32
0
        public DefaultRuleRunnerService(IGrainFactory grainFactory,
                                        IEventStore eventStore,
                                        IEventDataFormatter eventDataFormatter,
                                        IRuleService ruleService)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter));
            Guard.NotNull(eventStore, nameof(eventStore));
            Guard.NotNull(ruleService, nameof(ruleService));

            this.grainFactory       = grainFactory;
            this.eventDataFormatter = eventDataFormatter;
            this.eventStore         = eventStore;
            this.ruleService        = ruleService;
        }
Example #33
0
 public RuleFacadeService(IMapper <RuleBase, RuleDTOWithAction> ruleWithActionMapper,
                          IMapper <RuleWithPolicyData, RuleDTO> ruleMapper,
                          IMapper <RuleTrail, RuleTrailDTOWithAction> ruleTrailWithActionsMapper,
                          IMapper <RuleTrail, RuleTrailDTO> ruleTrailMapper,
                          IPMSRuleService pmsRuleService,
                          IPolicyRepository policyRep, IRuleService ruleService)
 {
     this.ruleWithActionMapper       = ruleWithActionMapper;
     this.ruleTrailWithActionsMapper = ruleTrailWithActionsMapper;
     this.ruleTrailMapper            = ruleTrailMapper;
     this.ruleMapper     = ruleMapper;
     this.pmsRuleService = pmsRuleService;
     this.policyRep      = policyRep;
     this.ruleService    = ruleService;
 }
Example #34
0
 public ProductRuleProvider(
     ICommonServices services,
     IRuleService ruleService,
     ICatalogSearchService catalogSearchService,
     ICategoryService categoryService,
     ILocalizationService localizationService,
     CatalogSettings catalogSettings)
     : base(RuleScope.Product)
 {
     _services             = services;
     _ruleService          = ruleService;
     _catalogSearchService = catalogSearchService;
     _categoryService      = categoryService;
     _localizationService  = localizationService;
     _catalogSettings      = catalogSettings;
 }
        public void Initialize()
        {
            MockUow = new Mock<IMessageRoutingSystemUow>();
            MockUow.Setup(x => x.Rules).Returns(MockRepoRule.Object);
            MockUow.Setup(x => x.Pools).Returns(MockRepoPool.Object);
            MockUow.Setup(x => x.Applications).Returns(MockRepoApplication.Object);
            MockUow.Setup(x => x.ApplicationGroups).Returns(MockRepoApplicationGroup.Object);
            MockUow.Setup(x => x.ApplicationGroupMaps).Returns(MockRepoApplicationGroupMap.Object);
            MockUow.Setup(x => x.Machines).Returns(MockRepoMachine.Object);
            MockUow.Setup(x => x.MachineGroups).Returns(MockRepoMachineGroup.Object);
            MockUow.Setup(x => x.MachineGroupMaps).Returns(MockRepoMachineGroupMap.Object);
            MockUow.Setup(x => x.MessagePools).Returns(MockRepoMessagePool.Object);
            MockUow.Setup(x => x.Messages).Returns(MockRepoMessage.Object);
            MockUow.Setup(x => x.Priorities).Returns(MockRepoPriority.Object);

            RuleService = new RuleService(MockUow.Object);
            PoolService = new PoolService(MockUow.Object);
            ApplicationService = new ApplicationService(MockUow.Object);
            MachineService = new MachineService(MockUow.Object);
            MessagePoolService = new MessagePoolService(MockUow.Object);
            MessageService = new MessageService(MockUow.Object);
            PriorityService = new PriorityService(MockUow.Object);
        }
Example #36
0
 public RuleController(IRuleService ruleService)
 {
     _ruleService = ruleService;
 }
 public RuleController()
 {
     this.ruleService = new RuleService();
     this.toolBoxService = new ToolBoxService();
     this.catService = new CutterAdapterTypeService();
 }
Example #38
0
 public RuleController(IRuleService service)
 {
     ruleService = service;
 }
 public Ctor_ruleService_identityPropertyName()
 {
     _ruleService = new Mock<IRuleService>().Object;
 }
 public void SetUp()
 {
     _rp = new RuleService();
 }