public CustomerController(IAuthenticationService authenticationService,
     ILocalizationService localizationService,
      IWorkContext workContext,
      ICustomerService customerService,
      ICustomerRegistrationService customerRegistrationService,
     CustomerSettings customerSettings,
      IAddressService addressService,
      IWebHelper webHelper,
      LocalizationSettings localizationSettings, 
     CaptchaSettings captchaSettings,
     SecuritySettings securitySettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     ICustomerActivityService customerActivityService,
     DateTimeSettings dateTimeSettings,
     IDateTimeHelper dateTimeHelper,
     IGenericAttributeService genericAttributeService,
     IPermissionService permissionService)
 {
     this._authenticationService = authenticationService;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._customerRegistrationService = customerRegistrationService;
     this._customerService = customerService;
     this._customerSettings = customerSettings;
     this._addressService = addressService;
     this._webHelper = webHelper;
     this._localizationSettings = localizationSettings;
     this._captchaSettings = captchaSettings;
     this._securitySettings = securitySettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._customerActivityService = customerActivityService;
     this._dateTimeSettings = dateTimeSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._genericAttributeService = genericAttributeService;
 }
 public PWSService()
 {
     _db = new PWS_DatabaseEntities();
     _addressService = new AddressService(_db);
     _riskAssessmentService = new RiskAssessmentService(_db);
     _riskQuestionsService = new RiskQuestionService(_db);
 }
 public ShippingController(IShippingService shippingService, 
     ShippingSettings shippingSettings,
     ISettingService settingService,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ILocalizationService localizationService, 
     IPermissionService permissionService,
      ILocalizedEntityService localizedEntityService,
     ILanguageService languageService,
     IPluginFinder pluginFinder,
     IWebHelper webHelper)
 {
     this._shippingService = shippingService;
     this._shippingSettings = shippingSettings;
     this._settingService = settingService;
     this._addressService = addressService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
     this._pluginFinder = pluginFinder;
     this._webHelper = webHelper;
 }
Beispiel #4
0
        public new void SetUp()
        {
            _taxSettings = new TaxSettings();
            _taxSettings.DefaultTaxAddressId = 10;

            _workContext = null;

            _addressService = MockRepository.GenerateMock<IAddressService>();
            //default tax address
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address { Id = _taxSettings.DefaultTaxAddressId });

            var pluginFinder = new PluginFinder();

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            _geoLookupService = MockRepository.GenerateMock<IGeoLookupService>();
            _countryService = MockRepository.GenerateMock<ICountryService>();
            _logger = MockRepository.GenerateMock<ILogger>();
            _customerSettings = new CustomerSettings();
            _addressSettings = new AddressSettings();

            _taxService = new TaxService(_addressService, _workContext, _taxSettings,
                pluginFinder, _geoLookupService, _countryService, _logger
                , _customerSettings, _addressSettings);
        }
 public SettingController(ISettingService settingService,
     ICountryService countryService, IStateProvinceService stateProvinceService,
     IAddressService addressService, ITaxCategoryService taxCategoryService,
     ICurrencyService currencyService, IPictureService pictureService, 
     ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
     IOrderService orderService, IEncryptionService encryptionService,
     IThemeProvider themeProvider, ICustomerService customerService, 
     ICustomerActivityService customerActivityService, IPermissionService permissionService,
     IWebHelper webHelper, IFulltextService fulltextService, 
     IMaintenanceService maintenanceService, IStoreService storeService,
     IWorkContext workContext, IGenericAttributeService genericAttributeService)
 {
     this._settingService = settingService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._addressService = addressService;
     this._taxCategoryService = taxCategoryService;
     this._currencyService = currencyService;
     this._pictureService = pictureService;
     this._localizationService = localizationService;
     this._dateTimeHelper = dateTimeHelper;
     this._orderService = orderService;
     this._encryptionService = encryptionService;
     this._themeProvider = themeProvider;
     this._customerService = customerService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._webHelper = webHelper;
     this._fulltextService = fulltextService;
     this._maintenanceService = maintenanceService;
     this._storeService = storeService;
     this._workContext = workContext;
     this._genericAttributeService = genericAttributeService;
 }
Beispiel #6
0
 public CountryController(ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ICityService cityService,
     IZipcodeService zipcodeService,
     ILocalizationService localizationService,
     IAddressService addressService,
     IPermissionService permissionService,
     ILocalizedEntityService localizedEntityService,
     ILanguageService languageService,
     IStoreService storeService,
     IStoreMappingService storeMappingService,
     IExportManager exportManager,
     IImportManager importManager)
 {
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._cityService = cityService;
     this._zipcodeService = zipcodeService;
     this._localizationService = localizationService;
     this._addressService = addressService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._exportManager = exportManager;
     this._importManager = importManager;
 }
 public TournamentAdminController(ITournamentService tournamentService, ITennisClubService tennisClubService, IPlayerService playerService, IAddressService addressService)
 {
     _tournamentService = tournamentService;
     _tennisClubService = tennisClubService;
     _playerService = playerService;
     _addressService = addressService;
 }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="addressService">Address service</param>
        /// <param name="workContext">Work context</param>
        /// <param name="taxSettings">Tax settings</param>
        /// <param name="pluginFinder">Plugin finder</param>
        /// <param name="geoLookupService">GEO lookup service</param>
        /// <param name="countryService">Country service</param>
        /// <param name="customerSettings">Customer settings</param>
        /// <param name="addressSettings">Address settings</param>
        public TaxService(IAddressService addressService,
            IWorkContext workContext,
            TaxSettings taxSettings,
            IPluginFinder pluginFinder,
            IGeoLookupService geoLookupService,
            ICountryService countryService,
            CustomerSettings customerSettings,
            AddressSettings addressSettings,
            PromoSettings promoSettings,
            //IpromoService promoService,
            IPromoUtilities promoUtilities,
            ITaxServiceExtensions taxServiceExtensions)
            : base(addressService, workContext, taxSettings,
                                                    pluginFinder, geoLookupService, countryService,
                                                    customerSettings, addressSettings)
        {
            this._addressService = addressService;
            this._workContext = workContext;
            this._taxSettings = taxSettings;
            this._pluginFinder = pluginFinder;
            this._geoLookupService = geoLookupService;
            this._countryService = countryService;
            this._customerSettings = customerSettings;
            this._addressSettings = addressSettings;

            this._promoSettings = promoSettings;
            //this._promoService = promoService;
            this._promoUtilities = promoUtilities;
            this._taxServiceExtensions = taxServiceExtensions;
        }
Beispiel #9
0
        public AddressController(IUnitOfWork unitOfWork, IAddressService addressService,IApplicationUserManager userManager)
        {
            _unitOfWork = unitOfWork;
            _addressService = addressService;
            _userManager = userManager;

        }
 public SportCentersController(
     ISportCategoryService sportCategories,
     IAddressService addressService,
     ISportCategoryService categoryService,
     ISportCenterService sportCenterService)
     : base(sportCategories, addressService, categoryService, sportCenterService)
 {
 }
 public UserController(
     ISportCategoryService sportCategories, 
     IAddressService addressService, 
     ISportCategoryService categoryService,
     IUserService userService)
     : base(sportCategories,addressService,categoryService)
 {
     this.userService = userService;
 }
 public AdvancedController(
     ISportCategoryService sportCategories,
     IAddressService addressService,
     ISportCategoryService categoryService,
     ISportCenterService sportCenterService)
     : base(sportCategories, addressService, categoryService)
 {
     this.sportCenterService = sportCenterService;
 }
Beispiel #13
0
 public UserController(
     ILocationService locationService,
     IContactService contactService,
     IAddressService addressService)
 {
     this.locationService = locationService;
     this.contactService = contactService;
     this.addressService = addressService;
 }
        public void Setup()
        {
            AutoMapperConfiguration.Configure();
            Mapper.AssertConfigurationIsValid();

            this.formsAuthentication = new FakeFormsAuthentication();
            this.formsAuthentication.SetAuthenticationToken("*****@*****.**", true);
            this.addressService = new FakeAddressService();
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="addressService">Address service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 public TaxService(IAddressService addressService,
     IWorkContext workContext,
     TaxSettings taxSettings,
     IPluginFinder pluginFinder)
 {
     _addressService = addressService;
     _workContext = workContext;
     _taxSettings = taxSettings;
     _pluginFinder = pluginFinder;
 }
Beispiel #16
0
 public AddressService(IAddressService Provider = null)
 {
     if (Provider != null)
     {
         this.Provider = Provider;
     }
     else
     {
         this.Provider = new WebServiceAddressProvider(new DefaultApiSettings());
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberController"/> class.
 /// </summary>
 /// <param name="formsAuthentication">
 /// The forms authentication.
 /// </param>
 /// <param name="membershipService">
 /// The membership service.
 /// </param>
 /// <param name="addressService">
 /// The address service.
 /// </param>
 /// <param name="transactionService">
 /// The transaction Service.
 /// </param>
 public MemberController(
     IFormsAuthentication formsAuthentication,
     IMembershipService membershipService,
     IAddressService addressService,
     ITransactionService transactionService)
     : base(formsAuthentication)
 {
     this.membershipService = membershipService;
     this.addressService = addressService;
     this.transactionService = transactionService;
 }
 public UsersController(
     ISportCategoryService sportCategories,
     IAddressService addressService,
     ISportCategoryService categoryService,
     ISportCenterService sportCenterService,
     IUserService usersService,
     IMessageService messageService)
     : base(sportCategories, addressService, categoryService)
 {
     this.usersService=usersService;
     this.messageService = messageService;
 }
Beispiel #19
0
        public OrderController(IOrderService orderService, 
            IOrderReportService orderReportService, IOrderProcessingService orderProcessingService,
            IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter, ILocalizationService localizationService,
            IWorkContext workContext, ICurrencyService currencyService,
            IEncryptionService encryptionService, IPaymentService paymentService,
            IMeasureService measureService, IPdfService pdfService,
            IAddressService addressService, ICountryService countryService,
            IStateProvinceService stateProvinceService, IProductService productService,
            IExportManager exportManager, IPermissionService permissionService,
            IWorkflowMessageService workflowMessageService,
            ICategoryService categoryService, IManufacturerService manufacturerService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser,
            IProductAttributeFormatter productAttributeFormatter, IShoppingCartService shoppingCartService,
            IGiftCardService giftCardService, IDownloadService downloadService,
            IShipmentService shipmentService,
            CatalogSettings catalogSettings, CurrencySettings currencySettings, TaxSettings taxSettings,
            MeasureSettings measureSettings, PdfSettings pdfSettings)
        {
            this._orderService = orderService;
            this._orderReportService = orderReportService;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._encryptionService = encryptionService;
            this._paymentService = paymentService;
            this._measureService = measureService;
            this._pdfService = pdfService;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._productService = productService;
            this._exportManager = exportManager;
            this._permissionService = permissionService;
            this._workflowMessageService = workflowMessageService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeFormatter = productAttributeFormatter;
            this._shoppingCartService = shoppingCartService;
            this._giftCardService = giftCardService;
            this._downloadService = downloadService;
            this._shipmentService = shipmentService;

            this._catalogSettings = catalogSettings;
            this._currencySettings = currencySettings;
            this._taxSettings = taxSettings;
            this._measureSettings = measureSettings;
            this._pdfSettings = pdfSettings;
        }
        public static AddressController GetInitialisedAddressController(IAddressService addressService)
        {
            var controller = new AddressController(addressService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
 public CountryController(ICountryService countryService,
     IStateProvinceService stateProvinceService, ILocalizationService localizationService,
     IAddressService addressService, IPermissionService permissionService,
     ILocalizedEntityService localizedEntityService, ILanguageService languageService)
 {
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._localizationService = localizationService;
     this._addressService = addressService;
     this._permissionService = permissionService;
     this._localizedEntityService = localizedEntityService;
     this._languageService = languageService;
 }
 public AccountController(ICustomerService customerService, IWorkContext workContext, HttpContextBase httpContext, IAuthenticationService authenticationService, IWebHelper webHelper
     , IAddressService addressService
     , IWorkflowMessageService workflowMessageService
     , IZipCodeService zipCodeService)
 {
     this._customerService = customerService;
     this._workContext = workContext;
     this._authenticationService = authenticationService;
     this._webHelper = webHelper;
     this._httpContext = httpContext;
     this._addressService = addressService;
     this._workflowMessageService = workflowMessageService;
     this._zipCodeService = zipCodeService;
 }
 public CheckoutDataRepository(IAddressService addressService, IPaymentMethodService paymentMethodService, IAccountService accountService)
 {
     _addressService = addressService;
     _paymentMethodService = paymentMethodService;
     _accountService = accountService;
     if (accountService != null)
     {
         accountService.UserChanged += (sender, args) =>
                                           {
                                               ExpireCachedAddresses();
                                               ExpireCachedPaymentMethods();
                                           };
     }
 }
        public virtual Address BuildAddress(string street, string number, string city, string state, IAddressService addressService)
        {
            /* Singleton - Possibilita que um mesmo builder(AddressBuilder)
               crie N products(Address) injetando a mesma instância de service(AddressService) */
            if (AddressService == null || !(AddressService.GetType() == addressService.GetType()))
                AddressService = addressService;

            address = new Address(AddressService);

            BuildAddressOptions();
            BuildProperties(street, number, city, state);

            return address;
        }
Beispiel #25
0
 public NopService()
 {
     _addressService = EngineContext.Current.Resolve<IAddressService>();
     _countryService = EngineContext.Current.Resolve<ICountryService>();
     _stateProvinceService = EngineContext.Current.Resolve<IStateProvinceService>();
     _customerService = EngineContext.Current.Resolve<ICustomerService>();
     _customerSettings = EngineContext.Current.Resolve<CustomerSettings>();
     _permissionSettings = EngineContext.Current.Resolve<IPermissionService>();
     _orderProcessingService = EngineContext.Current.Resolve<IOrderProcessingService>();
     _orderService = EngineContext.Current.Resolve<IOrderService>();
     _authenticationService = EngineContext.Current.Resolve<IAuthenticationService>();
     _workContext = EngineContext.Current.Resolve<IWorkContext>();
     _pluginFinder = EngineContext.Current.Resolve<IPluginFinder>();
 }
 public PickupInStoreController(IAddressService addressService,
     ICountryService countryService,
     ILocalizationService localizationService,
     IPermissionService permissionService,
     IStorePickupPointService storePickupPointService,
     IStoreService storeService)
 {
     this._addressService = addressService;
     this._countryService = countryService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._storePickupPointService = storePickupPointService;
     this._storeService = storeService;
 }
 public PickupInStoreProvider(IAddressService addressService,
     ICountryService countryService,
     ILocalizationService localizationService,
     IStoreContext storeContext,
     IStorePickupPointService storePickupPointService,
     StorePickupPointObjectContext objectContext)
 {
     this._addressService = addressService;
     this._countryService = countryService;
     this._localizationService = localizationService;
     this._storeContext = storeContext;
     this._storePickupPointService = storePickupPointService;
     this._objectContext = objectContext;
 }
        public AmazonPayApi(
			ICountryService countryService,
			IStateProvinceService stateProvinceService,
			IOrderService orderService,
			ILocalizationService localizationService,
			IAddressService addressService,
			IDateTimeHelper dateTimeHelper)
        {
            _countryService = countryService;
            _stateProvinceService = stateProvinceService;
            _orderService = orderService;
            _localizationService = localizationService;
            _addressService = addressService;
            _dateTimeHelper = dateTimeHelper;
        }
        public CorreiosComputationMethod(IMeasureService measureService,
			IShippingService shippingService, ISettingService settingService,
			CorreiosSettings correiosSettings, IOrderTotalCalculationService orderTotalCalculationService,
			ICurrencyService currencyService, CurrencySettings currencySettings, ShippingSettings shippingSettings, IAddressService addressService, ILogger logger)
        {
            this._measureService = measureService;
            this._shippingService = shippingService;
            this._settingService = settingService;
            this._correiosSettings = correiosSettings;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._currencyService = currencyService;
            this._currencySettings = currencySettings;
            this._shippingSettings = shippingSettings;
            this._addressService = addressService;
            this._logger = logger;
        }
        public AddressController(IAddressService addressService, IEmployeeService employeeService)
        {
            _addressService = addressService;
            _employeeService = employeeService;

            Mapper.CreateMap<AddressDTO, Address>()
               .AfterMap(
                   (src, dest) => dest.Employees = _employeeService.FindBy(t => t.Id == src.EmployeesId)
               );
            Mapper.CreateMap<Address, AddressDTO>()
                .AfterMap(
                    (src, dest) => dest.EmployeesId = src.Employees.Id
                );

            Mapper.CreateMap<List<Address>, List<AddressDTO>>();
        }
 public WarehouseController(IWarehouseService warehouseService, IWarehouseModelFactory warehouseModelFactory, IAddressService addressService, IModelMapper modelMapper, CatalogSettings catalogSettings)
 {
     _warehouseService      = warehouseService;
     _warehouseModelFactory = warehouseModelFactory;
     _addressService        = addressService;
     _modelMapper           = modelMapper;
     _catalogSettings       = catalogSettings;
 }
 public AddressesController(IAddressService manager)
 {
     _manager = manager;
 }
 public EmployeeService(FestispecContext db, IAuthenticationService authenticationService, ISyncService <Employee> employeeSyncService, IAddressService addressService)
 {
     _db = db;
     _authenticationService = authenticationService;
     _employeeSyncService   = employeeSyncService;
     _addressService        = addressService;
 }
 public SubOrganizationPageController(IOrganizationService organizationService, IContentLoader contentLoader, IAddressService addressService)
 {
     _organizationService = organizationService;
     _contentLoader       = contentLoader;
     _addressService      = addressService;
 }
Beispiel #35
0
 public StudentController(IStudentService strepo, ICodeTypeService ctrepo, IAddressService adrepo, IFeeScheduleService ifrepo)
     : base(strepo, ctrepo, adrepo, ifrepo)
 {
 }
Beispiel #36
0
        public PaidRegistionController(
            IAddressModelFactory addressModelFactory,
            ICustomerModelFactory customerModelFactory,
            IAuthenticationService authenticationService,
            DateTimeSettings dateTimeSettings,
            TaxSettings taxSettings,
            ILocalizationService localizationService,
            IWorkContext workContext,
            IStoreContext storeContext,
            ICustomerService customerService,
            ICustomerAttributeParser customerAttributeParser,
            ICustomerAttributeService customerAttributeService,
            IGenericAttributeService genericAttributeService,
            ICustomerRegistrationService customerRegistrationService,
            ITaxService taxService,
            CustomerSettings customerSettings,
            AddressSettings addressSettings,
            ForumSettings forumSettings,
            IAddressService addressService,
            ICountryService countryService,
            IOrderService orderService,
            IPictureService pictureService,
            INewsLetterSubscriptionService newsLetterSubscriptionService,
            IShoppingCartService shoppingCartService,
            IOpenAuthenticationService openAuthenticationService,
            IWebHelper webHelper,
            ICustomerActivityService customerActivityService,
            IAddressAttributeParser addressAttributeParser,
            IAddressAttributeService addressAttributeService,
            IStoreService storeService,
            IEventPublisher eventPublisher,
            MediaSettings mediaSettings,
            IWorkflowMessageService workflowMessageService,
            LocalizationSettings localizationSettings,
            CaptchaSettings captchaSettings,
            StoreInformationSettings storeInformationSettings,
            IStateProvinceService stateProvinceService

            )
        {
            this._addressModelFactory         = addressModelFactory;
            this._customerModelFactory        = customerModelFactory;
            this._authenticationService       = authenticationService;
            this._dateTimeSettings            = dateTimeSettings;
            this._taxSettings                 = taxSettings;
            this._localizationService         = localizationService;
            this._workContext                 = workContext;
            this._storeContext                = storeContext;
            this._customerService             = customerService;
            this._customerAttributeParser     = customerAttributeParser;
            this._customerAttributeService    = customerAttributeService;
            this._genericAttributeService     = genericAttributeService;
            this._customerRegistrationService = customerRegistrationService;
            this._taxService       = taxService;
            this._customerSettings = customerSettings;
            this._addressSettings  = addressSettings;
            this._forumSettings    = forumSettings;
            this._addressService   = addressService;
            this._countryService   = countryService;
            this._orderService     = orderService;
            this._pictureService   = pictureService;
            this._newsLetterSubscriptionService = newsLetterSubscriptionService;
            this._shoppingCartService           = shoppingCartService;
            this._openAuthenticationService     = openAuthenticationService;
            this._webHelper = webHelper;
            this._customerActivityService  = customerActivityService;
            this._addressAttributeParser   = addressAttributeParser;
            this._addressAttributeService  = addressAttributeService;
            this._storeService             = storeService;
            this._eventPublisher           = eventPublisher;
            this._mediaSettings            = mediaSettings;
            this._workflowMessageService   = workflowMessageService;
            this._localizationSettings     = localizationSettings;
            this._captchaSettings          = captchaSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._stateProvinceService     = stateProvinceService;



            this._mapper = new MapperConfiguration(cfg => { cfg.CreateMap <RegisterModel, PaaRegisterModel>(); })
                           .CreateMapper();
        }
 public AddressAPIController(IAddressService addressService)
 {
     _addressService = addressService;
 }
Beispiel #38
0
 public AddressesController(IAddressService addressService)
 {
     this.addressService = addressService;
 }
Beispiel #39
0
 public ManageController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IUserService userService, IAddressService addressService, IOrderService _orderService, IProductService productService)
 {
     _userManager        = userManager;
     this.userService    = userService;
     _signInManager      = signInManager;
     this.addressService = addressService;
     this.orderService   = _orderService;
     this.productService = productService;
 }
Beispiel #40
0
 public AddressController(IAddressService addressService, ApplicationDbContext context)
 {
     _addressService = addressService;
     _context        = context;
 }
 public AffiliateController(IAffiliateService <AffiliateDTO> affiliateService, IAddressService addressService)
 {
     _affiiliateService = affiliateService;
     _addressService    = addressService;
 }
Beispiel #42
0
 public UserStateManagementController(
     IUserStateManagementService userStateManagement,
     ICustomerService customerService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService,
     ICustomerReportService customerReportService,
     IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     RewardPointsSettings rewardPointsSettings,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IAddressService addressService,
     CustomerSettings customerSettings,
     ITaxService taxService,
     IWorkContext workContext,
     IVendorService vendorService,
     IStoreContext storeContext,
     IPriceFormatter priceFormatter,
     IOrderService orderService,
     IExportManager exportManager,
     ICustomerActivityService customerActivityService,
     IPriceCalculationService priceCalculationService,
     IProductAttributeFormatter productAttributeFormatter,
     IPermissionService permissionService,
     IQueuedEmailService queuedEmailService,
     EmailAccountSettings emailAccountSettings,
     IEmailAccountService emailAccountService,
     ForumSettings forumSettings,
     IForumService forumService,
     IOpenAuthenticationService openAuthenticationService,
     AddressSettings addressSettings,
     IStoreService storeService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IAffiliateService affiliateService,
     IWorkflowMessageService workflowMessageService)
     : base(customerService, newsLetterSubscriptionService, genericAttributeService,
            customerRegistrationService, customerReportService, dateTimeHelper,
            localizationService, dateTimeSettings, taxSettings, rewardPointsSettings,
            countryService, stateProvinceService, addressService, customerSettings,
            taxService, workContext, vendorService, storeContext, priceFormatter,
            orderService, exportManager, customerActivityService, priceCalculationService,
            productAttributeFormatter, permissionService, queuedEmailService,
            emailAccountSettings, emailAccountService, forumSettings,
            forumService, openAuthenticationService, addressSettings,
            storeService, customerAttributeParser, customerAttributeService,
            addressAttributeParser, addressAttributeService, addressAttributeFormatter,
            affiliateService, workflowMessageService)
 {
     this._customerService = customerService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._genericAttributeService       = genericAttributeService;
     this._customerRegistrationService   = customerRegistrationService;
     this._customerReportService         = customerReportService;
     this._dateTimeHelper             = dateTimeHelper;
     this._localizationService        = localizationService;
     this._dateTimeSettings           = dateTimeSettings;
     this._taxSettings                = taxSettings;
     this._rewardPointsSettings       = rewardPointsSettings;
     this._countryService             = countryService;
     this._stateProvinceService       = stateProvinceService;
     this._addressService             = addressService;
     this._customerSettings           = customerSettings;
     this._taxService                 = taxService;
     this._workContext                = workContext;
     this._vendorService              = vendorService;
     this._storeContext               = storeContext;
     this._priceFormatter             = priceFormatter;
     this._orderService               = orderService;
     this._exportManager              = exportManager;
     this._customerActivityService    = customerActivityService;
     this._priceCalculationService    = priceCalculationService;
     this._productAttributeFormatter  = productAttributeFormatter;
     this._permissionService          = permissionService;
     this._queuedEmailService         = queuedEmailService;
     this._emailAccountSettings       = emailAccountSettings;
     this._emailAccountService        = emailAccountService;
     this._forumSettings              = forumSettings;
     this._forumService               = forumService;
     this._openAuthenticationService  = openAuthenticationService;
     this._addressSettings            = addressSettings;
     this._storeService               = storeService;
     this._customerAttributeParser    = customerAttributeParser;
     this._customerAttributeService   = customerAttributeService;
     this._addressAttributeParser     = addressAttributeParser;
     this._addressAttributeService    = addressAttributeService;
     this._addressAttributeFormatter  = addressAttributeFormatter;
     this._affiliateService           = affiliateService;
     this._workflowMessageService     = workflowMessageService;
     this._userStateManagementService = userStateManagement;
 }
Beispiel #43
0
 public AddressViewModel(IAddressService addressService)
 {
     _addressService = addressService;
 }
 public AddressesController(IAddressService addressService, IGenericService genericService)
 {
     _addressService = addressService;
     //_addressTypeService = addressTypeService;
     _genericService = genericService;
 }
 public AddressController(IAddressService AddressService, IUnitOfWorkAsync unitOfWork)
 {
     _addressService = AddressService;
     _unitOfWork     = unitOfWork;
 }
Beispiel #46
0
 public SessionTermController(IStudentService strepo, ICodeTypeService ctrepo, IAddressService adrepo, IFeeScheduleService ifrepo,
                              ISessionService issrepo, SessionDTLService isdrepo)
     : base(strepo, ctrepo, adrepo, ifrepo)
 {
     _issrepo = issrepo;
     _isdrepo = isdrepo;
 }
        public new void SetUp()
        {
            _workContext = null;

            _store = new Store {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings      = new CatalogSettings();

            var cacheManager = new NopNullCache();

            _productService = MockRepository.GenerateMock <IProductService>();

            //price calculation service
            _discountService     = MockRepository.GenerateMock <IDiscountService>();
            _categoryService     = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock <IManufacturerService>();

            _productAttributeParser = MockRepository.GenerateMock <IProductAttributeParser>();
            _priceCalcService       = new PriceCalculationService(_workContext, _storeContext,
                                                                  _discountService, _categoryService, _manufacturerService,
                                                                  _productAttributeParser, _productService,
                                                                  cacheManager, _shoppingCartSettings, _catalogSettings);

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            var pluginFinder = new PluginFinder(_eventPublisher);

            _localizationService = MockRepository.GenerateMock <ILocalizationService>();

            //shipping
            _shippingSettings = new ShippingSettings
            {
                ActiveShippingRateComputationMethodSystemNames = new List <string>()
            };
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _warehouseRepository      = MockRepository.GenerateMock <IRepository <Warehouse> >();
            _logger          = new NullLogger();
            _shippingService = new ShippingService(_shippingMethodRepository,
                                                   _warehouseRepository,
                                                   _logger,
                                                   _productService,
                                                   _productAttributeParser,
                                                   _checkoutAttributeParser,
                                                   _genericAttributeService,
                                                   _localizationService,
                                                   _addressService,
                                                   _shippingSettings,
                                                   pluginFinder,
                                                   _storeContext,
                                                   _eventPublisher,
                                                   _shoppingCartSettings,
                                                   cacheManager);
            _shipmentService = MockRepository.GenerateMock <IShipmentService>();


            _paymentService          = MockRepository.GenerateMock <IPaymentService>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _giftCardService         = MockRepository.GenerateMock <IGiftCardService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();

            _geoLookupService     = MockRepository.GenerateMock <IGeoLookupService>();
            _countryService       = MockRepository.GenerateMock <ICountryService>();
            _stateProvinceService = MockRepository.GenerateMock <IStateProvinceService>();
            _customerSettings     = new CustomerSettings();
            _addressSettings      = new AddressSettings();

            //tax
            _taxSettings = new TaxSettings
            {
                ShippingIsTaxable = true,
                PaymentMethodAdditionalFeeIsTaxable = true,
                DefaultTaxAddressId = 10
            };
            _addressService = MockRepository.GenerateMock <IAddressService>();
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address {
                Id = _taxSettings.DefaultTaxAddressId
            });
            _taxService = new TaxService(_addressService, _workContext, _storeContext, _taxSettings,
                                         pluginFinder, _geoLookupService, _countryService, _stateProvinceService, _logger, _webHelper,
                                         _customerSettings, _shippingSettings, _addressSettings);

            _rewardPointService   = MockRepository.GenerateMock <IRewardPointService>();
            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _productService, _productAttributeParser, _taxService, _shippingService, _paymentService,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService,
                                                                      _genericAttributeService, _rewardPointService,
                                                                      _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings);

            _orderService               = MockRepository.GenerateMock <IOrderService>();
            _webHelper                  = MockRepository.GenerateMock <IWebHelper>();
            _languageService            = MockRepository.GenerateMock <ILanguageService>();
            _priceFormatter             = MockRepository.GenerateMock <IPriceFormatter>();
            _productAttributeFormatter  = MockRepository.GenerateMock <IProductAttributeFormatter>();
            _shoppingCartService        = MockRepository.GenerateMock <IShoppingCartService>();
            _checkoutAttributeFormatter = MockRepository.GenerateMock <ICheckoutAttributeFormatter>();
            _customerService            = MockRepository.GenerateMock <ICustomerService>();
            _encryptionService          = MockRepository.GenerateMock <IEncryptionService>();
            _workflowMessageService     = MockRepository.GenerateMock <IWorkflowMessageService>();
            _customerActivityService    = MockRepository.GenerateMock <ICustomerActivityService>();
            _currencyService            = MockRepository.GenerateMock <ICurrencyService>();
            _affiliateService           = MockRepository.GenerateMock <IAffiliateService>();
            _vendorService              = MockRepository.GenerateMock <IVendorService>();
            _pdfService                 = MockRepository.GenerateMock <IPdfService>();
            _customNumberFormatter      = MockRepository.GenerateMock <ICustomNumberFormatter>();

            _paymentSettings = new PaymentSettings
            {
                ActivePaymentMethodSystemNames = new List <string>
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings = new OrderSettings();

            _localizationSettings = new LocalizationSettings();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _rewardPointService = MockRepository.GenerateMock <IRewardPointService>();
            _currencySettings   = new CurrencySettings();

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                                                                 _localizationService, _languageService,
                                                                 _productService, _paymentService, _logger,
                                                                 _orderTotalCalcService, _priceCalcService, _priceFormatter,
                                                                 _productAttributeParser, _productAttributeFormatter,
                                                                 _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                                                                 _shippingService, _shipmentService, _taxService,
                                                                 _customerService, _discountService,
                                                                 _encryptionService, _workContext,
                                                                 _workflowMessageService, _vendorService,
                                                                 _customerActivityService, _currencyService, _affiliateService,
                                                                 _eventPublisher, _pdfService, _rewardPointService,
                                                                 _genericAttributeService,
                                                                 _countryService, _stateProvinceService,
                                                                 _shippingSettings, _paymentSettings, _rewardPointsSettings,
                                                                 _orderSettings, _taxSettings, _localizationSettings,
                                                                 _currencySettings, _customNumberFormatter);
        }
Beispiel #48
0
        public void TestInitialize()
        {
            new Grand.Services.Tests.ServiceTest().PluginInitializator();

            _workContext          = new Mock <IWorkContext>().Object;
            _stateProvinceService = new Mock <IStateProvinceService>().Object;

            _store = new Store {
                Id = "1"
            };
            var tempStoreContext = new Mock <IStoreContext>();

            {
                tempStoreContext.Setup(x => x.CurrentStore).Returns(_store);
                _storeContext = tempStoreContext.Object;
            }

            _productService = new Mock <IProductService>().Object;
            var tempEventPublisher = new Mock <IMediator>();
            {
                //tempEventPublisher.Setup(x => x.PublishAsync(It.IsAny<object>()));
                _eventPublisher = tempEventPublisher.Object;
            }

            var pluginFinder = new PluginFinder(_serviceProvider);
            var cacheManager = new TestMemoryCacheManager(new Mock <IMemoryCache>().Object, _eventPublisher);

            _discountService        = new Mock <IDiscountService>().Object;
            _categoryService        = new Mock <ICategoryService>().Object;
            _manufacturerService    = new Mock <IManufacturerService>().Object;
            _productAttributeParser = new Mock <IProductAttributeParser>().Object;
            _vendorService          = new Mock <IVendorService>().Object;
            _currencyService        = new Mock <ICurrencyService>().Object;
            _serviceProvider        = new Mock <IServiceProvider>().Object;

            _shoppingCartSettings   = new ShoppingCartSettings();
            _catalogSettings        = new CatalogSettings();
            _customerService        = new Mock <ICustomerService>().Object;
            _customerProductService = new Mock <ICustomerProductService>().Object;

            _priceCalcService = new PriceCalculationService(_workContext, _storeContext,
                                                            _discountService, _categoryService,
                                                            _manufacturerService, _productAttributeParser, _productService, _customerProductService,
                                                            _vendorService, _currencyService,
                                                            _shoppingCartSettings, _catalogSettings);


            _localizationService = new Mock <ILocalizationService>().Object;

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = new Mock <IRepository <ShippingMethod> >().Object;
            _deliveryDateRepository   = new Mock <IRepository <DeliveryDate> >().Object;
            _warehouseRepository      = new Mock <IRepository <Warehouse> >().Object;
            _logger                  = new NullLogger();
            _paymentService          = new Mock <IPaymentService>().Object;
            _checkoutAttributeParser = new Mock <ICheckoutAttributeParser>().Object;
            _giftCardService         = new Mock <IGiftCardService>().Object;
            _genericAttributeService = new Mock <IGenericAttributeService>().Object;
            _geoLookupService        = new Mock <IGeoLookupService>().Object;
            _countryService          = new Mock <ICountryService>().Object;
            _customerSettings        = new CustomerSettings();
            _addressSettings         = new AddressSettings();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = "10";

            _shippingService = new ShippingService(_shippingMethodRepository,
                                                   _deliveryDateRepository,
                                                   _warehouseRepository,
                                                   null,
                                                   _logger,
                                                   _productService,
                                                   _productAttributeParser,
                                                   _checkoutAttributeParser,
                                                   _localizationService,
                                                   _addressService,
                                                   _countryService,
                                                   _stateProvinceService,
                                                   pluginFinder,
                                                   _storeContext,
                                                   _eventPublisher,
                                                   _currencyService,
                                                   cacheManager,
                                                   null,
                                                   _shoppingCartSettings,
                                                   _shippingSettings);



            var tempAddressService = new Mock <IAddressService>();

            {
                tempAddressService.Setup(x => x.GetAddressByIdSettings(_taxSettings.DefaultTaxAddressId))
                .ReturnsAsync(new Address {
                    Id = _taxSettings.DefaultTaxAddressId
                });
                _addressService = tempAddressService.Object;
            }

            _taxService = new TaxService(_addressService, _workContext, _taxSettings,
                                         pluginFinder, _geoLookupService, _countryService, _serviceProvider, _logger, _customerSettings, _addressSettings);

            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _taxService, _shippingService, _paymentService,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService,
                                                                      null, _productService, _currencyService, _taxSettings, _rewardPointsSettings,
                                                                      _shippingSettings, _shoppingCartSettings, _catalogSettings);
        }
Beispiel #49
0
 public AddressController(IAddressService addressService, IBlockService blockService)
 {
     _addressService = addressService;
     _blockService   = blockService;
 }
 public BaseEmailInfo(IAddressService addressService)
 {
     _addressService = addressService;
 }
 public UserAddressesApiController(IAddressService addressService)
 {
     _addressService = addressService;
 }
 public CreateModel(IAddressService addressService, ILogger <CreateModel> logger)
 {
     _addressService = addressService;
     _logger         = logger;
 }
 public SynchronyPaymentController(
     IWorkContext workContext,
     IStoreService storeService,
     ISettingService settingService,
     IPaymentService paymentService,
     IOrderService orderService,
     IOrderProcessingService orderProcessingService,
     ILocalizationService localizationService,
     IStoreContext storeContext,
     ILogger logger,
     IWebHelper webHelper,
     PaymentSettings paymentSettings,
     SynchronyPaymentSettings synchronyPaymentSettings,
     OrderSettings orderSettings,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     ITaxService taxService,
     IPriceCalculationService priceCalculationService,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     IStaticCacheManager staticCacheManager,
     INotificationService notificationService,
     IShoppingCartService shoppingCartService,
     IProductService productService,
     IShoppingCartModelFactory shoppingCartModelFactory,
     IAddressService addressService,
     IStateProvinceService stateProvinceService,
     ICustomerService customerService,
     ICheckoutModelFactory checkoutModelFactory,
     IPaymentPluginManager paymentPluginManager,
     IGiftCardService giftCardService,
     IIsamGiftCardService isamGiftCardService,
     IHttpClientFactory httpClientFactory
     )
 {
     _workContext            = workContext;
     _storeService           = storeService;
     _settingService         = settingService;
     _paymentService         = paymentService;
     _orderService           = orderService;
     _orderProcessingService = orderProcessingService;
     _localizationService    = localizationService;
     _storeContext           = storeContext;
     _logger                    = logger;
     _webHelper                 = webHelper;
     _paymentSettings           = paymentSettings;
     _synchronyPaymentSettings  = synchronyPaymentSettings;
     _orderSettings             = orderSettings;
     _currencyService           = currencyService;
     _priceFormatter            = priceFormatter;
     _taxService                = taxService;
     _priceCalculationService   = priceCalculationService;
     _productAttributeFormatter = productAttributeFormatter;
     _productAttributeParser    = productAttributeParser;
     _staticCacheManager        = staticCacheManager;
     _notificationService       = notificationService;
     _shoppingCartService       = shoppingCartService;
     _productService            = productService;
     _shoppingCartModelFactory  = shoppingCartModelFactory;
     _addressService            = addressService;
     _stateProvinceService      = stateProvinceService;
     _customerService           = customerService;
     _checkoutModelFactory      = checkoutModelFactory;
     _paymentPluginManager      = paymentPluginManager;
     _giftCardService           = giftCardService;
     _isamGiftCardService       = isamGiftCardService;
     _httpClientFactory         = httpClientFactory;
 }
 public AddressController(IAddressService coordinateService)
 {
     _coordinateService = coordinateService;
 }
 public CustomerController(ICustomerService customerService, IAddressService addressService)
 {
     _customerService = customerService;
     _addressService  = addressService;
 }
Beispiel #56
0
 public Address(IAddressService addressService)
 {
     _addressService = addressService;
 }
 public AddressModelService(IAddressService addressService, IMapper mapper)
 {
     _addressService = addressService;
     _mapper         = mapper;
 }
Beispiel #58
0
 public TenantController(ITenantRepository tenantRepository, IAddressService addressService, ILogger <TenantController> logger = null)
 {
     _tenantRepository = tenantRepository ?? throw new ArgumentNullException(nameof(tenantRepository), "Tenant cannot be null");
     _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     _addressService   = addressService ?? throw new ArgumentNullException(nameof(addressService));
 }
 public ImportEmployeeProcessor(IEmployeeService employeeService,
                                IAddressService addressService)
 {
     _employeeService = employeeService;
     _addressService  = addressService;
 }
Beispiel #60
0
 public UserService(IOnlineStoreContext context, IMapper mapper, ITownService townService, IAddressService addressService)
 {
     this.context        = context ?? throw new ArgumentNullException(nameof(context));
     this.mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
     this.townService    = townService ?? throw new ArgumentNullException(nameof(townService));
     this.addressService = addressService ?? throw new ArgumentNullException(nameof(addressService));
 }