public CheckoutAttributeFormatter(IWorkContext workContext,
            ICheckoutAttributeService checkoutAttributeService,
            ICheckoutAttributeParser checkoutAttributeParser,
            ICurrencyService currencyService,
            ITaxService taxService,
            IPriceFormatter priceFormatter,
            IDownloadService downloadService,
            IWebHelper webHelper,
            PromoSettings promoSettings,
            IPromoUtilities qixolPromoUtilities,
            IAttributeValueService attributeValueService)
            : base(workContext, checkoutAttributeService, checkoutAttributeParser,
                    currencyService, taxService, priceFormatter,
                    downloadService, webHelper)
        {
            this._workContext = workContext;
            this._checkoutAttributeService = checkoutAttributeService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._currencyService = currencyService;
            this._taxService = taxService;
            this._priceFormatter = priceFormatter;
            this._downloadService = downloadService;
            this._webHelper = webHelper;

            this._promoSettings = promoSettings;
            this._qixolPromoUtilities = qixolPromoUtilities;
            this._attributeValueService = attributeValueService;
        }
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService,
            StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;

            this._storeSettings = storeSettings;
            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
        }
        public WorkflowMessageService(
			IMessageTemplateService messageTemplateService,
            IQueuedEmailService queuedEmailService, 
			ILanguageService languageService,
            ITokenizer tokenizer, 
			IEmailAccountService emailAccountService,
            IMessageTokenProvider messageTokenProvider,
			IStoreService storeService,
			IStoreContext storeContext,
            EmailAccountSettings emailAccountSettings,
            IEventPublisher eventPublisher,
            IWorkContext workContext,
            HttpRequestBase httpRequest,
			IDownloadService downloadServioce)
        {
            this._messageTemplateService = messageTemplateService;
            this._queuedEmailService = queuedEmailService;
            this._languageService = languageService;
            this._tokenizer = tokenizer;
            this._emailAccountService = emailAccountService;
            this._messageTokenProvider = messageTokenProvider;
            this._storeService = storeService;
            this._storeContext = storeContext;
            this._emailAccountSettings = emailAccountSettings;
            this._eventPublisher = eventPublisher;
            this._workContext = workContext;
            this._httpRequest = httpRequest;
            this._downloadServioce = downloadServioce;
        }
 public CopyProductService(IProductService productService,
     IProductAttributeService productAttributeService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService, 
     IPictureService pictureService,
     ICategoryService categoryService, 
     IManufacturerService manufacturerService,
     ISpecificationAttributeService specificationAttributeService,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IUrlRecordService urlRecordService, 
     IStoreMappingService storeMappingService)
 {
     this._productService = productService;
     this._productAttributeService = productAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._pictureService = pictureService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService = downloadService;
     this._productAttributeParser = productAttributeParser;
     this._urlRecordService = urlRecordService;
     this._storeMappingService = storeMappingService;
 }
        public new void SetUp()
        {
			_store = new Store() { Id = 1 };
			_storeContext = MockRepository.GenerateMock<IStoreContext>();
			_storeContext.Expect(x => x.CurrentStore).Return(_store);

            _discountService = MockRepository.GenerateMock<IDiscountService>();

            _categoryService = MockRepository.GenerateMock<ICategoryService>();

            _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>();
			_productService = MockRepository.GenerateMock<IProductService>();
			_productAttributeService = MockRepository.GenerateMock<IProductAttributeService>();

			_downloadService = MockRepository.GenerateMock<IDownloadService>();
			_commonServices = MockRepository.GenerateMock<ICommonServices>();
			_commonServices.Expect(x => x.StoreContext).Return(_storeContext);
			_httpRequestBase = MockRepository.GenerateMock<HttpRequestBase>();
			_taxService = MockRepository.GenerateMock<ITaxService>();

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

			_priceCalcService = new PriceCalculationService(_discountService, _categoryService, _productAttributeParser, _productService, _shoppingCartSettings, _catalogSettings,
				_productAttributeService, _downloadService, _commonServices, _httpRequestBase, _taxService);
        }
        public PriceCalculationService(
            IDiscountService discountService,
			ICategoryService categoryService,
            IProductAttributeParser productAttributeParser,
			IProductService productService,
			ShoppingCartSettings shoppingCartSettings, 
            CatalogSettings catalogSettings,
			IProductAttributeService productAttributeService,
			IDownloadService downloadService,
			ICommonServices services,
			HttpRequestBase httpRequestBase,
			ITaxService taxService)
        {
            this._discountService = discountService;
            this._categoryService = categoryService;
            this._productAttributeParser = productAttributeParser;
            this._productService = productService;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings = catalogSettings;
            this._productAttributeService = productAttributeService;
            this._downloadService = downloadService;
            this._services = services;
            this._httpRequestBase = httpRequestBase;
            this._taxService = taxService;
        }
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService, IPaymentService paymentService,
            IProductAttributeParser productAttributeParser,
            MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings, IEventPublisher eventPublisher)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._paymentService = paymentService;
            this._productAttributeParser = productAttributeParser;

            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._eventPublisher = eventPublisher;
        }
Esempio n. 8
0
 public DownloadController(IDownloadService downloadService,
      IPermissionService permissionService,
     IAuthenticationService authenticationService)
 {
     this._downloadService = downloadService;
     this._permissionService = permissionService;
     this._authenticationService = authenticationService;
 }
 public LibraryMatchingService(ILibraryService libraryService, IMatchEngineService matchEngineService,
     IInsightsService insightsService, IDownloadService downloadService)
 {
     _libraryService = libraryService;
     _matchEngineService = matchEngineService;
     _insightsService = insightsService;
     _downloadService = downloadService;
 }
Esempio n. 10
0
 public DownloadController(IDownloadService downloadService, IProductService productService,
     IOrderService orderService, IWorkContext workContext, CustomerSettings customerSettings)
 {
     this._downloadService = downloadService;
     this._productService = productService;
     this._orderService = orderService;
     this._workContext = workContext;
     this._customerSettings = customerSettings;
 }
Esempio n. 11
0
 public OrderController(IOrderService orderService, 
     IShipmentService shipmentService, 
     IWorkContext workContext,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IOrderProcessingService orderProcessingService, 
     IDateTimeHelper dateTimeHelper,
     IPaymentService paymentService, 
     ILocalizationService localizationService,
     IPdfService pdfService, 
     IShippingService shippingService,
     ICountryService countryService, 
     IProductAttributeParser productAttributeParser,
     IWebHelper webHelper,
     IDownloadService downloadService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IStoreContext storeContext,
     IOrderTotalCalculationService orderTotalCalculationService,
     IRewardPointsService rewardPointsService,
     IGiftCardService giftCardService,
     CatalogSettings catalogSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     ShippingSettings shippingSettings, 
     AddressSettings addressSettings,
     RewardPointsSettings rewardPointsSettings,
     PdfSettings pdfSettings)
 {
     this._orderService = orderService;
     this._shipmentService = shipmentService;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._priceFormatter = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._dateTimeHelper = dateTimeHelper;
     this._paymentService = paymentService;
     this._localizationService = localizationService;
     this._pdfService = pdfService;
     this._shippingService = shippingService;
     this._countryService = countryService;
     this._productAttributeParser = productAttributeParser;
     this._webHelper = webHelper;
     this._downloadService = downloadService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._storeContext = storeContext;
     this._rewardPointsService = rewardPointsService;
     this._giftCardService = giftCardService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._catalogSettings = catalogSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._shippingSettings = shippingSettings;
     this._addressSettings = addressSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._pdfSettings = pdfSettings;
 }
Esempio n. 12
0
 public ProcessDownloadDecisions(IDownloadService downloadService,
                                 IPrioritizeDownloadDecision prioritizeDownloadDecision,
                                 IPendingReleaseService pendingReleaseService,
                                 Logger logger)
 {
     _downloadService = downloadService;
     _prioritizeDownloadDecision = prioritizeDownloadDecision;
     _pendingReleaseService = pendingReleaseService;
     _logger = logger;
 }
        public LevelContentResourceService(IDownloadService downloadService, int levelId, IConstants constants)
        {
            this.downloadService = downloadService;

            this.ModuleId = levelId;

            // Get all course content.
            this.fullContentLink = new Uri(constants.ServicePrefix + string.Format(levelLink, this.ModuleId, constants.CultureCode, constants.SiteVersion, constants.PartnerCode));

            // Download activity content.
            this.Content = downloadService.DownloadFromPath(this.fullContentLink);
        }
        //private readonly Uri fullContentLink;
        public CourseContentResourceService(IDownloadService downloadService, IConstants constants)
        {
            this.ModuleId = constants.CourseId;
            this.downloadService = downloadService;
            this.constants = constants;

            // Get all course content.
            var fullContentLink = new Uri(this.constants.ServicePrefix + string.Format(courseLink, this.ModuleId, this.constants.SiteVersion, this.constants.CultureCode, this.constants.PartnerCode));

            // Download activity content.
            this.Content = downloadService.DownloadFromPath(fullContentLink);
        }
        public UnitContentResourceService(IDownloadService downloadService, int unitId, IConstants constants)
        {
            this.downloadService = downloadService;
            this.ModuleId = unitId;
            this.constants = constants;

            // Get all course content.
            this.fullContentLink = new Uri(constants.ServicePrefix + string.Format(unitLink, this.ModuleId, this.constants.CultureCode, this.constants.SiteVersion, this.constants.PartnerCode));

            // Download unit content.
            this.Content = downloadService.DownloadFromPath(this.fullContentLink);
        }
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService,
            IDateTimeHelper dateTimeHelper,
            IPriceFormatter priceFormatter,
            ICurrencyService currencyService,
            IWorkContext workContext,
            IDownloadService downloadService,
            IOrderService orderService,
            IPaymentService paymentService,
            IStoreService storeService,
            IStoreContext storeContext,
            IProductAttributeParser productAttributeParser,
            IAddressAttributeFormatter addressAttributeFormatter,
            MessageTemplatesSettings templatesSettings,
            CatalogSettings catalogSettings,
            TaxSettings taxSettings,
            CurrencySettings currencySettings,
            ShippingSettings shippingSettings,
            IEventPublisher eventPublisher,
            PromoSettings promoSettings,
            IPromoOrderService promoOrderService
            )
            : base(languageService, localizationService,
            dateTimeHelper, priceFormatter, currencyService, workContext,
            downloadService, orderService, paymentService, storeService,
            storeContext, productAttributeParser,
            addressAttributeFormatter, templatesSettings, catalogSettings,
            taxSettings, currencySettings, shippingSettings, eventPublisher)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._paymentService = paymentService;
            this._productAttributeParser = productAttributeParser;
            this._addressAttributeFormatter = addressAttributeFormatter;
            this._storeService = storeService;
            this._storeContext = storeContext;

            this._templatesSettings = templatesSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._currencySettings = currencySettings;
            this._shippingSettings = shippingSettings;
            this._eventPublisher = eventPublisher;

            this._promoSettings = promoSettings;
            this._promoOrderService = promoOrderService;
        }
Esempio n. 17
0
        public OrderModelFactory(IAddressModelFactory addressModelFactory,
                                 IOrderService orderService,
                                 IWorkContext workContext,
                                 ICurrencyService currencyService,
                                 IPriceFormatter priceFormatter,
                                 IOrderProcessingService orderProcessingService,
                                 IDateTimeHelper dateTimeHelper,
                                 IPaymentService paymentService,
                                 ILocalizationService localizationService,
                                 IShippingService shippingService,
                                 ICountryService countryService,
                                 IProductAttributeParser productAttributeParser,
                                 IDownloadService downloadService,
                                 IStoreContext storeContext,
                                 IOrderTotalCalculationService orderTotalCalculationService,
                                 IRewardPointService rewardPointService,
                                 CatalogSettings catalogSettings,
                                 OrderSettings orderSettings,
                                 TaxSettings taxSettings,
                                 ShippingSettings shippingSettings,
                                 AddressSettings addressSettings,
                                 RewardPointsSettings rewardPointsSettings,
                                 PdfSettings pdfSettings)
        {
            this._addressModelFactory          = addressModelFactory;
            this._orderService                 = orderService;
            this._workContext                  = workContext;
            this._currencyService              = currencyService;
            this._priceFormatter               = priceFormatter;
            this._orderProcessingService       = orderProcessingService;
            this._dateTimeHelper               = dateTimeHelper;
            this._paymentService               = paymentService;
            this._localizationService          = localizationService;
            this._shippingService              = shippingService;
            this._countryService               = countryService;
            this._productAttributeParser       = productAttributeParser;
            this._downloadService              = downloadService;
            this._storeContext                 = storeContext;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._rewardPointService           = rewardPointService;

            this._catalogSettings      = catalogSettings;
            this._orderSettings        = orderSettings;
            this._taxSettings          = taxSettings;
            this._shippingSettings     = shippingSettings;
            this._addressSettings      = addressSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._pdfSettings          = pdfSettings;
        }
        public DownloadManagerViewModel(IDownloadService downloadService, IDataContext dataContext, IAnalyticsService analyticsService, IReleasesService releasesService)
        {
            m_DownloadService  = downloadService ?? throw new ArgumentNullException(nameof(downloadService));
            m_AnalyticsService = analyticsService ?? throw new ArgumentNullException(nameof(analyticsService));
            m_ReleasesService  = releasesService ?? throw new ArgumentNullException(nameof(releasesService));
            m_DownloadService.SetDownloadProgress(ProgressHandler);
            m_DownloadService.SetDownloadFinished(FinishHandler);
            CreateCommands();
            RestoreSettings();

            m_SelectedSection = m_Sections.First();
            m_PauseColor      = WhiteColor;
            m_PlayColor       = LightGrayColor;
            ObserverEvents.SubscribeOnEvent("synchronizedReleases", RefreshAfterSynchronize);
        }
        public static async Task <IEnumerable <ShowUpdate> > Run(
            [ActivityTrigger] DurableActivityContext context,
            [Inject(typeof(IDownloadService))] IDownloadService downloadService,
            [Inject(typeof(IConfiguration))] IConfiguration configuration,
            ILogger logger)
        {
            logger.LogInformation("Checking updates");

            string uri = $"{configuration.BaseTvMazeApiUri}/updates/shows";
            ServerResponse <Dictionary <int, int> > sr = await downloadService.GetAsync <Dictionary <int, int> >(uri);

            return(sr.Content.Select(pair => new ShowUpdate {
                ShowId = pair.Key, Timespamp = pair.Value
            }));
        }
Esempio n. 20
0
        public WowUpService(
            IAnalyticsService analyticsService,
            ICacheService cacheService,
            IDownloadService downloadService,
            IPreferenceRepository preferenceRepository,
            IWowUpApiService wowUpApiService)
        {
            _analyticsService     = analyticsService;
            _cacheService         = cacheService;
            _downloadService      = downloadService;
            _preferenceRepository = preferenceRepository;
            _wowUpApiService      = wowUpApiService;

            SetDefaultPreferences();
        }
 public SubmissionController(IRepository <SubmissionRecord> submissionRepo, IDownloadService downloadService,
                             ISettingService settings, IWorkContext workContext, ILocalizationService localizationService, CaptchaSettings captchaSettings,
                             IEmailSender emailSender, ILogger logger, IEmailAccountService emailAccountService, EmailAccountSettings emailAccountSettings)
 {
     _submissionRepo      = submissionRepo;
     _downloadService     = downloadService;
     _settings            = settings;
     _workContext         = workContext;
     _localizationService = localizationService;
     _captchaSettings     = captchaSettings;
     _emailSender         = emailSender;
     _logger = logger;
     _emailAccountService  = emailAccountService;
     _emailAccountSettings = emailAccountSettings;
 }
Esempio n. 22
0
 public OrdersController(IOrderService orderService, IOrderModelFactory orderModelFactory, ICustomLabelService customLabelService, OrderSettings orderSettings, IShipmentStatusHistoryService shipmentStatusHistoryService, IReturnRequestService returnRequestService, IReturnRequestModelFactory requestModelFactory, IOrderAccountant orderAccountant, IPdfService pdfService, IDownloadService downloadService, IOrderItemDownloadService orderItemDownloadService, IProductModelFactory productModelFactory)
 {
     _orderService                 = orderService;
     _orderModelFactory            = orderModelFactory;
     _customLabelService           = customLabelService;
     _orderSettings                = orderSettings;
     _shipmentStatusHistoryService = shipmentStatusHistoryService;
     _returnRequestService         = returnRequestService;
     _requestModelFactory          = requestModelFactory;
     _orderAccountant              = orderAccountant;
     _pdfService               = pdfService;
     _downloadService          = downloadService;
     _orderItemDownloadService = orderItemDownloadService;
     _productModelFactory      = productModelFactory;
 }
Esempio n. 23
0
 public TrackSaveService(
     ILibraryService libraryService,
     IConverter <WebSong, Track> webSongConverter,
     ILibraryMatchingService matchingService,
     IInsightsService insightsService,
     IStorageUtility storageUtility,
     IDownloadService downloadService)
 {
     _libraryService   = libraryService;
     _webSongConverter = webSongConverter;
     _matchingService  = matchingService;
     _insightsService  = insightsService;
     _storageUtility   = storageUtility;
     _downloadService  = downloadService;
 }
Esempio n. 24
0
 public TrackSaveService(
     ILibraryService libraryService,
     IConverter<WebSong, Track> webSongConverter,
     ILibraryMatchingService matchingService,
     IInsightsService insightsService,
     IStorageUtility storageUtility,
     IDownloadService downloadService)
 {
     _libraryService = libraryService;
     _webSongConverter = webSongConverter;
     _matchingService = matchingService;
     _insightsService = insightsService;
     _storageUtility = storageUtility;
     _downloadService = downloadService;
 }
 public ProductModelFactory(CaptchaSettings captchaSettings,
                            CatalogSettings catalogSettings,
                            CustomerSettings customerSettings,
                            ICategoryService categoryService,
                            ICustomerService customerService,
                            IDateTimeHelper dateTimeHelper,
                            IDownloadService downloadService,
                            ILocalizationService localizationService,
                            IPermissionService permissionService,
                            IPictureService pictureService,
                            IProductService productService,
                            IProductTagService productTagService,
                            IProductTemplateService productTemplateService,
                            IReviewTypeService reviewTypeService,
                            IStaticCacheManager cacheManager,
                            IStoreContext storeContext,
                            IUrlRecordService urlRecordService,
                            IVendorService vendorService,
                            IWebHelper webHelper,
                            IWorkContext workContext,
                            MediaSettings mediaSettings,
                            SeoSettings seoSettings,
                            VendorSettings vendorSettings)
 {
     this._captchaSettings        = captchaSettings;
     this._catalogSettings        = catalogSettings;
     this._customerSettings       = customerSettings;
     this._categoryService        = categoryService;
     this._customerService        = customerService;
     this._dateTimeHelper         = dateTimeHelper;
     this._downloadService        = downloadService;
     this._localizationService    = localizationService;
     this._permissionService      = permissionService;
     this._pictureService         = pictureService;
     this._productService         = productService;
     this._productTagService      = productTagService;
     this._productTemplateService = productTemplateService;
     this._reviewTypeService      = reviewTypeService;
     this._cacheManager           = cacheManager;
     this._storeContext           = storeContext;
     this._urlRecordService       = urlRecordService;
     this._vendorService          = vendorService;
     this._webHelper      = webHelper;
     this._workContext    = workContext;
     this._mediaSettings  = mediaSettings;
     this._seoSettings    = seoSettings;
     this._vendorSettings = vendorSettings;
 }
Esempio n. 26
0
 public MessageTokenProvider(CatalogSettings catalogSettings,
                             CurrencySettings currencySettings,
                             IActionContextAccessor actionContextAccessor,
                             IAddressAttributeFormatter addressAttributeFormatter,
                             ICurrencyService currencyService,
                             ICustomerAttributeFormatter customerAttributeFormatter,
                             ICustomerService customerService,
                             IDateTimeHelper dateTimeHelper,
                             IDownloadService downloadService,
                             IEventPublisher eventPublisher,
                             IGenericAttributeService genericAttributeService,
                             ILanguageService languageService,
                             ILocalizationService localizationService,
                             IStoreContext storeContext,
                             IStoreService storeService,
                             IUrlHelperFactory urlHelperFactory,
                             IUrlRecordService urlRecordService,
                             IVendorAttributeFormatter vendorAttributeFormatter,
                             IWorkContext workContext,
                             MessageTemplatesSettings templatesSettings,
                             PaymentSettings paymentSettings,
                             StoreInformationSettings storeInformationSettings,
                             TaxSettings taxSettings)
 {
     this._catalogSettings            = catalogSettings;
     this._currencySettings           = currencySettings;
     this._actionContextAccessor      = actionContextAccessor;
     this._addressAttributeFormatter  = addressAttributeFormatter;
     this._currencyService            = currencyService;
     this._customerAttributeFormatter = customerAttributeFormatter;
     this._customerService            = customerService;
     this._dateTimeHelper             = dateTimeHelper;
     this._downloadService            = downloadService;
     this._eventPublisher             = eventPublisher;
     this._genericAttributeService    = genericAttributeService;
     this._languageService            = languageService;
     this._localizationService        = localizationService;
     this._storeContext             = storeContext;
     this._storeService             = storeService;
     this._urlHelperFactory         = urlHelperFactory;
     this._urlRecordService         = urlRecordService;
     this._vendorAttributeFormatter = vendorAttributeFormatter;
     this._workContext              = workContext;
     this._templatesSettings        = templatesSettings;
     this._paymentSettings          = paymentSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._taxSettings              = taxSettings;
 }
Esempio n. 27
0
 public DownloadController(IDownloadService downloadService,
                           IProductService productService,
                           IOrderService orderService,
                           IMerchandiseReturnService merchandiseReturnService,
                           IWorkContext workContext,
                           ITranslationService translationService,
                           CustomerSettings customerSettings)
 {
     _downloadService          = downloadService;
     _productService           = productService;
     _orderService             = orderService;
     _merchandiseReturnService = merchandiseReturnService;
     _workContext        = workContext;
     _translationService = translationService;
     _customerSettings   = customerSettings;
 }
 public CheckoutAttributeFormatter(IWorkContext workContext,
                                   ICheckoutAttributeParser checkoutAttributeParser,
                                   ICurrencyService currencyService,
                                   ITaxService taxService,
                                   IPriceFormatter priceFormatter,
                                   IDownloadService downloadService,
                                   IWebHelper webHelper)
 {
     _workContext             = workContext;
     _checkoutAttributeParser = checkoutAttributeParser;
     _currencyService         = currencyService;
     _taxService      = taxService;
     _priceFormatter  = priceFormatter;
     _downloadService = downloadService;
     _webHelper       = webHelper;
 }
Esempio n. 29
0
        public new void SetUp()
        {
            _qeRepository       = MockRepository.GenerateMock <IRepository <QueuedEmail> >();
            _qeaRepository      = MockRepository.GenerateMock <IRepository <QueuedEmailAttachment> >();
            _downloadRepository = MockRepository.GenerateMock <IRepository <Download> >();
            _emailSender        = MockRepository.GenerateMock <IEmailSender>();
            _services           = MockRepository.GenerateMock <ICommonServices>();
            _eventPublisher     = MockRepository.GenerateMock <IEventPublisher>();

            _settingService = new ConfigFileSettingService(null, null);
            _services.Expect(x => x.Settings).Return(_settingService);

            _downloadService = new DownloadService(_downloadRepository, _eventPublisher, _settingService, ProviderManager);

            _queuedEmailService = new QueuedEmailService(_qeRepository, _qeaRepository, _emailSender, _services, _downloadService, ProviderManager);
        }
 public WidgetsCartProductPictureModifier(IWorkContext workContext,
                                          IProductAttributeFormatter productAttributeFormatter,
                                          ICustomLogoService customLogoService,
                                          MediaSettings mediaSettings,
                                          IDownloadService downloadService,
                                          IProductPictureModifierService productPictureModifierService,
                                          ILogoPositionService logoPositionService)
 {
     _workContext = workContext;
     _productAttributeFormatter     = productAttributeFormatter;
     _customLogoService             = customLogoService;
     _mediaSettings                 = mediaSettings;
     _downloadService               = downloadService;
     _productPictureModifierService = productPictureModifierService;
     _logoPositionService           = logoPositionService;
 }
 public MiscAzureBlobController(ILocalizationService localizationService,
                                ICustomerActivityService customerActivityService, IWorkContext workContext, IStoreService storeService,
                                ISettingService settingService, IPermissionService permissiionService,
                                IPictureService pictureService, IDownloadService downloadService,
                                BlobService blobService)
 {
     _settingService          = settingService;
     _pictureService          = pictureService;
     _storeService            = storeService;
     _permissionService       = permissiionService;
     _workContext             = workContext;
     _customerActivityService = customerActivityService;
     _localizationService     = localizationService;
     _downloadService         = downloadService;
     _blobService             = blobService;
 }
Esempio n. 32
0
        public Download(
            string url,
            string path,
            string filename,
            DownloadConfiguration configuration)
        {
            downloadService =
                configuration is not null ?
                new DownloadService(configuration) :
                new DownloadService();

            Url      = url;
            Folder   = path;
            Filename = filename;
            Status   = DownloadStatus.Created;
        }
Esempio n. 33
0
 private IFileDownloadService NewFileDownloadProvider(IFileDownloadDatabaseService fileDownloadDatabaseService,
                                                      IFileDownloadLoggingService loggingService,
                                                      IDownloadService downloadService,
                                                      IFilePayloadSettingsService filePayloadSettingsService,
                                                      IResourceCleanupService resourceCleanupService,
                                                      IFileDownloadMinimumWaitTimeService
                                                      fileDownloadMinimumWaitTimeService,
                                                      IDateTimeService dateTimeService,
                                                      IFilePayloadUploadService filePayloadUploadService,
                                                      IFileDownloadEmailService fileDownloadEmailService,
                                                      IDataStoreServiceFactory dataStoreServiceFactory)
 {
     return(new FileDownloadProvider(fileDownloadDatabaseService, loggingService, downloadService,
                                     filePayloadSettingsService, resourceCleanupService, fileDownloadMinimumWaitTimeService, dateTimeService,
                                     filePayloadUploadService, fileDownloadEmailService, dataStoreServiceFactory));
 }
Esempio n. 34
0
        public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IDownloadService downloadService,
                             IParsingService parsingService)
        {
            _rssFetcherAndParser   = rssFetcherAndParser;
            _nzbSearchService      = nzbSearchService;
            _downloadDecisionMaker = downloadDecisionMaker;
            _downloadService       = downloadService;
            _parsingService        = parsingService;
            GetResourceAll         = GetReleases;
            Post["/"] = x => DownloadRelease(this.Bind <ReleaseResource>());

            PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
        }
 public DownloadController(IDownloadService downloadService,
                           IProductService productService,
                           IOrderService orderService,
                           IReturnRequestService returnRequestService,
                           IWorkContext workContext,
                           ILocalizationService localizationService,
                           CustomerSettings customerSettings)
 {
     _downloadService      = downloadService;
     _productService       = productService;
     _orderService         = orderService;
     _returnRequestService = returnRequestService;
     _workContext          = workContext;
     _localizationService  = localizationService;
     _customerSettings     = customerSettings;
 }
        public static async Task <ShowWithCast> Run(
            [ActivityTrigger] int showId,
            [Inject(typeof(IDownloadService))] IDownloadService downloadService,
            [Inject(typeof(IConfiguration))] IConfiguration configuration)
        {
            string uri = $"{configuration.BaseTvMazeApiUri}/shows/{showId}?embed=cast";
            ServerResponse <EmbeddedShowInfo <CastServerModel> > sr = await downloadService.GetAsync <EmbeddedShowInfo <CastServerModel> >(uri);

            return(new ShowWithCast
            {
                Id = sr.Content.Id,
                Name = sr.Content.Name,
                Updated = sr.Content.Updated,
                Cast = sr.Content.Embedded.Cast.Select(role => role.Person)
            });
        }
Esempio n. 37
0
 public ReturnRequestModelFactory(IBaseAdminModelFactory baseAdminModelFactory,
                                  IDateTimeHelper dateTimeHelper,
                                  IDownloadService downloadService,
                                  ILocalizationService localizationService,
                                  ILocalizedModelFactory localizedModelFactory,
                                  IOrderService orderService,
                                  IReturnRequestService returnRequestService)
 {
     _baseAdminModelFactory = baseAdminModelFactory;
     _dateTimeHelper        = dateTimeHelper;
     _downloadService       = downloadService;
     _localizationService   = localizationService;
     _localizedModelFactory = localizedModelFactory;
     _orderService          = orderService;
     _returnRequestService  = returnRequestService;
 }
Esempio n. 38
0
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService, IWebHelper webHelper,
            IWorkContext workContext, IStoreContext storeContext,
			IDownloadService downloadService, ShoppingCartSettings shoppingCartSettings,
            IOrderService orderService, IProviderManager providerManager,
            IProductAttributeParser productAttributeParser,
            StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings, IEventPublisher eventPublisher,
            CompanyInformationSettings companyInfoSettings, BankConnectionSettings bankConnectionSettings,
            ContactDataSettings contactDataSettings, ITopicService topicService,
            IDeliveryTimeService deliveryTimeService, IQuantityUnitService quantityUnitService,
            IUrlRecordService urlRecordService, IStoreService storeService,
            IGenericAttributeService attrService)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._providerManager = providerManager;
            this._productAttributeParser = productAttributeParser;
            this._storeSettings = storeSettings;
            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._eventPublisher = eventPublisher;
            this._companyInfoSettings = companyInfoSettings;
            this._bankConnectionSettings = bankConnectionSettings;
            this._contactDataSettings = contactDataSettings;
            this._topicService = topicService;
            this._shoppingCartSettings = shoppingCartSettings;
            this._deliveryTimeService = deliveryTimeService;
            this._quantityUnitService = quantityUnitService;
            this._urlRecordService = urlRecordService;
            this._storeService = storeService;
            this._attrService = attrService;
        }
Esempio n. 39
0
        public BrowserViewModel(FileRequestServiceImpl registerFilesService, IDownloadService downloadService, ClientToClientService clientToClientService)
        {
            this.fileRequestService    = registerFilesService ?? throw new ArgumentNullException(nameof(registerFilesService));
            this.downloadService       = downloadService ?? throw new ArgumentNullException(nameof(downloadService));
            this.clientToClientService = clientToClientService ?? throw new ArgumentNullException(nameof(clientToClientService));

            this.DownloadCommand = new RelayCommand((arg) =>
            {
                try
                {
                    foreach (var file in this.SelectedFiles)
                    {
                        var servers = file.Clients.Select(host => new Host()
                        {
                            Name = host.Ip, Port = (int)host.Port
                        });
                        var fileEntry = new FileEntry()
                        {
                            Name = file.FileName, Hash = file.FileHash, Length = file.FileSize
                        };
                        var requests = this.clientToClientService.QueryFile(servers, fileEntry);
                        downloadService.AddDownload(requests, fileEntry, servers);
                    }
                }
                catch (Exception)
                {
                    MessageBox.Show("Unable to connect to the server.", "Server Problem", MessageBoxButton.OK, MessageBoxImage.Exclamation, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
                }
            });

            this.RequestFilesCommand = new RelayCommand(async(arg) =>
            {
                try
                {
                    var files  = await registerFilesService.RequestFiles();
                    this.Files = new ObservableCollection <RequestedTorrentFile>(files);
                    this.FirePropertyChanged(nameof(this.Files));
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Unable to connect to the server.", "Server Problem", MessageBoxButton.OK, MessageBoxImage.Exclamation, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
                }
            });

            this.RequestFilesCommand.Execute(null);
        }
Esempio n. 40
0
 public UserModelFactory(AddressSettings addressSettings,
                         CaptchaSettings captchaSettings,
                         CommonSettings commonSettings,
                         UserSettings userSettings,
                         DateTimeSettings dateTimeSettings,
                         ExternalAuthenticationSettings externalAuthenticationSettings,
                         IAddressModelFactory addressModelFactory,
                         ICountryService countryService,
                         IUserAttributeParser userAttributeParser,
                         IUserAttributeService userAttributeService,
                         IDateTimeHelper dateTimeHelper,
                         IDownloadService downloadService,
                         IExternalAuthenticationService externalAuthenticationService,
                         IGenericAttributeService genericAttributeService,
                         ILocalizationService localizationService,
                         INewsLetterSubscriptionService newsLetterSubscriptionService,
                         IPictureService pictureService,
                         IStateProvinceService stateProvinceService,
                         IUrlRecordService urlRecordService,
                         IWorkContext workContext,
                         MediaSettings mediaSettings,
                         SecuritySettings securitySettings)
 {
     this._addressSettings  = addressSettings;
     this._captchaSettings  = captchaSettings;
     this._commonSettings   = commonSettings;
     this._userSettings     = userSettings;
     this._dateTimeSettings = dateTimeSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._addressModelFactory            = addressModelFactory;
     this._countryService                = countryService;
     this._userAttributeParser           = userAttributeParser;
     this._userAttributeService          = userAttributeService;
     this._dateTimeHelper                = dateTimeHelper;
     this._downloadService               = downloadService;
     this._externalAuthenticationService = externalAuthenticationService;
     this._genericAttributeService       = genericAttributeService;
     this._localizationService           = localizationService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._pictureService                = pictureService;
     this._stateProvinceService          = stateProvinceService;
     this._urlRecordService              = urlRecordService;
     this._workContext      = workContext;
     this._mediaSettings    = mediaSettings;
     this._securitySettings = securitySettings;
 }
Esempio n. 41
0
 public LicenseController(
     IUserActivityService userActivityService,
     INotificationService notificationService,
     IPermissionService permissionService,
     IDeviceService deviceService,
     ILicenseService licenseService,
     IDownloadService downloadService,
     ILicenseModelFactory licenseModelFactory)
 {
     _userActivityService = userActivityService;
     _notificationService = notificationService;
     _permissionService   = permissionService;
     _deviceService       = deviceService;
     _licenseService      = licenseService;
     _downloadService     = downloadService;
     _licenseModelFactory = licenseModelFactory;
 }
Esempio n. 42
0
        public Downloader(MainViewModel mainViewModel,
                          IBuildProvider buildProvider, IMatchProvider matchProvider, ISoftwareProvider softwareProvider, IDownloadProvider downloadProvider,
                          IDownloadService downloadService, IExtractService extractService, IMetadataService metadataService, ILogger <Downloader> logger)
        {
            Logger = logger;

            MainViewModel = mainViewModel;

            BuildProvider    = buildProvider;
            MatchProvider    = matchProvider;
            SoftwareProvider = softwareProvider;
            DownloadProvider = downloadProvider;

            DownloadService = downloadService;
            ExtractService  = extractService;
            MetadataService = metadataService;
        }
Esempio n. 43
0
 public CustomLogoUploadController(
     IDownloadService downloadService,
     ILocalizationService localizationService,
     INopFileProvider fileProvider,
     IProductAttributeService productAttributeService,
     ICustomLogoService customLogoService,
     MediaSettings mediaSettings,
     ILogoPositionService logoPositionService)
 {
     _downloadService         = downloadService;
     _localizationService     = localizationService;
     _fileProvider            = fileProvider;
     _productAttributeService = productAttributeService;
     _customLogoService       = customLogoService;
     _mediaSettings           = mediaSettings;
     _logoPositionService     = logoPositionService;
 }
Esempio n. 44
0
        public IDownloadService GetDownloadService(DownloadProvider provider)
        {
            IDownloadService downloadService = null;

            switch (provider)
            {
            case DownloadProvider.DirectApi:
                downloadService = new DirectApiDownloadService(new WebClientImpl(), new DBRepository());
                break;

            case DownloadProvider.LambdaFunction:
                downloadService = new LambdaFunctionDownloadService();
                break;
            }

            return(downloadService);
        }
Esempio n. 45
0
 public MessageTokenProvider(ILanguageService languageService,
                             ILocalizationService localizationService,
                             IDateTimeHelper dateTimeHelper,
                             IPriceFormatter priceFormatter,
                             ICurrencyService currencyService,
                             IWorkContext workContext,
                             IDownloadService downloadService,
                             IOrderService orderService,
                             IPaymentService paymentService,
                             IStoreService storeService,
                             IStoreContext storeContext,
                             IProductAttributeParser productAttributeParser,
                             IAddressAttributeFormatter addressAttributeFormatter,
                             ICustomerAttributeFormatter customerAttributeFormatter,
                             MessageTemplatesSettings templatesSettings,
                             CatalogSettings catalogSettings,
                             TaxSettings taxSettings,
                             CurrencySettings currencySettings,
                             ShippingSettings shippingSettings,
                             StoreInformationSettings storeInformationSettings,
                             MediaSettings mediaSettings,
                             IEventPublisher eventPublisher)
 {
     this._languageService            = languageService;
     this._localizationService        = localizationService;
     this._dateTimeHelper             = dateTimeHelper;
     this._priceFormatter             = priceFormatter;
     this._currencyService            = currencyService;
     this._workContext                = workContext;
     this._downloadService            = downloadService;
     this._orderService               = orderService;
     this._paymentService             = paymentService;
     this._productAttributeParser     = productAttributeParser;
     this._addressAttributeFormatter  = addressAttributeFormatter;
     this._customerAttributeFormatter = customerAttributeFormatter;
     this._storeService               = storeService;
     this._storeContext               = storeContext;
     this._shippingSettings           = shippingSettings;
     this._templatesSettings          = templatesSettings;
     this._catalogSettings            = catalogSettings;
     this._taxSettings                = taxSettings;
     this._currencySettings           = currencySettings;
     this._storeInformationSettings   = storeInformationSettings;
     this._mediaSettings              = mediaSettings;
     this._eventPublisher             = eventPublisher;
 }
Esempio n. 46
0
        public DownloadViewVM(
            IDialogService dialogService,
            IDownloadService downloadService,
            IFilenameService filenameService,
            IPreferencesService preferencesService,
            INavigationService navigationService,
            INotificationService notificationService)
        {
            _dialogService       = dialogService;
            _downloadService     = downloadService;
            _filenameService     = filenameService;
            _preferencesService  = preferencesService;
            _navigationService   = navigationService;
            _notificationService = notificationService;

            _commandLockObject = new object();
        }
Esempio n. 47
0
        public SubscriptionModelFactory(IAddressModelFactory addressModelFactory,
                                        ISubscriptionService subscriptionService,
                                        IWorkContext workContext,
                                        ICurrencyService currencyService,
                                        IPriceFormatter priceFormatter,
                                        ISubscriptionProcessingService subscriptionProcessingService,
                                        IDateTimeHelper dateTimeHelper,
                                        IPaymentService paymentService,
                                        ILocalizationService localizationService,
                                        ICountryService countryService,
                                        IArticleAttributeParser articleAttributeParser,
                                        IDownloadService downloadService,
                                        IStoreContext storeContext,
                                        ISubscriptionTotalCalculationService subscriptionTotalCalculationService,
                                        IRewardPointService rewardPointService,
                                        CatalogSettings catalogSettings,
                                        SubscriptionSettings subscriptionSettings,
                                        TaxSettings taxSettings,
                                        AddressSettings addressSettings,
                                        RewardPointsSettings rewardPointsSettings,
                                        PdfSettings pdfSettings)
        {
            this._addressModelFactory                 = addressModelFactory;
            this._subscriptionService                 = subscriptionService;
            this._workContext                         = workContext;
            this._currencyService                     = currencyService;
            this._priceFormatter                      = priceFormatter;
            this._subscriptionProcessingService       = subscriptionProcessingService;
            this._dateTimeHelper                      = dateTimeHelper;
            this._paymentService                      = paymentService;
            this._localizationService                 = localizationService;
            this._countryService                      = countryService;
            this._articleAttributeParser              = articleAttributeParser;
            this._downloadService                     = downloadService;
            this._storeContext                        = storeContext;
            this._subscriptionTotalCalculationService = subscriptionTotalCalculationService;
            this._rewardPointService                  = rewardPointService;

            this._catalogSettings      = catalogSettings;
            this._subscriptionSettings = subscriptionSettings;
            this._taxSettings          = taxSettings;
            this._addressSettings      = addressSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._pdfSettings          = pdfSettings;
        }
Esempio n. 48
0
        public QueueActionModule(IQueueService queueService,
                                 ITrackedDownloadService trackedDownloadService,
                                 IFailedDownloadService failedDownloadService,
                                 IProvideDownloadClient downloadClientProvider,
                                 IPendingReleaseService pendingReleaseService,
                                 IDownloadService downloadService)
        {
            _queueService           = queueService;
            _trackedDownloadService = trackedDownloadService;
            _failedDownloadService  = failedDownloadService;
            _downloadClientProvider = downloadClientProvider;
            _pendingReleaseService  = pendingReleaseService;
            _downloadService        = downloadService;

            Delete(@"/(?<id>[\d]{1,10})", x => Remove((int)x.Id));
            Post("/import", x => Import());
            Post("/grab", x => Grab());
        }
 public CheckoutAttributeFormatter(IWorkContext workContext,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     ICurrencyService currencyService,
     ITaxService taxService,
     IPriceFormatter priceFormatter,
     IDownloadService downloadService,
     IWebHelper webHelper)
 {
     this._workContext = workContext;
     this._checkoutAttributeService = checkoutAttributeService;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._currencyService = currencyService;
     this._taxService = taxService;
     this._priceFormatter = priceFormatter;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
 }
        //
        public LevelContentResourceDownloadManager(IDownloadService downloadService, IBaseModule module, IContentResourceServcie resourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.levelContentResourceService = resourceService;
            this.constants = constants;

            this.Level = module as Level;

            var filePath = string.Format(@"level_{0}\{1}\Level_{2}.json", this.Level.Id, this.constants.CultureCode, this.Level.Id);
            this.savePath = this.constants.LocalContentPath + filePath;

            this.ResourceList = new List<MapfileItem>();

            MapfileItem f = new MapfileItem();
            f.FileName = filePath;

            this.ResourceList.Add(f);
        }
        //
        public UnitContentResourceDownloadManager(IDownloadService downloadService, IBaseModule unit, IContentResourceServcie unitContentService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.constants = constants;
            this.unitContentService = unitContentService;

            this.Unit = unit as Unit;

            var originalContent = unitContentService.Content;

            // Replace swf to jpg, flv to mp4
            ContentHelper.ReplaceUrlFileFormat(ref originalContent);
            ContentHelper.ReplaceUrlToLocalResourcePath(ref originalContent);

            this.updatedContent = originalContent;

            this.ResourceList = new List<MapfileItem>();
            this.BuildDownloadResource();
        }
 public ProductAttributeFormatter(IWorkContext workContext,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     ITaxService taxService,
     IPriceFormatter priceFormatter,
     IDownloadService downloadService,
     IWebHelper webHelper)
 {
     this._workContext = workContext;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._currencyService = currencyService;
     this._localizationService = localizationService;
     this._taxService = taxService;
     this._priceFormatter = priceFormatter;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
 }
        public MediaResourceDownloadManager(IDownloadService downloadService, IBaseModule module, IContentResourceServcie activityContentResourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.baseModule = module;
            this.constants = constants;
            this.activityContentResourceService = activityContentResourceService;

            string oriContent = this.activityContentResourceService.Content;
            mediaList = ContentHelper.GetMediaResources(ref oriContent);

            this.ResourceList = new List<MapfileItem>();

            // Build ResourceList for Mapfile.
            foreach (var m in mediaList)
            {
                MapfileItem f = new MapfileItem();
                f.FileName = m;
                ResourceList.Add(f);
            }
        }
        //
        public ActivityContentResourceDownloadManager(IDownloadService downloadService, IBaseModule activity, IContentResourceServcie resourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.constants = constants;
            this.activityContentResourceService = resourceService;

            ResourceList = new List<MapfileItem>();

            this.Activity = activity as Activity;

            string oriContent = activityContentResourceService.Content;

            // Replace swf to jpg, flv to mp4
            ContentHelper.ReplaceUrlFileFormat(ref oriContent);

            ContentHelper.ReplaceUrlToLocalResourcePath(ref oriContent);

            this.updatedContent = oriContent;

            BuildDownloadResource();
        }
Esempio n. 55
0
 public SongController(ILocalizationService localizationService,
     IPictureService pictureService,
     ICustomerService customerService,
     IDateTimeHelper dateTimeHelper,
     CustomerSettings customerSettings,
     MediaSettings mediaSettings,
     IArtistPageService artistPageService,
     IArtistPageAPIService artistPageApiService,
     ISongService songService,
     IMusicService musicService,
     mobSocialSettings mobSocialSettings,
     IMobSocialService mobSocialService,
     IWorkContext workContext,
     IMobSocialMessageService mobsocialMessageService,
     ISharedSongService sharedSongService,
     IStoreContext storeContext,
     IProductService productService,
     IDownloadService downloadService,
     IPriceFormatter priceFormatter)
 {
     _localizationService = localizationService;
     _pictureService = pictureService;
     _customerService = customerService;
     _dateTimeHelper = dateTimeHelper;
     _customerSettings = customerSettings;
     _mediaSettings = mediaSettings;
     _mobSocialSettings = mobSocialSettings;
     _mobSocialService = mobSocialService;
     _workContext = workContext;
     _artistPageApiService = artistPageApiService;
     _artistPageService = artistPageService;
     _songService = songService;
     _musicService = musicService;
     _mobsocialMessageService = mobsocialMessageService;
     _sharedSongService = sharedSongService;
     _storeContext = storeContext;
     _productService = productService;
     _downloadService = downloadService;
     _priceFormatter = priceFormatter;
 }
Esempio n. 56
0
        public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IDownloadService downloadService,
                             ICacheManager cacheManager,
                             Logger logger)
        {
            _rssFetcherAndParser = rssFetcherAndParser;
            _nzbSearchService = nzbSearchService;
            _downloadDecisionMaker = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _downloadService = downloadService;
            _logger = logger;

            GetResourceAll = GetReleases;
            Post["/"] = x => DownloadRelease(this.Bind<ReleaseResource>());

            PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
            PostValidator.RuleFor(s => s.Guid).NotEmpty();

            _remoteEpisodeCache = cacheManager.GetCache<RemoteEpisode>(GetType(), "remoteEpisodes");
        }
Esempio n. 57
0
 public EmailSender(IDownloadService downloadService)
 {
     this._downloadService = downloadService;
 }
Esempio n. 58
0
        public CustomerController(IAuthenticationService authenticationService,
            IDateTimeHelper dateTimeHelper,
            DateTimeSettings dateTimeSettings, 
            TaxSettings taxSettings,
            ILocalizationService localizationService,
            IWorkContext workContext,
            IStoreContext storeContext,
            ICustomerService customerService,
            IGenericAttributeService genericAttributeService,
            ICustomerRegistrationService customerRegistrationService,
            ITaxService taxService, RewardPointsSettings rewardPointsSettings,
            CustomerSettings customerSettings,AddressSettings addressSettings, ForumSettings forumSettings,
            OrderSettings orderSettings, IAddressService addressService,
            ICountryService countryService, IStateProvinceService stateProvinceService,
            IOrderTotalCalculationService orderTotalCalculationService,
            IOrderProcessingService orderProcessingService, IOrderService orderService,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IPictureService pictureService, INewsLetterSubscriptionService newsLetterSubscriptionService,
            IForumService forumService, IShoppingCartService shoppingCartService,
            IOpenAuthenticationService openAuthenticationService, 
            IBackInStockSubscriptionService backInStockSubscriptionService, 
            IDownloadService downloadService, IWebHelper webHelper,
            ICustomerActivityService customerActivityService, MediaSettings mediaSettings,
            IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings,
            CaptchaSettings captchaSettings, ExternalAuthenticationSettings externalAuthenticationSettings)
        {
            this._authenticationService = authenticationService;
            this._dateTimeHelper = dateTimeHelper;
            this._dateTimeSettings = dateTimeSettings;
            this._taxSettings = taxSettings;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._customerService = customerService;
            this._genericAttributeService = genericAttributeService;
            this._customerRegistrationService = customerRegistrationService;
            this._taxService = taxService;
            this._rewardPointsSettings = rewardPointsSettings;
            this._customerSettings = customerSettings;
            this._addressSettings = addressSettings;
            this._forumSettings = forumSettings;
            this._orderSettings = orderSettings;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._orderProcessingService = orderProcessingService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._orderService = orderService;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._pictureService = pictureService;
            this._newsLetterSubscriptionService = newsLetterSubscriptionService;
            this._forumService = forumService;
            this._shoppingCartService = shoppingCartService;
            this._openAuthenticationService = openAuthenticationService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._downloadService = downloadService;
            this._webHelper = webHelper;
            this._customerActivityService = customerActivityService;

            this._mediaSettings = mediaSettings;
            this._workflowMessageService = workflowMessageService;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._externalAuthenticationSettings = externalAuthenticationSettings;
        }
Esempio n. 59
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, AddressSettings addressSettings)
        {
            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;
            this._addressSettings = addressSettings;
        }
        public new void SetUp()
        {
            #region Test data

            //color (dropdownlist)
            pa1 = new ProductAttribute
            {
                Id = 1,
                Name = "Color",
            };
            pva1_1 = new ProductVariantAttribute
            {
                Id = 11,
                ProductVariantId = 1,
                TextPrompt = "Select color:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.DropdownList,
                DisplayOrder = 1,
                ProductAttribute = pa1,
                ProductAttributeId = pa1.Id
            };
            pvav1_1 = new ProductVariantAttributeValue
            {
                Id = 11,
                Name = "Green",
                DisplayOrder = 1,
                ProductVariantAttribute = pva1_1,
                ProductVariantAttributeId = pva1_1.Id
            };
            pvav1_2 = new ProductVariantAttributeValue
            {
                Id = 12,
                Name = "Red",
                DisplayOrder = 2,
                ProductVariantAttribute = pva1_1,
                ProductVariantAttributeId = pva1_1.Id
            };
            pva1_1.ProductVariantAttributeValues.Add(pvav1_1);
            pva1_1.ProductVariantAttributeValues.Add(pvav1_2);

            //custom option (checkboxes)
            pa2 = new ProductAttribute
            {
                Id = 2,
                Name = "Some custom option",
            };
            pva2_1 = new ProductVariantAttribute
            {
                Id = 21,
                ProductVariantId = 1,
                TextPrompt = "Select at least one option:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.Checkboxes,
                DisplayOrder = 2,
                ProductAttribute = pa2,
                ProductAttributeId = pa2.Id
            };
            pvav2_1 = new ProductVariantAttributeValue
            {
                Id = 21,
                Name = "Option 1",
                DisplayOrder = 1,
                ProductVariantAttribute = pva2_1,
                ProductVariantAttributeId = pva2_1.Id
            };
            pvav2_2 = new ProductVariantAttributeValue
            {
                Id = 22,
                Name = "Option 2",
                DisplayOrder = 2,
                ProductVariantAttribute = pva2_1,
                ProductVariantAttributeId = pva2_1.Id
            };
            pva2_1.ProductVariantAttributeValues.Add(pvav2_1);
            pva2_1.ProductVariantAttributeValues.Add(pvav2_2);

            //custom text
            pa3 = new ProductAttribute
            {
                Id = 3,
                Name = "Custom text",
            };
            pva3_1 = new ProductVariantAttribute
            {
                Id = 31,
                ProductVariantId = 1,
                TextPrompt = "Enter custom text:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.TextBox,
                DisplayOrder = 1,
                ProductAttribute = pa1,
                ProductAttributeId = pa3.Id
            };

            #endregion

            _productAttributeRepo = MockRepository.GenerateMock<IRepository<ProductAttribute>>();
            _productAttributeRepo.Expect(x => x.Table).Return(new List<ProductAttribute>() { pa1, pa2, pa3 }.AsQueryable());
            _productAttributeRepo.Expect(x => x.GetById(pa1.Id)).Return(pa1);
            _productAttributeRepo.Expect(x => x.GetById(pa2.Id)).Return(pa2);
            _productAttributeRepo.Expect(x => x.GetById(pa3.Id)).Return(pa3);

            _productVariantAttributeRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttribute>>();
            _productVariantAttributeRepo.Expect(x => x.Table).Return(new List<ProductVariantAttribute>() { pva1_1, pva2_1, pva3_1 }.AsQueryable());
            _productVariantAttributeRepo.Expect(x => x.GetById(pva1_1.Id)).Return(pva1_1);
            _productVariantAttributeRepo.Expect(x => x.GetById(pva2_1.Id)).Return(pva2_1);
            _productVariantAttributeRepo.Expect(x => x.GetById(pva3_1.Id)).Return(pva3_1);

            _productVariantAttributeCombinationRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttributeCombination>>();
            _productVariantAttributeCombinationRepo.Expect(x => x.Table).Return(new List<ProductVariantAttributeCombination>().AsQueryable());

            _productVariantAttributeValueRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttributeValue>>();
            _productVariantAttributeValueRepo.Expect(x => x.Table).Return(new List<ProductVariantAttributeValue>() { pvav1_1, pvav1_2, pvav2_1, pvav2_2 }.AsQueryable());
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_1.Id)).Return(pvav1_1);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_2.Id)).Return(pvav1_2);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_1.Id)).Return(pvav2_1);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_2.Id)).Return(pvav2_2);

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

            var cacheManager = new NasNullCache();

            _productAttributeService = new ProductAttributeService(cacheManager,
                _productAttributeRepo,
                _productVariantAttributeRepo,
                _productVariantAttributeCombinationRepo,
                _productVariantAttributeValueRepo,
                _eventPublisher);

            _productAttributeParser = new ProductAttributeParser(_productAttributeService);

            var workingLanguage = new Language();
            _workContext = MockRepository.GenerateMock<IWorkContext>();
            _workContext.Expect(x => x.WorkingLanguage).Return(workingLanguage);
            _currencyService = MockRepository.GenerateMock<ICurrencyService>();
            _localizationService = MockRepository.GenerateMock<ILocalizationService>();
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Virtual")).Return("For: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Virtual")).Return("From: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Physical")).Return("For: {0}");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Physical")).Return("From: {0}");
            _taxService = MockRepository.GenerateMock<ITaxService>();
            _priceFormatter = MockRepository.GenerateMock<IPriceFormatter>();
            _downloadService = MockRepository.GenerateMock<IDownloadService>();
            _webHelper = MockRepository.GenerateMock<IWebHelper>();

            _productAttributeFormatter = new ProductAttributeFormatter(_workContext,
                _productAttributeService,
                _productAttributeParser,
                _currencyService,
                _localizationService,
                _taxService,
                _priceFormatter,
                _downloadService,
                _webHelper);
        }