Beispiel #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;
 }
 internal PendingBrandNotificationBuilder(IMapper mapper,
                                          IApplicationUriHelper uriHelper, ICostStageRevisionService costStageRevisionService, IApprovalService approvalService,
                                          ICustomObjectDataService customObjectDataService,
                                          IPgPaymentService pgPaymentService,
                                          ICostStageService costStageService,
                                          IMetadataProviderService metadataProviderService,
                                          AppSettings appSettings,
                                          EFContext efContext,
                                          IRegionsService regionsService) :
     base(mapper, uriHelper, costStageRevisionService, metadataProviderService, appSettings, efContext, regionsService)
 {
     _approvalService         = approvalService;
     _customObjectDataService = customObjectDataService;
     _pgPaymentService        = pgPaymentService;
     _costStageService        = costStageService;
 }
 public PgPurchaseOrderService(EFContext efContext,
                               IOptions <AppSettings> appSettings,
                               IPgLedgerMaterialCodeService ledgerMaterialCode,
                               ICustomObjectDataService customDataService,
                               IPgCurrencyService pgCurrencyService,
                               ILogger logger,
                               IPgPaymentService pgPaymentService,
                               ICostExchangeRateService costExchangeRateService)
 {
     _efContext               = efContext;
     _ledgerMaterialCode      = ledgerMaterialCode;
     _customDataService       = customDataService;
     _appSettings             = appSettings.Value;
     _currencyService         = pgCurrencyService;
     _logger                  = logger;
     _pgPaymentService        = pgPaymentService;
     _costExchangeRateService = costExchangeRateService;
 }
Beispiel #4
0
 public PgPurchaseOrderResponseConsumer(EFContext efContext,
                                        ICustomObjectDataService customDataService,
                                        IMapper mapper,
                                        IApprovalService approvalService,
                                        IEmailNotificationService emailNotificationService,
                                        ICostActionService costActionService,
                                        IEventService eventService,
                                        IPgPaymentService pgPaymentService,
                                        IActivityLogService activityLogService)
 {
     _efContext                = efContext;
     _customDataService        = customDataService;
     _mapper                   = mapper;
     _approvalService          = approvalService;
     _emailNotificationService = emailNotificationService;
     _costActionService        = costActionService;
     _eventService             = eventService;
     _pgPaymentService         = pgPaymentService;
     _activityLogService       = activityLogService;
 }
Beispiel #5
0
 public EmailNotificationBuilder(IMapper mapper,
                                 IApplicationUriHelper uriHelper, ICostStageRevisionService costStageRevisionService,
                                 IApprovalService approvalService, IRegionsService regionsService,
                                 IOptions <AppSettings> appSettings, ICostFormService costFormService,
                                 ICustomObjectDataService customObjectDataService,
                                 IPgPaymentService pgPaymentService,
                                 ICostStageService costStageService,
                                 IMetadataProviderService metadataProviderService,
                                 EFContext efContext)
 {
     _mapper    = mapper;
     _uriHelper = uriHelper;
     _costStageRevisionService = costStageRevisionService;
     _approvalService          = approvalService;
     _regionsService           = regionsService;
     _costFormService          = costFormService;
     _customObjectDataService  = customObjectDataService;
     _pgPaymentService         = pgPaymentService;
     _costStageService         = costStageService;
     _metadataProviderService  = metadataProviderService;
     _efContext   = efContext;
     _appSettings = appSettings.Value;
 }
        public void Init()
        {
            var ruleEngine   = GetService <IRuleEngine>();
            var efContext    = GetService <EFContext>();
            var ruleBuilders = GetService <IEnumerable <Lazy <IVendorRuleBuilder, PluginMetadata> > >();
            var ruleServices = GetService <IEnumerable <Lazy <IPluginRuleService, PluginMetadata> > >();

            Service = new RuleService(ruleBuilders, ruleServices, ruleEngine, efContext);

            _costStageRevisionServiceMock = new Mock <ICostStageRevisionService>();
            _customDataServiceMock        = new Mock <ICustomObjectDataService>();
            _loggerMock                      = new Mock <ILogger>();
            _currencyService                 = new Mock <ICurrencyService>();
            _costExchangeRateServiceMock     = new Mock <ICostExchangeRateService>();
            _pgLedgerMaterialCodeServiceMock = new Mock <IPgLedgerMaterialCodeService>();
            _appSettingsMock                 = new Mock <IOptions <AppSettings> >();
            _pgCostServiceMock               = new Mock <IPgCostService>();

            _efContext               = EFContextFactory.CreateInMemoryEFContext();
            _pgCurrencyService       = new PgCurrencyService(_efContext);
            _customObjectDataService = new Mock <ICustomObjectDataService>();

            var pgStageBuilder = new PgStageBuilder(Service,
                                                    _efContext,
                                                    _costStageRevisionServiceMock.Object,
                                                    _pgCostServiceMock.Object
                                                    );

            var stageBuilders = new List <Lazy <IStageBuilder, PluginMetadata> >
            {
                new Lazy <IStageBuilder, PluginMetadata>(
                    () => pgStageBuilder,
                    new PluginMetadata {
                    BuType = BuType.Pg
                }
                    )
            };

            var stageService = new StageService(stageBuilders);

            _pgTotalsBuilder        = new PgCostSectionTotalsBuilder();
            _pgTotalPaymentsBuilder = new PgCostStageRevisionTotalPaymentsBuilder();

            var paymentService = new PgPaymentService(
                _efContext,
                _costStageRevisionServiceMock.Object,
                Service,
                stageService,
                _pgCurrencyService,
                _pgTotalsBuilder,
                _pgTotalPaymentsBuilder,
                _customObjectDataService.Object
                );

            _pgPaymentService = paymentService;
            _paymentService   = paymentService;

            _purchaseOrderService = new PgPurchaseOrderService(
                _efContext,
                _appSettingsMock.Object,
                _pgLedgerMaterialCodeServiceMock.Object,
                _customDataServiceMock.Object,
                _pgCurrencyService,
                _loggerMock.Object,
                _pgPaymentService,
                _costExchangeRateServiceMock.Object);
        }